-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
42 lines (29 loc) · 797 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
emacs ?= emacs
ert_tests_el = $(wildcard test/*.el)
el = $(wildcard *.el)
elc = $(el:%.el=%.elc)
.PHONY: all test test-ert build
all:
test: build test-ert info
build: $(elc)
$(elc): %.elc: %.el
$(emacs) -batch -Q -f batch-byte-compile $<
test-ert: $(ert_tests_el)
$(emacs) -batch -Q -L . --eval "(require 'ert)" $(^:%=-l "%") \
-f ert-run-tests-batch-and-exit
elisp_get_file_package_info := \
(lambda (f) \
(with-temp-buffer \
(insert-file-contents-literally f) \
(package-buffer-info)))
elisp_print_infos := \
(mapc \
(lambda (f) \
(message \"Loading info: %s\" f) \
(message \"%S\" (funcall $(elisp_get_file_package_info) f))) \
command-line-args-left)
info: $(el)
$(emacs) -batch -Q \
--eval "(require 'package)" \
--eval "$(elisp_print_infos)" \
$^