]> git.donarmstrong.com Git - lib.git/blob - emacs_el/Makefile
only build elc files if emacs is installed
[lib.git] / emacs_el / Makefile
1 #!/usr/bin/make
2
3
4 WHICH_EMACS=
5
6 ELC_FILES=
7 ifneq ($(shell (which emacs >/dev/null 2>&1 || echo -n "fail") && echo -n "success"),"fail")
8 ELC_FILES=$(patsubst %.el,%.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 . --no-site-file -batch -f batch-byte-compile $<;
17
18 clean: 
19         rm -f *.elc
20
21 .PHONY: clean all
22