Skip to content

Commit d457652

Browse files
committed
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.
1 parent 0fb0bc2 commit d457652

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

Makefile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ ELCS = $(ELS:.el=.elc)
88
DEPS = compat
99
DEPS += llama
1010

11-
EMACS ?= emacs
12-
EMACS_ARGS ?=
11+
LOAD_PATH ?= $(addprefix -L ../,$(DEPS))
12+
LOAD_PATH += -L .
1313

14-
LOAD_PATH ?= $(addprefix -L ../,$(DEPS))
15-
LOAD_PATH += -L .
14+
EMACS ?= emacs
15+
EMACS_ARGS ?=
16+
EMACS_Q_ARG ?= -Q
17+
EMACS_BATCH ?= $(EMACS) $(EMACS_Q_ARG) --batch $(EMACS_ARGS) $(LOAD_PATH)
1618

1719
all: lisp
1820

@@ -31,12 +33,11 @@ autoloads: $(PKG)-autoloads.el
3133

3234
%.elc: %.el
3335
@printf "Compiling $<\n"
34-
@$(EMACS) -Q --batch $(EMACS_ARGS) $(LOAD_PATH) -f batch-byte-compile $<
36+
@$(EMACS_BATCH) --funcall batch-byte-compile $<
3537

3638
check-declare:
3739
@printf " Checking function declarations\n"
38-
@$(EMACS) -Q --batch $(EMACS_ARGS) $(LOAD_PATH) \
39-
--eval "(check-declare-directory default-directory)"
40+
@$(EMACS_BATCH) --eval "(check-declare-directory default-directory)"
4041

4142
CLEAN = $(ELCS) $(PKG)-autoloads.el
4243

@@ -46,7 +47,7 @@ clean:
4647

4748
$(PKG)-autoloads.el: $(ELS)
4849
@printf " Creating $@\n"
49-
@$(EMACS) -Q --batch --eval "\
50+
@$(EMACS_BATCH) --eval "\
5051
(let ((inhibit-message t))\
5152
(loaddefs-generate\
5253
default-directory \"$@\" nil\

0 commit comments

Comments
 (0)