summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-11-12 07:50:59 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-11-12 07:50:59 -0800
commit9178ce81c2521bae2bc3a3b2a690d6c192f9e952 (patch)
tree9b757e8e35f33488ac572a456167175d3026b87f /Makefile
parent2810f421ae10869f50ee9b95c3260e3d38734306 (diff)
Reorganized Makefile.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile48
1 files changed, 26 insertions, 22 deletions
diff --git a/Makefile b/Makefile
index 3842941..0fe777e 100644
--- a/Makefile
+++ b/Makefile
@@ -43,6 +43,9 @@ clean:
$(PROG): all
+$(SRCDIR)/case_fold_switch.inc: $(DATADIR)/CaseFolding-3.2.0.txt
+ perl mkcasefold.pl < $< > $@
+
man/man1/cmark.1: man/cmark.1.md
pandoc $< -o $@ -s -t man
@@ -73,6 +76,26 @@ test: $(SPEC)
testlib: $(SPEC)
perl runtests.pl $< ./wrapper.py
+leakcheck: $(PROG)
+ cat leakcheck.md | valgrind --leak-check=full --dsymutil=yes $(PROG)
+
+fuzztest:
+ { for i in `seq 1 10`; do \
+ cat /dev/urandom | head -c $(FUZZCHARS) | iconv -f latin1 -t utf-8 | tee fuzz-$$i.txt | \
+ /usr/bin/env time -p $(PROG) >/dev/null && rm fuzz-$$i.txt ; \
+ done } 2>&1 | grep 'user\|abnormally'
+
+operf: $(PROG)
+ operf $(PROG) <$(BENCHINP) >/dev/null
+
+distclean: clean
+ -rm -f js/commonmark.js
+ -rm -rf *.dSYM
+ -rm -f README.html
+ -rm -f spec.md fuzz.txt spec.html
+
+### JavaScript ###
+
js/commonmark.js: js/lib/index.js ${JSMODULES}
browserify --standalone commonmark $< -o $@
@@ -85,35 +108,16 @@ jshint:
benchjs:
node js/bench.js ${BENCHINP}
-$(SRCDIR)/case_fold_switch.inc: $(DATADIR)/CaseFolding-3.2.0.txt
- perl mkcasefold.pl < $< > $@
+npm:
+ cd js; npm publish
dingus: js/commonmark.js
echo "Starting dingus server at http://localhost:9000" && python -m SimpleHTTPServer 9000
-leakcheck: $(PROG)
- cat leakcheck.md | valgrind --leak-check=full --dsymutil=yes $(PROG)
-
-operf: $(PROG)
- operf $(PROG) <$(BENCHINP) >/dev/null
-
-fuzztest:
- { for i in `seq 1 10`; do \
- cat /dev/urandom | head -c $(FUZZCHARS) | iconv -f latin1 -t utf-8 | tee fuzz-$$i.txt | \
- /usr/bin/env time -p $(PROG) >/dev/null && rm fuzz-$$i.txt ; \
- done } 2>&1 | grep 'user\|abnormally'
+### Website ###
update-site: spec.html js/commonmark.js
make -C $(SITE) update
upload-site: spec.html
make -C $(SITE) upload
-
-npm:
- cd js; npm publish
-
-distclean: clean
- -rm -f js/commonmark.js
- -rm -rf *.dSYM
- -rm -f README.html
- -rm -f spec.md fuzz.txt spec.html