Tom Willemse
7f5546870c
This stops Emacs complaining that some file is newer when the main config depends on it. I don’t add a make dependency between them because init.el doesn’t need to be recompiled when normal elisp files are changed. Only when macros are involved.
25 lines
757 B
Makefile
25 lines
757 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 $(AUTOLOADS_FILE)
|
|
|
|
%.el: %.org
|
|
$(call tangle,emacs-lisp)
|
|
|
|
%.elc: %.el
|
|
@echo -e "\e[31mELC\e[0m $<"
|
|
@$(EMACS) -batch \
|
|
-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/\")"
|