summaryrefslogtreecommitdiff
path: root/archive/.emacs.d/Makefile
blob: f8401614f45704cf0c33f2b7ba2098ec8bc07549 (plain)
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
ELC := $(filter-out init.elc,$(patsubst %.el,%.elc,$(wildcard *.el */*.el)))

EMACSOPT := --eval '(add-to-list (quote load-path) (concat user-emacs-directory "site-lisp"))'
EMACSOPT += --eval '(add-to-list (quote load-path) (concat user-emacs-directory "initlibs") t)'
EMACSOPT += -l package -f package-initialize

.PHONY: all
all: $(ELC)

# permit the use and setting of undeclared variables and functions: this is
# appropriate for user init files, I think, though not for arbitrary .el libs
# under ~/.emacs.d
init-%.elc: init-%.el
	emacs -batch $(EMACSOPT) \
		--eval '(setq byte-compile-warnings (quote (not free-vars unresolved)))' \
		-f batch-byte-compile $<
notmuch-groups.elc: notmuch-groups.el
	emacs -batch $(EMACSOPT) \
		--eval '(setq byte-compile-warnings (quote (not free-vars)))' \
		-f batch-byte-compile $<

%.elc: %.el
	emacs -batch $(EMACSOPT) -f batch-byte-compile $<

.PHONY: clean
clean:
	rm -f $(ELC)