link: Added example.xml and footnote style sheets
[docpond.git] / Makefile.tag
1 ### Makefile ---
2
3 ## Author: Fredrik Unger <fred@tree.se>
4
5 EXAMPLE_HTML=$(shell find . -type f -name '*.html.xsl')
6 HTML_FILES=$(patsubst %.html.xsl, %.html, $(EXAMPLE_HTML))
7 HTML_PNG_FILES=$(patsubst %.html.xsl, %.html.png, $(EXAMPLE_HTML))
8
9 EXAMPLE_PDF=$(shell find . -type f -name '*.pdf.xsl')
10 PDF_FILES=$(patsubst %.pdf.xsl, %.pdf, $(EXAMPLE_PDF))
11 PDF_PNG_FILES=$(patsubst %.pdf.xsl, %.pdf.png, $(EXAMPLE_PDF))
12
13 DEFAULT_FILES=default.html default.html.png default.pdf default.pdf.png
14
15 all: $(HTML_FILES) $(HTML_PNG_FILES) $(PDF_FILES) $(PDF_PNG_FILES) $(DEFAULT_FILES)
16
17 %.html.png: %.html
18         python -m SimpleHTTPServer 8000 & echo "$$!" > server.pid
19         sleep 1
20         cutycapt --url=http://localhost:8000/"$<" --out="$@"
21         kill `cat server.pid`
22         rm server.pid
23
24 %.pdf.png: %.pdf
25         convert "$<" "$@"
26
27 default.html: ../default.html.xsl example.xml
28         xsltproc --xinclude --output "$@" "$<" example.xml
29
30 default.pdf:  ../default.pdf.xsl example.xml
31         xsltproc --xinclude --output ex.fo "$<" example.xml
32         fop ex.fo "$@"
33         rm ex.fo
34
35 %.html: %.html.xsl example.xml
36         xsltproc --xinclude --output "$@" "$<" example.xml
37
38 %.pdf:  %.pdf.xsl example.xml
39         xsltproc --xinclude --output ex.fo "$<" example.xml
40         fop ex.fo "$@"
41         rm ex.fo
42
43 clean:
44         rm -f *~ server.pid ex.fo $(HTML_FILES) $(HTML_PNG_FILES) $(PDF_FILES) $(PDF_PNG_FILES) $(DEFAULT_FILES)
45
46 ### Makefile ends here