-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
35 lines (29 loc) · 927 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
.PHONY: all build tests clean
TEST_DIR=tests
EMACS=emacs
EMACS_CLEAN=-Q
EMACS_BATCH=$(EMACS_CLEAN) --batch
EMACS_LOAD_DEPENDENCIES=(setq package-enable-at-startup nil) \
(defvar package-load-list '((lv t) \
(hydra t) \
(el-mock t))) \
(package-initialize)
all : build tests
build :
$(EMACS) $(EMACS_BATCH) \
--eval "(progn \
$(EMACS_LOAD_DEPENDENCIES) \
(setq byte-compile-error-on-warn t) \
(batch-byte-compile))" *.el
tests :
@cd '$(TEST_DIR)' && \
(for test in *-tests.el; do \
$(EMACS) $(EMACS_BATCH) -L . -L .. \
--eval "(progn \
$(EMACS_LOAD_DEPENDENCIES))" \
-l cl \
-l "$$test" \
-f "ert-run-tests-batch-and-exit"; \
done)
clean :
@rm -f *.elc