]> code.delx.au - gnu-emacs-elpa/blobdiff - Makefile
Fix improperly prepared test.
[gnu-emacs-elpa] / Makefile
index 4a369d5edc730709dee12c8f21d118d9557ac6da..f729409b9c8d4741e254d0cc2f86193618d49435 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,46 @@
-all:
-       exit
+EMACS = emacs
+CASK = EMACS=${EMACS} cask
+DEPENDENCIES = .cask/
 
-test:
-       node_modules/.bin/mocha
-       emacs -batch -l ert -l test/context-coloring-test.el -f ert-run-tests-batch-and-exit
+all: uncompile compile test
 
-benchjs:
-       node_modules/.bin/matcha
+bench: ${DEPENDENCIES}
+       ${CASK} exec ${EMACS} -Q \
+       -L . \
+       -l context-coloring \
+       -l benchmark/context-coloring-benchmark.el \
+       -f context-coloring-benchmark-run
 
-benchel:
-       emacs -Q -l context-coloring.el -l benchmark/scenarios.el
+compile: ${DEPENDENCIES}
+       ${CASK} exec ${EMACS} -Q -batch \
+       -L . \
+       -f batch-byte-compile *.el
 
-.PHONY: all test benchmark
+uncompile:
+       rm -f *.elc
+
+clean: uncompile
+       rm -rf ${DEPENDENCIES}
+
+${DEPENDENCIES}:
+       ${CASK}
+
+test: ${DEPENDENCIES}
+       ${CASK} exec ${EMACS} -Q -batch \
+       -L . \
+       -l ert \
+       -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
+
+cover: ${DEPENDENCIES}
+       ${CASK} exec ${EMACS} -Q -batch \
+       -L . \
+       -l ert \
+       -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 compile uncompile clean test cover