-
Notifications
You must be signed in to change notification settings - Fork 616
/
Makefile
31 lines (24 loc) · 1.1 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
SHELL = /bin/sh
EMACS ?= emacs
PROFILER =
RM = @rm -rf
EMACS_BATCH_OPTS = --batch -Q --debug-init --eval "(setq my-disable-idle-timer t)"
.PHONY: test clean githooks spellcheck compile install
# Delete byte-compiled files etc.
clean:
$(RM) *~
$(RM) \#*\#
$(RM) *.elc
$(RM) lisp/*.elc
githooks:
cd `git rev-parse --show-toplevel`/.git/hooks && ln -s ../../githooks/pre-commit pre-commit && cd -
install: clean
@$(EMACS) $(EMACS_BATCH_OPTS) -l init.el
# Delete byte-compiled files etc.
spellcheck:
@$(EMACS) $(EMACS_BATCH_OPTS) -L site-lisp/wucuo -l site-lisp/wucuo/wucuo.el -l tools/spellcheck.el
compile: install
@$(EMACS) $(EMACS_BATCH_OPTS) -l init.el -l tests/my-byte-compile.el 2>&1 | grep -Ev "docstring wider than 80 characters|an obsolete|wrong usage of unescaped single quotes|Doc string after .declare.|doc-view.*is not known|Warning: Unused lexical argument|Warning: the function .pdf-isearch|Warning: the function .my-org-leader-def." | grep -E "[0-9]: ([Ee]rror|[Ww]arning):" && exit 1 || exit 0
# Run tests.
test: compile spellcheck
@$(EMACS) $(EMACS_BATCH_OPTS) -l init.el -l tests/emacs.d-test.el