suffix = .xhtml
xsltproc=xsltproc --stringparam suffix $(suffix)
svg2png=rsvg-convert -f png
pages=$(shell xsltproc xsl/main_filenames.xsl main.xml)
pages_gen=$(pages:%.xml=%$(suffix))
common_depend=main.xml $(wildcard xsl/*.xsl)
DEFAULT_VERBOSITY=0
# verbosity stuff
V_XSLT = $(v_xslt_$(V))
v_xslt_ = $(v_xslt_$(DEFAULT_VERBOSITY))
v_xslt_0 = @echo " XSLT " $@;
V_GEN = $(v_gen_$(V))
v_gen_ = $(v_gen_$(DEFAULT_VERBOSITY))
v_gen_0 = @echo " GEN " $@;
.PHONY: all
all: $(pages_gen) checkmark.png
%.png: %.svg
$(V_GEN) $(svg2png) $< > $@
%$(suffix): %.xml %.xsl $(common_depend)
$(V_XSLT) $(xsltproc) $< > $@
%$(suffix): %.xml $(common_depend)
$(V_XSLT) $(xsltproc) $< > $@
clean:
rm -f $(pages_gen) checkmark.png