summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2025-11-30 20:55:27 +0100
committerJonas Bernoulli <jonas@bernoul.li>2025-11-30 20:55:27 +0100
commit472f5967f6684342d3c042d1ba12c3b3d6cefaba (patch)
treeaa3dc39d03e0b49b61b142e31e2c7ad960214138 /Makefile
parente4803de8ab85991b6a944430bb4f543ea338636d (diff)
make: Add new EMACS_Q_ARG variable
It defaults to "-Q" but users can instead use "-q", which is useful if "site-start.el" contains essential settings. Also add `EMACS_BATCH', and rework use of related variables.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 10 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 120214a..67caa4b 100644
--- a/Makefile
+++ b/Makefile
@@ -11,13 +11,16 @@ $(PKG)-tests.elc: $(PKG).elc
DEPS = compat
-EMACS ?= emacs
+
+LOAD_PATH ?= $(addprefix -L ../,$(DEPS))
+LOAD_PATH += -L .
+
+EMACS ?= emacs
EMACS_ARGS ?= --eval "(progn \
(put 'if-let 'byte-obsolete-info nil) \
(put 'when-let 'byte-obsolete-info nil))"
-
-LOAD_PATH ?= $(addprefix -L ../,$(DEPS))
-LOAD_PATH += -L .
+EMACS_Q_ARG ?= -Q
+EMACS_BATCH ?= $(EMACS) $(EMACS_Q_ARG) --batch $(EMACS_ARGS) $(LOAD_PATH)
all: lisp
@@ -37,12 +40,11 @@ autoloads: $(PKG)-autoloads.el
%.elc: %.el
@printf "Compiling $<\n"
- @$(EMACS) -Q --batch $(EMACS_ARGS) $(LOAD_PATH) -f batch-byte-compile $<
+ @$(EMACS_BATCH) --funcall batch-byte-compile $<
check-declare:
@printf " Checking function declarations\n"
- @$(EMACS) -Q --batch $(EMACS_ARGS) $(LOAD_PATH) \
- --eval "(check-declare-directory default-directory)"
+ @$(EMACS_BATCH) --eval "(check-declare-directory default-directory)"
test: lisp
@$(EMACS) -Q --batch $(EMACS_ARGS) $(LOAD_PATH) \
@@ -56,7 +58,7 @@ clean:
$(PKG)-autoloads.el: $(ELS)
@printf " Creating $@\n"
- @$(EMACS) -Q --batch -l autoload --eval "\
+ @$(EMACS_BATCH) --load autoload --eval "\
(let* ((file (expand-file-name \"$@\"))\
(generated-autoload-file file)\
(coding-system-for-write 'utf-8-emacs-unix)\