about summary refs log tree commit homepage
path: root/Documentation/GNUmakefile
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-10-02 20:44:03 -0700
committerEric Wong <normalperson@yhbt.net>2009-10-02 21:21:28 -0700
commit37a12997628fcab722512f8a6370b92d44e33529 (patch)
tree9ced4ceaee3d4d6ce21dd1742f037d1d79a01e61 /Documentation/GNUmakefile
downloadrainbows-37a12997628fcab722512f8a6370b92d44e33529.tar.gz
No tests yet, but the old "gossamer" and "rainbows" branches
seem to be basically working.
Diffstat (limited to 'Documentation/GNUmakefile')
-rw-r--r--Documentation/GNUmakefile30
1 files changed, 30 insertions, 0 deletions
diff --git a/Documentation/GNUmakefile b/Documentation/GNUmakefile
new file mode 100644
index 0000000..e33c87f
--- /dev/null
+++ b/Documentation/GNUmakefile
@@ -0,0 +1,30 @@
+all::
+
+PANDOC = pandoc
+PANDOC_OPTS = -f markdown --email-obfuscation=none --sanitize-html
+pandoc = $(PANDOC) $(PANDOC_OPTS)
+pandoc_html = $(pandoc) --toc -t html --no-wrap
+
+man1 := $(addsuffix .1,rainbows)
+html1 := $(addsuffix .html,$(man1))
+
+all:: html man
+
+html: $(html1)
+man: $(man1)
+
+install-html: html
+        mkdir -p ../doc/man1
+        install -m 644 $(html1) ../doc/man1
+
+install-man: man
+        mkdir -p ../man/man1
+        install -m 644 $(man1) ../man/man1
+
+%.1: %.1.txt
+        $(pandoc) -s -t man < $< > $@+ && mv $@+ $@
+%.1.html: %.1.txt
+        $(pandoc_html) < $< > $@+ && mv $@+ $@
+
+clean::
+        $(RM) $(man1) $(html1)