-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
58 lines (50 loc) · 1.34 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
EMACS ?= emacs
package_files := $(wildcard *.el)
test_files := $(wildcard test/*.el)
package_lint := ~/package-lint/package-lint.el
.PHONY: all
all: compile checkdoc lint test itest
.PHONY: compile
compile:
@for file in $(package_files); do \
echo "[compile] $$file" ;\
$(EMACS) -Q --batch -L . -L stub \
--eval "(setq byte-compile-error-on-warn t)"\
-f batch-byte-compile $$file;\
done
.PHONY: checkdoc
checkdoc:
@for file in $(package_files); do \
echo "[checkdoc] $$file" ;\
$(EMACS) -Q --batch \
--eval "(setq sentence-end-double-space nil)" \
--eval "(checkdoc-file \"$$file\")" \
--eval "(when (get-buffer \"*Warnings*\") (kill-emacs 1))" ;\
done
.PHONY: lint
lint:
@for file in $(package_files); do \
echo "[package-lint] $$file" ;\
$(EMACS) -Q --batch \
-l $(package_lint) \
--eval "(defalias 'package-lint--check-packages-installable #'ignore)" \
-f package-lint-batch-and-exit $$file ;\
done
.PHONY: test
test:
@for file in $(test_files); do \
echo "[ert-test] $$file" ;\
$(EMACS) -Q --batch -L . -L stub \
-l $$file \
-f ert-run-tests-batch-and-exit ;\
done
.PHONY: itest
itest:
@if emacsclient -a false -e 't' 1>/dev/null 2>/dev/null; then \
echo "[interactive-test]" ;\
emacsclient --eval "(load-file \"test/frog-menu-test.el\")" ;\
fi
.PHONY: clean
clean:
@echo "[clean]" *.elc
@rm -f *.elc