]> git.donarmstrong.com Git - lib.git/blob - emacs_el/configuration/Makefile
build org files
[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 ifeq ($(strip $(WHICH_EMACS)),)
8 ELC_FILES=$(patsubst %.el,%.elc,$(wildcard *.el)) $(patsubsts %.org,%.elc,$(wildcard *.el))
9 endif
10
11 all: $(ELC_FILES)
12
13 EMACS=emacs
14
15 %.elc: %.el
16         $(EMACS) -q -no-site-file -L . -L .. --no-site-file -batch -f batch-byte-compile $<;
17
18 %.el: %.org
19         $(EMACS) -batch -q -no-site-file --visit $< --funcall org-babel-tangle
20
21
22 clean: 
23         rm -f *.elc
24
25 .PHONY: clean all
26