summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2024-03-23 21:00:13 +0100
committerJonas Bernoulli <jonas@bernoul.li>2024-03-23 21:00:13 +0100
commit9315f49f2f4446ee0660206052e5324ae3df4526 (patch)
tree8ee93c705fbeb16536f8b3ff824c7ae2641fd1d8 /Makefile
parent2aaf14c414d425ff28c72530786b958eb1777e15 (diff)
Add tests
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 1840add..9c90e5b 100644
--- a/Makefile
+++ b/Makefile
@@ -3,8 +3,12 @@
PKG = llama
ELS = $(PKG).el
+ELS += $(PKG)-test.el
ELCS = $(ELS:.el=.elc)
+$(PKG).elc:
+$(PKG)-test.elc: $(PKG).elc
+
DEPS =
EMACS ?= emacs
@@ -19,6 +23,7 @@ help:
$(info make all - generate byte-code and autoloads)
$(info make lisp - generate byte-code and autoloads)
$(info make redo - re-generate byte-code and autoloads)
+ $(info make test - run tests)
$(info make clean - remove generated files)
@printf "\n"
@@ -37,6 +42,10 @@ check-declare:
@$(EMACS) -Q --batch $(EMACS_ARGS) $(LOAD_PATH) \
--eval "(check-declare-directory default-directory)"
+test: lisp
+ @$(EMACS) -Q --batch $(EMACS_ARGS) $(LOAD_PATH) \
+ -l ert -l $(PKG)-test.el -f ert-run-tests-batch-and-exit
+
CLEAN = $(ELCS) $(PKG)-autoloads.el
clean: