]> git.donarmstrong.com Git - lib.git/blobdiff - emacs_el/configuration/Makefile
switch to using straight from package; don't byte compile
[lib.git] / emacs_el / configuration / Makefile
index a249abf2bf0c4d920155835e2398dcdda2011411..5238ae628ec0532e45d7f59fa3917e127b0f60f5 100644 (file)
@@ -4,16 +4,30 @@
 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=don-configuration.el
+# Disable byte compilation for now
+# ORG_ELC_FILES=don-configuration.elc
 endif
 
-all: $(ELC_FILES)
+LIB_PATH=
+
+all: $(ORG_EL_FILES)
 
 EMACS=emacs
 
-%.elc: %.el
-       $(EMACS) -q -no-site-file -L . -L .. --no-site-file -batch -f batch-byte-compile $<;
+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