forked from redguardtoo/emacs.d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (24 loc) · 961 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
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 "init-(hydra|evil).el:.*Warning: docstring wider than 80 characters|an obsolete" | 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