forked from joaotavora/eglot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (37 loc) · 983 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
36
37
38
39
40
41
42
43
44
45
46
### Makefile for EGLOT
###
# Variables
#
EMACS=emacs
SELECTOR=t
LOAD_PATH=-L .
ELFILES := eglot.el eglot-tests.el
ELCFILES := $(ELFILES:.el=.elc)
ELPADEPS ?=--eval '(package-initialize)' \
--eval '(package-refresh-contents)' \
--eval '(package-install (quote jsonrpc))' \
--eval '(package-install \
(cadr (assoc (quote flymake) \
package-archive-contents)))'
all: compile
# Compilation
#
%.elc: %.el
$(EMACS) -Q $(ELPADEPS) $(LOAD_PATH) --batch -f batch-byte-compile $<
compile: $(ELCFILES)
# Automated tests
#
eglot-check: compile
$(EMACS) -Q --batch \
$(ELPADEPS) \
$(LOAD_PATH) \
-l eglot \
-l eglot-tests \
--eval '(setq ert-batch-backtrace-right-margin 200)' \
--eval '(ert-run-tests-batch-and-exit (quote $(SELECTOR)))'
check: eglot-check
# Cleanup
#
clean:
find . -iname '*.elc' -exec rm {} \;
.PHONY: all compile clean check