forked from KeyWeeUsr/org-epa-gpg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (40 loc) · 1019 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
47
48
EMACS := emacs
.PHONY: all
all: test
.PHONY: clean
clean:
@-rm org-epa-gpg*.elc 2>/dev/null
@-rm org-epa-gpg*.ok 2>/dev/null
%.elc: %.el
@-rm "$@" 2>/dev/null
@$(EMACS) --batch --quick \
--directory . \
--load compile-setup \
--eval '(byte-compile-file "$(subst .elc,.el,$@)")' \
&& test -f "$@"
.PHONY: byte-compile
byte-compile: \
org-epa-gpg.elc \
org-epa-gpg-tests.elc
.PHONY: test
test: lint-makefile byte-compile main-tests
org-epa-gpg-tests.ok: org-epa-gpg.elc org-epa-gpg-tests.elc
$(EMACS) --batch --quick \
--directory . \
--load org-epa-gpg-tests.el \
--funcall ert-run-tests-batch-and-exit \
&& touch org-epa-gpg-tests.ok
main-tests: org-epa-gpg-tests.ok
Makefile.ok: Makefile
@make -n all
@docker run \
--network=none \
--volume "$(PWD)"/Makefile:/Makefile \
backplane/checkmake /Makefile
lint-makefile: Makefile.ok
.PHONY: tag
tag:
$(MAKE) all
git add -f . && git stash
@grep ";; Version:" org-epa-gpg.el | tee /dev/stderr | grep "$(TAG)"
@git tag "$(TAG)" --sign