]> code.delx.au - gnu-emacs-elpa/blobdiff - Makefile
Add predicate option for dispatches.
[gnu-emacs-elpa] / Makefile
index c50712bcc449881e6c014f005b3738634c5ee739..dfa219dc75b5a0a94e7cc4682f7f3510b5f6b411 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,31 +1,52 @@
 EMACS = emacs
+CASK = EMACS=${EMACS} cask
+DEPENDENCIES = .cask/
+SCOPIFIER_PORT = $$(lsof -t -i :6969)
+KILL_SCOPIFIER = if [ -n "${SCOPIFIER_PORT}" ]; then kill ${SCOPIFIER_PORT}; fi
 
-all: clean compile test
+all: uncompile compile test
 
-bench:
-       ${EMACS} -Q \
+bench: ${DEPENDENCIES}
+       ${CASK} exec ${EMACS} -Q \
        -L . \
-       -L lib \
        -l context-coloring \
-       -l benchmark/context-coloring-benchmark \
+       -l benchmark/context-coloring-benchmark.el \
        -f context-coloring-benchmark-run
 
-compile:
-       ${EMACS} -Q -batch \
-       -L lib \
-       -f batch-byte-compile *.el lib/*.el
+compile: ${DEPENDENCIES}
+       ${CASK} exec ${EMACS} -Q -batch \
+       -L . \
+       -f batch-byte-compile *.el
+
+uncompile:
+       rm -f *.elc
+
+clean: uncompile
+       rm -rf ${DEPENDENCIES}
 
-clean:
-       rm -f *.log benchmark/*.log *.elc lib/*.elc
+${DEPENDENCIES}:
+       ${CASK}
 
-test:
-       ${EMACS} -Q -batch \
+test: ${DEPENDENCIES}
+       ${KILL_SCOPIFIER}
+       ${CASK} exec ${EMACS} -Q -batch \
        -L . \
-       -L lib \
        -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
+
+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 compile clean test
+.PHONY: all bench compile uncompile clean test cover