]> git.donarmstrong.com Git - lib.git/blobdiff - emacs_el/configuration/Makefile
build org files
[lib.git] / emacs_el / configuration / Makefile
index b85c3cc588282a4e76dfcfe70235d1281a728f62..fad2b3df27193d99047ed05b2df5de6bf0ebbe52 100644 (file)
@@ -5,7 +5,7 @@ WHICH_EMACS:=$(shell which emacs >/dev/null 2>&1 || echo "fail")
 
 ELC_FILES=
 ifeq ($(strip $(WHICH_EMACS)),)
-ELC_FILES=$(patsubst %.el,%.elc,$(wildcard *.el))
+ELC_FILES=$(patsubst %.el,%.elc,$(wildcard *.el)) $(patsubsts %.org,%.elc,$(wildcard *.el))
 endif
 
 all: $(ELC_FILES)
@@ -13,7 +13,11 @@ all: $(ELC_FILES)
 EMACS=emacs
 
 %.elc: %.el
-       $(EMACS) -q -no-site-file -L . --no-site-file -batch -f batch-byte-compile $<;
+       $(EMACS) -q -no-site-file -L . -L .. --no-site-file -batch -f batch-byte-compile $<;
+
+%.el: %.org
+       $(EMACS) -batch -q -no-site-file --visit $< --funcall org-babel-tangle
+
 
 clean: 
        rm -f *.elc