]> git.donarmstrong.com Git - lib.git/blob - emacs_el/configuration/Makefile
f119086b2ca14fedcd31dedb1a8ea40580bfa916
[lib.git] / emacs_el / configuration / Makefile
1 #!/usr/bin/make
2
3
4 WHICH_EMACS:=$(shell which emacs >/dev/null 2>&1 || echo "fail")
5
6 ELC_FILES=
7 EL_FILES=
8 ORG_EL_FILES=
9 ifeq ($(strip $(WHICH_EMACS)),)
10 ORG_EL_FILES=$(patsubst %.org,%.el,$(wildcard *.org))
11 EL_FILES=$(sort $(wildcard *.el) $(ORG_EL_FILES))
12 ELC_FILES=$(patsubst %.el,%.elc,$(EL_FILES))
13 endif
14
15 LIB_PATH=-L . -L .. -L ../helm
16
17 all: $(ORG_EL_FILES)
18
19 EMACS=emacs
20
21 $(ELC_FILES): %.elc: %.el
22         $(EMACS) -batch -q -no-site-file $(LIB_PATH) --no-site-file --eval '(byte-recompile-directory "." 0)'
23
24 $(ORG_EL_FILES): %.el: %.org
25         $(EMACS) -batch -q -no-site-file --visit $< --funcall org-babel-tangle
26
27
28 clean: 
29         rm -f *.elc
30
31 .PHONY: clean all
32