X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=emacs_el%2FMakefile;h=62296bc1e719edfdee3c711edd2260d99d264951;hb=5568b67a3f7f122b8fe0b0b923c8c003c6c0acba;hp=14ee7a20a64f3ee797edc5d60396e86f9e404b48;hpb=73b41aa61352234aa47ceda2198d0436b38179b0;p=lib.git diff --git a/emacs_el/Makefile b/emacs_el/Makefile index 14ee7a2..62296bc 100644 --- a/emacs_el/Makefile +++ b/emacs_el/Makefile @@ -1,12 +1,33 @@ #!/usr/bin/make -all: $(patsubst %.el,%.elc,$(wildcard *.el)) + +WHICH_EMACS:=$(shell which emacs >/dev/null 2>&1 || echo "fail") + +ELC_FILES= +ifeq ($(strip $(WHICH_EMACS)),) +ELC_FILES=$(patsubst %.el,%.elc,$(wildcard *.el)) +endif + +SUBDIRS= +LIBOPTS=-L . +ifeq ($(strip $(WHICH_EMACS)),) +SUBDIRS=configuration org-ref +LIBDIRS=-L . +endif + + +all: $(ELC_FILES) $(SUBDIRS) + +EMACS=emacs + +$(SUBDIRS): %: + $(MAKE) -C $@ %.elc: %.el - emacs -q -no-site-file --no-site-file -batch -f batch-byte-compile $<; + $(EMACS) -q -no-site-file $(LIBDIRS) --no-site-file -batch -f batch-byte-compile $<; clean: rm -f *.elc -.PHONY: clean all +.PHONY: clean all $(SUBDIRS)