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)
%.elc: %.el
$(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