summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJames Nguyen <james@jojojames.com>2019-10-12 10:26:15 -0700
committerJames N <james@jojojames.com>2020-11-24 12:00:03 -0800
commiteff6f710efdaf44c3ea07b40c2c3c04875d2b97f (patch)
tree090f700671ff6e5c921f677f8fa82033e85659af /Makefile
parent04df79eadc952eaa9469094426b008426d3c5bee (diff)
Port over evil-magit
Diffstat (limited to 'Makefile')
-rwxr-xr-xMakefile28
1 files changed, 23 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index d436604..381885c 100755
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,21 @@
EMACS ?= emacs
+CASK ?= cask
+
+LOADPATH = -L .
+TESTPATH = -L ./test
+
+ELPA_DIR = \
+ .cask/$(shell $(EMACS) -Q --batch --eval '(princ emacs-version)')/elpa
compile:
- cask exec $(EMACS) -Q -batch \
+ $(CASK) exec $(EMACS) -Q -batch \
-L . \
--eval '(setq evil-want-integration nil)' \
--eval '(setq byte-compile-error-on-warn t)' \
-f batch-byte-compile *.el modes/*/*.el
lint:
- cask exec $(EMACS) -Q -batch \
+ $(CASK) exec $(EMACS) -Q -batch \
--eval "(require 'package)" \
--eval "(push '(\"melpa\" . \"http://melpa.org/packages/\") package-archives)" \
--eval "(package-initialize)" \
@@ -18,7 +25,18 @@ lint:
--eval "(advice-add 'package-lint--check-version-regexp-list :around 'ignore)" \
-f package-lint-batch-and-exit *.el modes/*/*.el
-test:
- cask exec ert-runner
+test: elpa
+ $(CASK) exec $(EMACS) -Q -batch $(LOADPATH) $(TESTPATH) \
+-l evil-collection-test.el -l evil-collection-magit-tests.el -f ert-run-tests-batch-and-exit
+
+magit-test: elpa
+ $(CASK) exec $(EMACS) -Q -batch $(LOADPATH) $(TESTPATH) \
+-l evil-collection-magit-tests.el -f ert-run-tests-batch-and-exit
+
+elpa: $(ELPA_DIR)
+$(ELPA_DIR): Cask
+ $(CASK) install
+ mkdir -p $(ELPA_DIR)
+ touch $@
-.PHONY: compile lint test
+.PHONY: compile lint test elpa