]> code.delx.au - gnu-emacs-elpa/blobdiff - Makefile
Cover parsing edge cases.
[gnu-emacs-elpa] / Makefile
index 9b59cebd0f183d85679d5144b3f67918f4866b74..0b370430859399223874f8d957c74a9c2ed07b2a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,43 +1,52 @@
-all: clean install compile test
+CASK = cask
+EMACS = emacs
+DEPENDENCIES = .cask/
+SCOPIFIER_PORT = $$(lsof -t -i :6969)
+KILL_SCOPIFIER = if [ -n "${SCOPIFIER_PORT}" ]; then kill ${SCOPIFIER_PORT}; fi
 
-bench: benchel benchjs
+all: uncompile compile test
 
-benchel:
-       emacs -Q \
+bench: ${DEPENDENCIES}
+       ${CASK} exec ${EMACS} -Q \
        -L . \
-       -L lib/js2-mode \
        -l context-coloring \
-       -l benchmark/context-coloring-benchmark \
+       -l benchmark/context-coloring-benchmark.el \
        -f context-coloring-benchmark-run
 
-benchjs:
-       node_modules/.bin/matcha
-
-compile:
-       emacs -Q -batch \
-       -L lib/js2-mode \
+compile: ${DEPENDENCIES}
+       ${CASK} exec ${EMACS} -Q -batch \
+       -L . \
        -f batch-byte-compile *.el
 
-clean:
-       rm -f *.log benchmark/*.log *.elc
+uncompile:
+       rm -f *.elc
 
-install:
-       npm install
+clean: uncompile
+       rm -rf ${DEPENDENCIES}
 
-test: testel testjs
+${DEPENDENCIES}:
+       ${CASK}
 
-testel:
-       emacs -Q -batch \
+test: ${DEPENDENCIES}
+       ${KILL_SCOPIFIER}
+       ${CASK} exec ${EMACS} -Q -batch \
        -L . \
-       -L lib/ert-async \
-       -L lib/js2-mode \
        -l ert \
        -l ert-async \
-       -l context-coloring \
+       -l test/context-coloring-coverage.el \
+       -f context-coloring-coverage-ci-init \
        -l test/context-coloring-test.el \
        -f ert-run-tests-batch-and-exit
 
-testjs:
-       node_modules/.bin/mocha
+cover: ${DEPENDENCIES}
+       ${KILL_SCOPIFIER}
+       ${CASK} exec ${EMACS} -Q -batch \
+       -L . \
+       -l ert \
+       -l ert-async \
+       -l test/context-coloring-coverage.el \
+       -f context-coloring-coverage-local-init \
+       -l test/context-coloring-test.el \
+       -f ert-run-tests-batch-and-exit
 
-.PHONY: all bench benchel benchjs compile clean install test testel testjs
+.PHONY: all bench compile uncompile clean test cover