clean:
rm -f $(OBJS) docgen
+markdown = $(shell if pandoc -h|grep -q markdown_strict; then echo markdown_strict; else echo markdown; fi)
+
doc.mw: docgen
- (echo '<div class="toclimit-2" style="float: right; margin-left: 1em;">__TOC__</div>'; ./docgen wiki) | pandoc -f markdown_strict -t mediawiki > $@
+ (echo '<div class="toclimit-2" style="float: right; margin-left: 1em;">__TOC__</div>'; ./docgen wiki) | pandoc -f $(markdown) -t mediawiki > $@
doc.mdwn: docgen Makefile
# ./docgen wiki | pandoc -f markdown_strict -t markdown_strict > $@
./docgen wiki > $@
doc.html: docgen Makefile
- ./docgen wiki | pandoc -f markdown_strict -t html --base-header-level=2 > $@
+ ./docgen wiki | pandoc -f $(markdown) -t html --base-header-level=2 > $@
+
doc.tex: docgen Makefile
./docgen pdfdoc > $@.1
- pandoc -f markdown_strict -t latex --base-header-level=1 $@.1 -o $@.2
+ pandoc -f $(markdown) -t latex --base-header-level=1 $@.1 -o $@.2
sed -e 's/\\subsection/\\newpage\\subsection/' $@.2 > $@
rm $@.?