-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
-benchmark:
- 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
-.PHONY: all test benchmark
+compile: ${DEPENDENCIES}
+ ${CASK} exec ${EMACS} -Q -batch \
+ -L . \
+ -f batch-byte-compile *.el
+
+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