aboutsummaryrefslogtreecommitdiff
blob: 9d46c46cb69e24a09d90c78982dccd6ae112ae64 (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
30
31
32
33
34
35
36
PWD         := $(shell pwd)

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

EMACS       := emacs
RM          := rm -f
SH          := sh

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

.PHONY: eldev-install
eldev-install:
	$(MAKE) -B clean
	$(MAKE) -B $(ELCS)
	$(SH) $(PWD)/scripts/eldev-install.sh