diff Makefile.docs @ 0:e0efe7848130

Initial commit. Untested!
author David Barts <davidb@stashtea.com>
date Thu, 16 Jul 2020 19:57:23 -0700
parents
children 404eb7e57fe6
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile.docs	Thu Jul 16 19:57:23 2020 -0700
@@ -0,0 +1,21 @@
+.PHONY: clean
+
+all: Readme.rst Readme.pdf
+
+clean:
+	-rm *.rst *.pdf *.ps *.nrf
+
+%.rst : %.html
+	echo "[This file automatically generated by pandoc from '$<'.]" > $@
+	echo "" >> $@
+	pandoc --from=html --to=rst $< >> $@
+
+%.nrf : %.html
+	echo ".so custom.tmac" > $@
+	pandoc --from=html --to=ms $< | sed -e 's/^\.LP/.PP/' -e 's/^\.SH/.MYSH/' >> $@
+
+%.ps: %.nrf custom.tmac
+	groff -Tps -t -ms $< > $@
+
+%.pdf : %.ps
+	ps2pdf $<