From 9f34c2202888d76f0d4697c18e79231309a1307e Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Wed, 24 Aug 2011 09:06:48 +0200 Subject: Makefile: Make suffix configurable --- Makefile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 091e6a2..a33ee70 100644 --- a/Makefile +++ b/Makefile @@ -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 -- cgit