-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
49 lines (38 loc) · 1.34 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
export EMACS ?= emacs
export BATCH = --batch -q -l .emacs/init.el
ELS = $(filter-out geolocation-autoloads.el,$(wildcard *.el))
TESTS = $(wildcard test/*.el)
OBJECTS = $(ELS:.el=.elc)
BACKUPS = $(ELS:.el=.el~) $(TESTS:.el=.el~)
.PHONY: version lint test clean cleanelpa
.elpa:
mkdir -p .emacs/elpa/gnupg && \
chmod 700 .emacs/elpa/gnupg && \
echo "disable-ipv6" > .emacs/elpa/gnupg/dirmngr.conf && \
for i in {1..3}; do \
gpg --keyserver keyserver.ubuntu.com \
--homedir .emacs/elpa/gnupg \
--recv-keys 066DAFCB81E42C40 \
&& break || sleep 15; \
done
$(EMACS) $(BATCH)
touch .elpa
version: .elpa
$(EMACS) $(BATCH) --version
lint: .elpa
$(EMACS) $(BATCH) -l geolocation.el -f elisp-lint-files-batch $(ELS)
$(EMACS) $(BATCH) -l geolocation.el -f elisp-lint-files-batch \
--no-byte-compile \
--no-package-lint \
--no-checkdoc \
--no-check-declare $(TESTS)
test: .elpa
$(EMACS) $(BATCH) -f buttercup-run-discover
coverage.json: .elpa $(ELS) $(TESTS)
UNDERCOVER_FORCE=1 $(EMACS) $(BATCH) -f buttercup-run-discover
submit-coverage: coverage.json
curl -s https://codecov.io/bash | bash -s - -f coverage.json
clean:
rm -f $(OBJECTS) $(BACKUPS) geolocation-autoloads.el* coverage.json
cleanall: clean
rm -rf .emacs/elpa .emacs/quelpa .emacs/.emacs-custom.el* .elpa