From 429a43768ee416ed5fed905efe8deca79e155fec Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 12 Nov 2014 08:36:19 -0800 Subject: Reorganized Makefile. Include a modified Makefile in source dist tarball. --- Makefile | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 0fe777e..b3eb921 100644 --- a/Makefile +++ b/Makefile @@ -34,6 +34,7 @@ tarball: mkdir -p $(PKGDIR)/man/man1; \ cp -r src $(PKGDIR)/; \ cp CMakeLists.txt $(PKGDIR); \ + perl -ne '$$p++ if /^### JavaScript/; print if (!$$p)' Makefile > $(PKGDIR)/Makefile; \ cp man/man1/cmark.1 $(PKGDIR)/man/man1/; \ cp README.md LICENSE spec.txt runtests.pl $(PKGDIR)/; \ tar cvzf cmark-$(SPECVERSION).tar.gz $(PKGDIR) @@ -49,27 +50,6 @@ $(SRCDIR)/case_fold_switch.inc: $(DATADIR)/CaseFolding-3.2.0.txt man/man1/cmark.1: man/cmark.1.md pandoc $< -o $@ -s -t man -README.html: README.md template.html - pandoc --template template.html -S -s -t html5 -o $@ $< - -spec: test spec.html - -spec.md: $(SPEC) - perl spec2md.pl < $< > $@ - -spec.html: spec.md template.html - pandoc --no-highlight --number-sections --template template.html -s --toc -S $< | \ - perl -pe 's/a href="@([^"]*)"/a id="\1" href="#\1" class="definition"/g' | \ - perl -pe 's/␣/ <\/span>/g' \ - > $@ - - -spec.pdf: spec.md template.tex specfilter.hs - pandoc -s $< --template template.tex \ - --filter ./specfilter.hs -o $@ --latex-engine=xelatex --toc \ - --number-sections -V documentclass=report -V tocdepth=2 \ - -V classoption=twosides - test: $(SPEC) perl runtests.pl $< $(PROG) @@ -114,6 +94,23 @@ npm: dingus: js/commonmark.js echo "Starting dingus server at http://localhost:9000" && python -m SimpleHTTPServer 9000 +### Spec ### + +spec.md: $(SPEC) + perl spec2md.pl < $< > $@ + +spec.html: spec.md template.html + pandoc --no-highlight --number-sections --template template.html -s --toc -S $< | \ + perl -pe 's/a href="@([^"]*)"/a id="\1" href="#\1" class="definition"/g' | \ + perl -pe 's/␣/ <\/span>/g' \ + > $@ + +spec.pdf: spec.md template.tex specfilter.hs + pandoc -s $< --template template.tex \ + --filter ./specfilter.hs -o $@ --latex-engine=xelatex --toc \ + --number-sections -V documentclass=report -V tocdepth=2 \ + -V classoption=twosides + ### Website ### update-site: spec.html js/commonmark.js -- cgit v1.2.3