]> code.delx.au - gnu-emacs-elpa/blobdiff - Makefile
Don't byte compile development files.
[gnu-emacs-elpa] / Makefile
index 07313bbe58acaf9a9f12833f104eae6cbbbc92a3..4519b7073e74f17c3d7cbfe41e2d2c5c134af0f3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,29 +1,50 @@
-all: clean install compile test
+EMACS = emacs
+CASK = EMACS=${EMACS} cask
+DEPENDENCIES = .cask/
+SOURCE_FILES = \
+       context-coloring.el \
+       context-coloring-javascript.el \
+       context-coloring-emacs-lisp.el
 
-benchjs:
-       node_modules/.bin/matcha
+all: uncompile compile test
 
-benchel:
-       emacs -Q -L . \
+bench: ${DEPENDENCIES}
+       ${CASK} exec ${EMACS} -Q \
+       -L . \
        -l context-coloring \
-       -l benchmark/scenarios.el
+       -l context-coloring-benchmark \
+       -f context-coloring-benchmark-run
 
-compile:
-       emacs -Q -batch -f batch-byte-compile *.el
+compile: ${DEPENDENCIES}
+       ${CASK} exec ${EMACS} -Q -batch \
+       -L . \
+       -f batch-byte-compile ${SOURCE_FILES}
 
-clean:
-       rm -rf node_modules
-       rm *.elc
+uncompile:
+       rm -f *.elc
 
-install:
-       npm install
+clean: uncompile
+       rm -rf ${DEPENDENCIES}
 
-test:
-       node_modules/.bin/mocha
-       emacs -Q -batch -L . \
+${DEPENDENCIES}:
+       ${CASK}
+
+test: ${DEPENDENCIES}
+       ${CASK} exec ${EMACS} -Q -batch \
+       -L . \
        -l ert \
-       -l context-coloring \
-       -l test/context-coloring-test.el \
+       -l context-coloring-coverage \
+       -f context-coloring-coverage-ci-init \
+       -l context-coloring-test \
+       -f ert-run-tests-batch-and-exit
+
+cover: ${DEPENDENCIES}
+       ${CASK} exec ${EMACS} -Q -batch \
+       -L . \
+       -l ert \
+       -l context-coloring-coverage \
+       -f context-coloring-coverage-local-init \
+       -l context-coloring-test \
        -f ert-run-tests-batch-and-exit
 
-.PHONY: all benchjs benchel compile clean install test
+.PHONY: all bench compile uncompile clean test cover