-
Notifications
You must be signed in to change notification settings - Fork 71
/
Makefile
75 lines (63 loc) · 2.01 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Makefile for idris-mode, to run tests and ensure dependencies are in order
# Portions based on the Makefile for Proof General
EMACS ?= emacs
NEED_PKGS=prop-menu flycheck
BATCHEMACS=$(EMACS) --batch --no-site-file -q \
-eval '(add-to-list (quote load-path) "${PWD}/")' \
-eval '(require (quote package))' \
-eval '(add-to-list (quote package-archives) (quote ("melpa" . "http://melpa.org/packages/")) t)' \
-eval '(package-initialize)'
BYTECOMP = $(BATCHEMACS) \
-eval '(require (quote bytecomp))' \
-eval '(setq byte-compile-warnings t)' \
-eval '(setq byte-compile-error-on-warn t)' \
-f batch-byte-compile
OBJS = idris-commands.elc \
idris-common-utils.elc \
idris-compat.elc \
idris-core.elc \
idris-events.elc \
idris-highlight-input.elc \
idris-info.elc \
idris-ipkg-mode.elc \
idris-keys.elc \
idris-log.elc \
idris-hole-list.elc \
idris-mode.elc \
idris-prover.elc \
idris-repl.elc \
idris-settings.elc \
idris-simple-indent.elc \
idris-tree-info.elc \
idris-syntax.elc \
idris-warnings.elc \
idris-warnings-tree.elc \
idris-xref.elc \
inferior-idris.elc \
flycheck-idris.elc
.el.elc:
$(BYTECOMP) $<
build: getdeps $(OBJS)
test: getdeps build
$(BATCHEMACS) -L . -l ert -l test/idris-tests.el -f ert-run-tests-batch-and-exit
test2: getdeps build
$(BATCHEMACS) -L . \
-eval '(setq idris-interpreter-path (executable-find "idris2"))' \
-l ert -l test/idris-tests.el -f ert-run-tests-batch-and-exit
clean:
-${RM} -f $(OBJS)
-${RM} -f test/test-data/*ibc
-${RM} -rf test/test-data/build/
-${RM} -r docs/auto docs/*.aux docs/*.log docs/*.pdf
getdeps:
$(BATCHEMACS) -eval \
"(let* \
((need-pkgs '($(NEED_PKGS))) \
(want-pkgs (seq-remove #'package-installed-p need-pkgs))) \
(unless (null want-pkgs) \
(package-initialize) \
(package-refresh-contents) \
(mapcar #'package-install want-pkgs)))"
docs: docs/documentation.tex
-@( cd docs/ && latexmk -xelatex documentation.tex )
.PHONY: clean build test getdeps docs