summaryrefslogtreecommitdiff
blob: e2b75142f11f6fcb4c6586b539d8f6ff75caf9f8 (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
28
29
PWD         := $(shell pwd)

ELS          = $(wildcard $(PWD)/*.el)
ELCS         = $(ELS:.el=.elc)

EMACS       := emacs
RM          := rm -f

EMACFLAGS   := --batch -q --no-site-file -L $(PWD)
EMACSCMD     = $(EMACS) $(EMACFLAGS)


.PHONY: all
all: clean compile

.PHONY: clean
clean:
	$(RM) $(ELCS)

%.elc:
	$(EMACSCMD) --eval "(byte-compile-file \"$(*).el\" 0)"

.PHONY: compile-snippets
compile-snippets:
	$(EMACS) --script $(PWD)/scripts/compile-snippets.el

.PHONY: compile
compile: $(ELCS)
compile: compile-snippets