]> git.donarmstrong.com Git - lib.git/blobdiff - emacs_el/configuration/Makefile
use expand-region and bind it to C-=
[lib.git] / emacs_el / configuration / Makefile
index fad2b3df27193d99047ed05b2df5de6bf0ebbe52..411771e785102962af7030c06d1fc49921491c08 100644 (file)
@@ -4,19 +4,28 @@
 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)) $(patsubsts %.org,%.elc,$(wildcard *.el))
+ORG_EL_FILES=don-configuration.el
+ORG_ELC_FILES=don-configuration.elc
 endif
 
-all: $(ELC_FILES)
+LIB_PATH=
+
+all: $(ORG_ELC_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 \"$<\")"
 
-%.el: %.org
-       $(EMACS) -batch -q -no-site-file --visit $< --funcall org-babel-tangle
+$(ORG_EL_FILES): %.el: %.org install_packages
+       $(EMACS) --batch -q --no-site-file --visit $< --funcall org-babel-tangle
 
 
 clean: