dotfiles/emacs/.emacs.d/GNUmakefile
2016-10-20 16:18:26 +02:00

26 lines
821 B
Makefile

include ../../dotfiles.mk
AUTOLOADS_FILE = site-lisp/site-autoloads.el
UNWANTED = $(AUTOLOADS_FILE) site-lisp/flycheck_% site-lisp/flycheck-%
SITE_LISPS = $(addsuffix c,$(filter-out $(UNWANTED),$(wildcard site-lisp/*.el)))
INIT_LISPS = $(addsuffix .elc,$(basename $(wildcard init/*.org)))
all: $(SITE_LISPS) init.elc $(INIT_LISPS) $(AUTOLOADS_FILE)
%.el: %.org
$(call tangle,emacs-lisp)
%.elc: %.el
@echo -e "\e[31mELC\e[0m $<"
@$(EMACS) -batch \
-directory "$(HOME)/.emacs.d/site-lisp" \
-eval "(package-initialize)" \
-eval "(byte-compile-file \"$<\")"
### Site Lisp
$(AUTOLOADS_FILE): $(SITE_LISPS)
@echo -e "\e[32mGEN\e[0m $@"
@$(EMACS) -batch \
-eval "(setq generated-autoload-file \"$(CURDIR)/$@\")" \
-eval "(update-directory-autoloads \"$(CURDIR)/site-lisp/\")"