aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadon Rosborough <radon.neon@gmail.com>2019-07-10 22:17:26 -0700
committerRadon Rosborough <radon.neon@gmail.com>2019-07-10 22:17:26 -0700
commitef86b0c4a3c2a92be82d31235c315ee4c31ecb22 (patch)
tree728cafae66ca43af12abff472b633671331387c5
parent9ed9d2760d9a564eb4d7d96beb83d0840c690adf (diff)
Fix really weird Makefile error
-rw-r--r--Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 7f72a5f..c081d72 100644
--- a/Makefile
+++ b/Makefile
@@ -11,8 +11,13 @@ all: compile checkdoc longlines ## Build project and run all linters
.PHONY: compile
compile: ## Check for byte-compiler errors
+# Deleting the .elc file first is sometimes necessary
+# apparently when switching between different versions of
+# Emacs; otherwise we may get an error saying we can't
+# overwrite the file.
@for file in $(for_compile); do \
echo "[compile] $$file" ;\
+ rm -f "$${file}c" ;\
$(EMACS) -Q --batch -L . -f batch-byte-compile $$file 2>&1 \
| grep -v "^Wrote" \
| grep . && exit 1 || true ;\