-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (31 loc) · 993 Bytes
/
Copy pathMakefile
File metadata and controls
40 lines (31 loc) · 993 Bytes
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
EMACS ?= emacs
# A space-separated list of required package names
DEPS = cl-lib magit dash s
INIT_PACKAGES="(progn \
(require 'package) \
(push '(\"melpa\" . \"https://melpa.org/packages/\") package-archives) \
(package-initialize) \
(dolist (pkg '(${DEPS})) \
(unless (package-installed-p pkg) \
(unless (assoc pkg package-archive-contents) \
(package-refresh-contents)) \
(package-install pkg))) \
(unless package-archive-contents (package-refresh-contents)) \
)"
EMACS_BATCH=${EMACS} -Q -batch --eval ${INIT_PACKAGES}
all: clean compile test
clean:
rm -f *.elc
compile: clean
${EMACS} -Q --eval ${INIT_PACKAGES} -L . -batch -f batch-byte-compile *.el
TEST_SELECTOR ?= t
test-unit:
@echo "---- Run unit tests"
@${EMACS_BATCH} \
-l gerrit-rest.el \
-l gerrit.el \
-l test/gerrit.el-test.el \
--eval "(ert-run-tests-batch-and-exit '${TEST_SELECTOR})" \
&& echo "OK"
test: test-unit
.PHONY: all compile clean package-lint test test-unit