-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
45 lines (34 loc) · 1.12 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
export EMACS ?= emacs
export BATCH = --batch -q -l .emacs/init.el
ELS = $(wildcard *.el)
LINT_ELS = $(filter-out adafruit-wisdom.el-autoloads.el,$(ELS))
TESTS = $(wildcard test/*.el)
OBJECTS = $(ELS:.el=.elc)
BACKUPS = $(ELS:.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) -f elisp-lint-files-batch $(LINT_ELS) $(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) adafruit-wisdom.el-autoloads.el *~ coverage.json
cleanall: clean
rm -rf .emacs/elpa .emacs/.emacs-custom.el* .elpa