]> code.delx.au - gnu-emacs-elpa/blobdiff - Makefile
Don't byte compile development files.
[gnu-emacs-elpa] / Makefile
index f5e8b7117de934d11b195fdef8b631b66b816fdd..4519b7073e74f17c3d7cbfe41e2d2c5c134af0f3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,2 +1,50 @@
-test:
-       emacs -batch -l ert -l context-coloring-test.el -f ert-run-tests-batch-and-exit
+EMACS = emacs
+CASK = EMACS=${EMACS} cask
+DEPENDENCIES = .cask/
+SOURCE_FILES = \
+       context-coloring.el \
+       context-coloring-javascript.el \
+       context-coloring-emacs-lisp.el
+
+all: uncompile compile test
+
+bench: ${DEPENDENCIES}
+       ${CASK} exec ${EMACS} -Q \
+       -L . \
+       -l context-coloring \
+       -l context-coloring-benchmark \
+       -f context-coloring-benchmark-run
+
+compile: ${DEPENDENCIES}
+       ${CASK} exec ${EMACS} -Q -batch \
+       -L . \
+       -f batch-byte-compile ${SOURCE_FILES}
+
+uncompile:
+       rm -f *.elc
+
+clean: uncompile
+       rm -rf ${DEPENDENCIES}
+
+${DEPENDENCIES}:
+       ${CASK}
+
+test: ${DEPENDENCIES}
+       ${CASK} exec ${EMACS} -Q -batch \
+       -L . \
+       -l ert \
+       -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 bench compile uncompile clean test cover