X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=emacs_el%2Fconfiguration%2FMakefile;h=667985fced378caa5f4efaa1d2f4380a831c72b0;hb=5568b67a3f7f122b8fe0b0b923c8c003c6c0acba;hp=b85c3cc588282a4e76dfcfe70235d1281a728f62;hpb=dcdee75b622e5c4760b657e6db400195000d2d45;p=lib.git diff --git a/emacs_el/configuration/Makefile b/emacs_el/configuration/Makefile index b85c3cc..667985f 100644 --- a/emacs_el/configuration/Makefile +++ b/emacs_el/configuration/Makefile @@ -4,16 +4,27 @@ WHICH_EMACS:=$(shell which emacs >/dev/null 2>&1 || echo "fail") ELC_FILES= +EL_FILES= +ORG_EL_FILES= ifeq ($(strip $(WHICH_EMACS)),) -ELC_FILES=$(patsubst %.el,%.elc,$(wildcard *.el)) +ORG_EL_FILES=$(patsubst %.org,%.el,$(wildcard *.org)) +ORG_ELC_FILES=$(patsubst %.org,%.elc,$(wildcard *.org)) +EL_FILES=$(sort $(wildcard *.el) $(ORG_EL_FILES)) +ELC_FILES=$(patsubst %.el,%.elc,$(EL_FILES)) endif -all: $(ELC_FILES) +LIB_PATH=-L . -L .. -L ../helm + +all: $(ORG_ELC_FILES) EMACS=emacs -%.elc: %.el - $(EMACS) -q -no-site-file -L . --no-site-file -batch -f batch-byte-compile $<; +$(ELC_FILES): %.elc: %.el + $(EMACS) -batch -q -no-site-file $(LIB_PATH) --no-site-file --eval '(byte-recompile-directory "." 0)' + +$(ORG_EL_FILES): %.el: %.org + $(EMACS) -batch -q -no-site-file --visit $< --funcall org-babel-tangle + clean: rm -f *.elc