tests: more reliable error checking
[rainbows.git] / Documentation / GNUmakefile
blobe33c87fbe99cd39e1cfdf5683019e255637ee4e9
1 all::
3 PANDOC = pandoc
4 PANDOC_OPTS = -f markdown --email-obfuscation=none --sanitize-html
5 pandoc = $(PANDOC) $(PANDOC_OPTS)
6 pandoc_html = $(pandoc) --toc -t html --no-wrap
8 man1 := $(addsuffix .1,rainbows)
9 html1 := $(addsuffix .html,$(man1))
11 all:: html man
13 html: $(html1)
14 man: $(man1)
16 install-html: html
17 mkdir -p ../doc/man1
18 install -m 644 $(html1) ../doc/man1
20 install-man: man
21 mkdir -p ../man/man1
22 install -m 644 $(man1) ../man/man1
24 %.1: %.1.txt
25 $(pandoc) -s -t man < $< > $@+ && mv $@+ $@
26 %.1.html: %.1.txt
27 $(pandoc_html) < $< > $@+ && mv $@+ $@
29 clean::
30 $(RM) $(man1) $(html1)