From: Michal Sojka Date: Thu, 4 Dec 2014 01:34:18 +0000 (+0100) Subject: doc: Do not fail with older pandoc version X-Git-Tag: eaton-0.1-beta~1^2 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/pes-rpp/rpp-test-sw.git/commitdiff_plain/380e2cc5b23006b993d3d4a35561f1dd8a06e0e8 doc: Do not fail with older pandoc version pandoc version in Debian/Wheezy does not understand markdown_strict format. Use plain markdown. It may lead to incorrectly generated doc, but we ignore this for now. --- diff --git a/rpp-test-sw/commands/doc/Makefile b/rpp-test-sw/commands/doc/Makefile index 4f640bb..ff0cc33 100644 --- a/rpp-test-sw/commands/doc/Makefile +++ b/rpp-test-sw/commands/doc/Makefile @@ -16,19 +16,22 @@ docgen: $(OBJS) 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 '
__TOC__
'; ./docgen wiki) | pandoc -f markdown_strict -t mediawiki > $@ + (echo '
__TOC__
'; ./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 $@.?