summaryrefslogtreecommitdiff
path: root/Makefile
blob: e1264006d29d9d01e667a49ba7f0403c2e9a9982 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
xsltproc=xsltproc
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)

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
	$(V_GEN) $(svg2png) $< > $@

%.xhtml: %.xml %.xsl main.xml xsl/*
	$(V_XSLT) $(xsltproc) $< > $@
%.xhtml: %.xml main.xml xsl/*
	$(V_XSLT) $(xsltproc) $< > $@

clean:
	rm -f $(pages_html) checkmark.png