forked from dominiksta/mvtn.el
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
94 lines (81 loc) · 2.97 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
.SUFFIXES = .elc .el
EMACS = emacs
VERSION = 0.1
EL = mvtn.el \
mvtn-compat.el \
mvtn-file-helpers.el \
mvtn-link-buttons.el \
mvtn-tag-addons.el \
mvtn-templates.el \
mvtn-journal.el \
mvtn-backlink-buffer.el \
mvtn-ag.el \
mvtn-rg.el
TEST = test/mvtn-test.el \
test/mvtn-test-helpers.el \
test/mvtn-test-file-helpers.el \
test/mvtn-test-templates.el \
test/mvtn-test-journal.el \
test/mvtn-test-backlink-buffer.el \
test/mvtn-test-tag-addons.el
# ----------------------------------------------------------------------
# compile
# ----------------------------------------------------------------------
.el.elc:
$(EMACS) -batch -Q -L . -L test -f batch-byte-compile $<
default: compile
compile: $(EL:.el=.elc)
# ----------------------------------------------------------------------
# clean
# ----------------------------------------------------------------------
clean:
rm -rf *.elc test/*.elc test/test-notes *.tar mvtn-package/
# ----------------------------------------------------------------------
# dependencies
# ----------------------------------------------------------------------
mvtn.elc: mvtn-compat.el
mvtn-test.elc: mvtn.el test/mvtn-test-helpers.el
mvtn-test-file-helpers.elc: mvtn.el test/mvtn-test-helpers.el test/mvtn-test.el
mvtn-test-tag-addons.elc: mvtn.el test/mvtn-test-helpers.el test/mvtn-test.el
mvtn-test-templates.elc: mvtn.el mvtn-templates.el test/mvtn-test.el
mvtn-file-helpers.elc: mvtn.el
mvtn-journal.elc: mvtn.el
mvtn-ag.elc: mvtn.el
mvtn-rg.elc: mvtn.el
mvtn-link-buttons.el: mvtn.el
mvtn-templates.el: mvtn.el mvtn-file-helpers.el
mvtn-backlink-buffer.el: mvtn.el mvtn-link-buttons.el
# ----------------------------------------------------------------------
# unit tests
# ----------------------------------------------------------------------
test: compile
$(EMACS) -batch -Q -L . -L test \
$(addprefix -l ,$(TEST)) \
-f ert-run-tests-batch
# ----------------------------------------------------------------------
# load in default emacs
# ----------------------------------------------------------------------
run: compile
cd test && \
$(EMACS) -Q --debug-init -L .. -L . \
$(addprefix -l ,$(TEST)) \
--eval '(setq mvtn-note-directories mvtn-test-note-dirs)' \
--eval '(mvtn-test-with-testfiles t)' \
--eval '(find-file "mvtn-test.el")' \
--eval '(split-window)' \
--eval '(dired mvtn-test-note-dir)'
# ----------------------------------------------------------------------
# packaging
# ----------------------------------------------------------------------
mvtn-$(VERSION).tar: $(EL)
rm -rf mvtn-$(VERSION)/
mkdir mvtn-$(VERSION)/
cp $(EL) mvtn-$(VERSION)/
cp mvtn-pkg.el mvtn-$(VERSION)/
cp -r templates mvtn-$(VERSION)/
tar cf $@ mvtn-$(VERSION)
rm -rf mvtn-$(VERSION)/
package: mvtn-$(VERSION).tar
run-package: package
$(EMACS) -Q --debug-init \
--eval '(package-install-file "mvtn-$(VERSION).tar")'