-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (41 loc) · 1.31 KB
/
Makefile
File metadata and controls
54 lines (41 loc) · 1.31 KB
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
# Makefile for org-weekly-schedule -*- makefile-gmake -*-
#
# Targets:
# make — byte-compile the package
# make test — run the ERT test suite in batch mode
# make lint — byte-compile with extra warnings (acts as a linter)
# make clean — remove compiled .elc files
# make all — compile, then test
#
# Override EMACS on the command line to use a different Emacs binary:
# make EMACS=/path/to/emacs test
EMACS ?= emacs
BATCH = $(EMACS) -Q --batch
# Source and test files
SRC = org-weekly-schedule.el
TEST = org-weekly-schedule-test.el
ELC = $(SRC:.el=.elc)
.PHONY: all compile test lint clean
all: compile test
# ---- Byte-compile --------------------------------------------------------
compile: $(ELC)
%.elc: %.el
$(BATCH) \
--eval '(setq byte-compile-error-on-warn nil)' \
-f batch-byte-compile $<
# ---- Run tests -----------------------------------------------------------
test:
$(BATCH) \
-L . \
-l $(SRC) \
-l $(TEST) \
-f ert-run-tests-batch-and-exit
# ---- Lint (strict byte-compile) ------------------------------------------
lint:
$(BATCH) \
--eval '(setq byte-compile-error-on-warn t)' \
-f batch-byte-compile $(SRC)
@rm -f $(ELC)
# ---- Clean ---------------------------------------------------------------
clean:
rm -f $(ELC)