diff options
-rw-r--r-- | Makefile | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -1,10 +1,12 @@ -xsltproc=xsltproc --stringparam suffix .xhtml +suffix = .xhtml + +xsltproc=xsltproc --stringparam suffix $(suffix) svg2png=rsvg-convert -f png #pages=$(shell xmllint --xpath "//*/@filename" main.xml | sed 's/filename=//g'| xargs echo) pages=$(shell sed -n 's/^.*filename="\([^"]*\)".*/\1/p' main.xml) -pages_html=$(pages:%.xml=%.xhtml) +pages_gen=$(pages:%.xml=%$(suffix)) DEFAULT_VERBOSITY=0 @@ -19,15 +21,15 @@ v_gen_0 = @echo " GEN " $@; .PHONY: all -all: $(pages_html) checkmark.png +all: $(pages_gen) checkmark.png %.png: %.svg $(V_GEN) $(svg2png) $< > $@ -%.xhtml: %.xml %.xsl main.xml xsl/* +%$(suffix): %.xml %.xsl main.xml xsl/* $(V_XSLT) $(xsltproc) $< > $@ -%.xhtml: %.xml main.xml xsl/* +%$(suffix): %.xml main.xml xsl/* $(V_XSLT) $(xsltproc) $< > $@ clean: - rm -f $(pages_html) checkmark.png + rm -f $(pages_gen) checkmark.png |