>From 7670085e197cbf0b966232889acb760e5555f25c Mon Sep 17 00:00:00 2001 From: Jackson Ray Hamilton Date: Sun, 18 Dec 2016 11:53:54 -0800 Subject: [PATCH 1/1] Respect .elpaignore when determining files to byte-compile. --- GNUmakefile | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 7d6d100..ab81163 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -144,9 +144,23 @@ $(foreach al, $(autoloads), $(eval $(call RULE-srcdeps, $(al)))) \"$$(pwd)\")" # Put into elcs the set of elc files we need to keep up-to-date. -# I.e. one for each .el file except for the -pkg.el, the -autoloads.el, and -# the .el files that are marked "no-byte-compile". -els := $(call FILTER-nonsrc, $(wildcard packages/*/*.el)) +# I.e. one for each .el file in each package root, except for the -pkg.el, +# the -autoloads.el, the .el files that are marked "no-byte-compile", and +# files matching patterns in packages' .elpaignore files. +included_els := $(shell \ + for pt in packages/*; do \ + if [ -f "$${pt}/.elpaignore" ]; then \ + ignore="$${pt}/.elpaignore"; \ + else \ + ignore="/dev/null"; \ + fi; \ + if [ -d $$pt ]; then \ + tar -ch $$pt --exclude-vcs -X "$$ignore" \ + | tar --list \ + | grep '^[^/]*/[^/]*/[^/]*\.el$$'; \ + fi; \ + done) +els := $(call FILTER-nonsrc, $(included_els)) naive_elcs := $(patsubst %.el, %.elc, $(els)) current_elcs := $(wildcard packages/*/*.elc) -- 2.1.4