cmark

My personal build of CMark ✏️

Commit
429a43768ee416ed5fed905efe8deca79e155fec
Parent
c95bf40de24300bcb7a115a2f6ae7a978b7d21ad
Author
John MacFarlane <jgm@berkeley.edu>
Date

Reorganized Makefile.

Include a modified Makefile in source dist tarball.

Diffstat

1 file changed, 18 insertions, 21 deletions

Status File Name N° Changes Insertions Deletions
Modified Makefile 39 18 21
diff --git 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 class="space"> <\/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 class="space"> <\/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