#!/usr/bin/make WHICH_EMACS:=$(shell which emacs >/dev/null 2>&1 || echo "fail") ELC_FILES= EL_FILES= ORG_EL_FILES= ifeq ($(strip $(WHICH_EMACS)),) ORG_EL_FILES=don-configuration.el # Disable byte compilation for now # ORG_ELC_FILES=don-configuration.elc endif LIB_PATH= all: $(ORG_EL_FILES) EMACS=emacs install_packages: install_packages.el $(EMACS) --batch -q --no-site-file $(LIB_PATH) -l install_packages.el && \ touch $@ $(ORG_ELC_FILES): %.elc: %.el install_packages $(EMACS) --batch -q --no-site-file $(LIB_PATH) $(USE_PACKAGE) --eval "(byte-compile-file \"$<\")" $(ORG_EL_FILES): %.el: %.org install_packages $(EMACS) --batch -q --no-site-file --visit $< --funcall org-babel-tangle clean: rm -f *.elc .PHONY: clean all