view Makefile.doc @ 33:3d86f0391168

Work on improving the build system.
author David Barts <davidb@stashtea.com>
date Fri, 24 Apr 2020 19:45:57 -0700
parents 3b0546fa0d74
children 5de364cb2847
line wrap: on
line source

.PHONY: clean

all: Readme.rst Readme.pdf Building.rst Building.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/' >> $@

%.ps: %.nrf custom.tmac
	groff -Tps -t -ms -mpdfmark $< > $@

%.pdf : %.ps
	ps2pdf $<