-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
53 lines (45 loc) · 1.52 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
export EMACS ?= $(shell command -v emacs 2>/dev/null)
CASK_DIR := $(shell cask package-directory)
files = $$(cask files | grep -Ev 'difftastic-(pkg|autoloads).el')
test_files = $(wildcard test/difftastic*.t.el)
$(CASK_DIR): Cask
cask install
@touch $(CASK_DIR)
.PHONY: cask
cask: $(CASK_DIR)
.PHONY: bytecompile
bytecompile: cask
cask emacs -batch -L . -L test \
--eval "(setq byte-compile-error-on-warn t)" \
-f batch-byte-compile $(files) $(test_files)
(ret=$$? ; cask clean-elc ; rm -f test/*.elc ; exit $$ret)
.PHONY: lint
lint: cask
cask emacs -batch -L . \
--load package-lint \
--eval '(setq package-lint-main-file "difftastic.el")' \
--funcall package-lint-batch-and-exit $(files)
.PHONY: relint
relint: cask
cask emacs -batch -L . -L test \
--load relint \
--funcall relint-batch $(files) $(test_files)
.PHONY: checkdoc
checkdoc: cask
cask emacs -batch -L . \
--load checkdoc-batch \
--funcall checkdoc-batch $(files)
.PHONY: test
test: cask
cask emacs -batch \
$(foreach test_file,$(test_files),--load $(test_file)) \
--eval "(setq print-level 50 \
eval-expression-print-level 50 \
eval-expression-print-length 1000 \
edebug-print-level 50 \
edebug-print-length 1000 \
ert-batch-print-level 50 \
ert-batch-print-length 1000 \
ert-batch-backtrace-line-length 1000 \
ert-batch-backtrace-right-margin 1000)" \
--funcall ert-run-tests-batch-and-exit