From ea3b98ef0e8c17e5de6f1418879d6f8c50eab012 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Wed, 24 Aug 2011 07:27:19 +0200 Subject: Makefile: Add verbosity support (like in automake) --- Makefile | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index f058526..af5d85e 100644 --- a/Makefile +++ b/Makefile @@ -6,16 +6,28 @@ pages=$(shell sed -n 's/^.*filename="\([^"]*\)".*/\1/p' main.xml) pages_html=$(pages:%.xml=%.xhtml) +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_html) checkmark.png %.png: %.svg - $(svg2png) $< > $@ + $(V_GEN) $(svg2png) $< > $@ %.xhtml: %.xml %.xsl xsl/* - $(xsltproc) $< > $@ + $(V_XSLT) $(xsltproc) $< > $@ %.xhtml: %.xml xsl/* - $(xsltproc) $< > $@ + $(V_XSLT) $(xsltproc) $< > $@ clean: rm -f $(pages_html) checkmark.png -- cgit