forked from Emacs-D-Mode-Maintainers/Emacs-D-Mode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
32 lines (23 loc) · 1009 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
emacs ?= emacs
all: test
test: test-source test-compiled
test-source: clean
cask exec emacs -Q -batch -l d-mode-test.el -l d-mode.el -f ert-run-tests-batch-and-exit
test-compiled: compile
D_MODE_NO_COVERAGE=1 cask exec emacs -Q -batch -l d-mode-test.el -l d-mode.elc -f ert-run-tests-batch-and-exit
# Generate a coverage report viewable in Emacs.
coverage: clean
rm -f d-mode.elc
D_MODE_COVERAGE=1 cask exec emacs -Q -batch -l d-mode-test.el -l d-mode.el -f ert-run-tests-batch-and-exit
compile:
$(emacs) -Q -batch --eval '(setq byte-compile-error-on-warn t)' -f batch-byte-compile d-mode.el
clean:
rm -f d-mode.elc
find tests -name '*.res.*' -delete
# Show just the differences between the actual and expected results.
test-diff:
for f in tests/*.res.* ; do diff --color -u "$${f/.res/}" "$$f" ; done
# Accept any mismatching actual output as the expected output.
test-accept:
for f in tests/*.res.* ; do mv "$$f" "$${f/.res/}" ; done
.PHONY: all test compile clean test-diff test-accept