diff options
Diffstat (limited to 'Documentation/GNUmakefile')
-rw-r--r-- | Documentation/GNUmakefile | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Documentation/GNUmakefile b/Documentation/GNUmakefile new file mode 100644 index 0000000..bd64133 --- /dev/null +++ b/Documentation/GNUmakefile @@ -0,0 +1,33 @@ +all:: + +PANDOC = pandoc +PANDOC_OPTS = -s -f markdown --email-obfuscation=none --sanitize-html +pandoc = $(PANDOC) $(PANDOC_OPTS) +pandoc_html = $(pandoc) --toc -t html --no-wrap + +man1 := unicorn + +all:: html man +doc-gz: man-gz html-gz + +html: $(addsuffix .1.html,$(man1)) +man: $(addsuffix .1,$(man1)) +html-gz: $(addsuffix .1.html.gz,$(man1)) +man-gz: $(addsuffix .1.gz,$(man1)) + +%.1: %.1.txt + $(pandoc) -t man < $< > $@+ && mv $@+ $@ +%.1.html: %.1.txt + $(pandoc_html) -T $(basename $@) < $< > $@+ && mv $@+ $@ + +%.1.gz: %.1 + gzip --rsyncable < $< > $@+ && mv $@+ $@ + +%.1.html.gz: %.1.html + gzip --rsyncable < $< > $@+ && mv $@+ $@ + +clean:: + $(RM) $(addsuffix .1.html,$(man1)) + $(RM) $(addsuffix .1,$(man1)) + $(RM) $(addsuffix .1.html.gz,$(man1)) + $(RM) $(addsuffix .1.gz,$(man1)) |