Skip to content

Commit 446ca2e

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 `EMACS_ORG', and rework use of related variables.
1 parent 5b568ca commit 446ca2e

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,15 @@ autoloads: $(PKG)-autoloads.el
3737

3838
%.elc: %.el
3939
@printf "Compiling $<\n"
40-
@$(EMACS) -Q --batch $(EMACS_ARGS) $(LOAD_PATH) -f batch-byte-compile $<
40+
@$(EMACS_BATCH) --funcall batch-byte-compile $<
4141

4242
check-declare:
4343
@printf " Checking function declarations\n"
44-
@$(EMACS) -Q --batch $(EMACS_ARGS) $(LOAD_PATH) \
45-
--eval "(check-declare-directory default-directory)"
44+
@$(EMACS_BATCH) --eval "(check-declare-directory default-directory)"
4645

4746
$(PKG)-autoloads.el: $(ELS)
4847
@printf " Creating $@\n"
49-
@$(EMACS) -Q --batch -l autoload --eval "\
48+
@$(EMACS_BATCH) --load autoload --eval "\
5049
(let* ((file (expand-file-name \"$@\"))\
5150
(generated-autoload-file file)\
5251
(coding-system-for-write 'utf-8-emacs-unix)\

default.mk

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ ELCS = $(ELS:.el=.elc)
99

1010
DEPS = compat
1111

12-
EMACS ?= emacs
13-
EMACS_ARGS ?=
14-
15-
LOAD_PATH ?= $(addprefix -L ../,$(DEPS))
16-
LOAD_PATH += -L .
17-
18-
ORG_LOAD_PATH ?= -L ../../htmlize
12+
LOAD_PATH ?= $(addprefix -L ../../,$(DEPS))
13+
LOAD_PATH += -L .
14+
ORG_LOAD_PATH ?= -L ../../org/lisp
15+
16+
EMACS ?= emacs
17+
EMACS_ARGS ?=
18+
EMACS_Q_ARG ?= -Q
19+
EMACS_BATCH ?= $(EMACS) $(EMACS_Q_ARG) --batch $(EMACS_ARGS) $(LOAD_PATH)
20+
EMACS_ORG ?= $(EMACS) $(EMACS_Q_ARG) --batch $(EMACS_ARGS) $(ORG_LOAD_PATH)
1921

2022
RCLONE ?= rclone
2123
RCLONE_ARGS ?= -v

docs/Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ HTML += migrate.html
88

99
html: $(HTML)
1010

11-
ORG_ARGS = --batch -Q $(ORG_LOAD_PATH)
1211
ORG_EVAL += --eval "(setq indent-tabs-mode nil)"
1312
ORG_EVAL += --eval "(setq org-src-preserve-indentation nil)"
1413
ORG_EVAL += --eval "(setq org-html-checkbox-type 'html)"
@@ -17,11 +16,11 @@ ORG_EVAL += --funcall org-html-export-to-html
1716

1817
%.html: ../%.org
1918
@printf "Generating $@\n"
20-
@$(EMACS) $(ORG_ARGS) $< $(ORG_EVAL)
19+
@$(EMACS_ORG) $< $(ORG_EVAL)
2120

2221
index.html: ../README.org
2322
@printf "Generating $@\n"
24-
@$(EMACS) $(ORG_ARGS) $< $(ORG_EVAL)
23+
@$(EMACS_ORG) $< $(ORG_EVAL)
2524

2625
DOCS_DOMAIN = docs.$(DOMAIN)
2726
DOCS_TARGET = $(subst .,_,$(DOCS_DOMAIN)):$(PKG)/

0 commit comments

Comments
 (0)