branch: elpa-admin
commit 42c5112529ae931e819663bc235309eee5276eca
Author: Stefan Monnier <[email protected]>
Commit: Stefan Monnier <[email protected]>
* GNUmakefile (%.elc): Don't depend on $(autoloads) since that causes
constant recompilation of everything.
(elcs): New target.
(all-in-place): Run elcs in a submake, after updating autoloads.
---
GNUmakefile | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/GNUmakefile b/GNUmakefile
index 5d45065..7f2061d 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -118,13 +118,16 @@ nbc_els := $(foreach el, $(extra_els), \
elcs := $(call SET-diff, $(naive_elcs), $(patsubst %.el, %.elc, $(nbc_els)))
# '(dolist (al (quote ($(patsubst %, "%", $(autoloads))))) (load
(expand-file-name al) nil t))'
-%.elc: %.el $(autoloads)
+%.elc: %.el
@echo 'EMACS -f batch-byte-compile $<'
@$(EMACS) --batch \
--eval "(setq package-directory-list '(\"$(abspath packages)\"))" \
--eval '(package-initialize)' \
-L $(dir $@) -f batch-byte-compile $<
+.PHONY: elcs
+elcs: $(elcs)
+
# Remove .elc files that don't have a corresponding .el file any more.
extra_elcs := $(call SET-diff, $(current_elcs), $(naive_elcs))
.PHONY: $(extra_elcs)
@@ -145,5 +148,7 @@ $(extra_elcs):; rm $@
# --eval '(setq d (with-current-buffer b (package-buffer-info)))' \
# --eval '(package-generate-description-file d "$(dir $@)")'
-
-all-in-place: $(extra_elcs) $(autoloads) $(elcs) # $(single_pkgs)
+.PHONY: all-in-place
+all-in-place: $(extra_elcs) $(autoloads) # $(single_pkgs)
+ # Do them in a sub-make, so that autoloads are done first.
+ $(MAKE) elcs