3 ## Author: Fredrik Unger <fred@tree.se>
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))
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))
13 DEFAULT_FILES=default.html default.html.png default.pdf default.pdf.png
15 all: $(HTML_FILES) $(HTML_PNG_FILES) $(PDF_FILES) $(PDF_PNG_FILES) $(DEFAULT_FILES)
18 python -m SimpleHTTPServer 8000 & echo "$$!" > server.pid
20 cutycapt --url=http://localhost:8000/"$<" --out="$@"
27 default.html: ../default.html.xsl example.xml
28 xsltproc --xinclude --output "$@" "$<" example.xml
30 default.pdf: ../default.pdf.xsl example.xml
31 xsltproc --xinclude --output ex.fo "$<" example.xml
35 %.html: %.html.xsl example.xml
36 xsltproc --xinclude --output "$@" "$<" example.xml
38 %.pdf: %.pdf.xsl example.xml
39 xsltproc --xinclude --output ex.fo "$<" example.xml
44 rm -f *~ server.pid ex.fo $(HTML_FILES) $(HTML_PNG_FILES) $(PDF_FILES) $(PDF_PNG_FILES) $(DEFAULT_FILES)
46 ### Makefile ends here