diff options
| -rw-r--r-- | default.mk | 19 | ||||
| -rw-r--r-- | docs/Makefile | 3 | ||||
| -rw-r--r-- | lisp/Makefile | 7 |
3 files changed, 13 insertions, 16 deletions
@@ -10,19 +10,18 @@ ELCS = $(ELS:.el=.elc) DEPS = compat DEPS += vterm +LOAD_PATH ?= $(addprefix -L ../../,$(DEPS)) +LOAD_PATH += -L . +ORG_LOAD_PATH ?= -L ../../org/lisp + VERSION ?= $(shell test -e $(TOP).git && git describe --tags --abbrev=0 | cut -c2-) REVDESC := $(shell test -e $(TOP).git && git describe --tags) -EMACS ?= emacs -EMACS_ARGS ?= -EMACS_ARGS += --eval '(setq with-editor-emacsclient-executable nil)' - -LOAD_PATH ?= $(addprefix -L ../../,$(DEPS)) -LOAD_PATH += -L . - -ifndef ORG_LOAD_PATH -ORG_LOAD_PATH = -L ../../org/lisp -endif +EMACS ?= emacs +EMACS_ARGS ?= --eval "(setq with-editor-emacsclient-executable nil)" +EMACS_Q_ARG ?= -Q +EMACS_BATCH ?= $(EMACS) $(EMACS_Q_ARG) --batch $(EMACS_ARGS) $(LOAD_PATH) +EMACS_ORG ?= $(EMACS) $(EMACS_Q_ARG) --batch $(EMACS_ARGS) $(ORG_LOAD_PATH) INSTALL_INFO ?= $(shell command -v ginstall-info || printf install-info) MAKEINFO ?= makeinfo diff --git a/docs/Makefile b/docs/Makefile index 6adbfb7..458172c 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -11,7 +11,6 @@ html: $(PKG).html html-dir: $(PKG)/index.html pdf: $(PKG).pdf -ORG_ARGS = --batch -Q $(ORG_LOAD_PATH) ORG_EVAL += --eval "(setq indent-tabs-mode nil)" ORG_EVAL += --eval "(setq org-src-preserve-indentation nil)" ORG_EVAL += --eval "\ @@ -29,7 +28,7 @@ _ := $(shell test "$(REVDESC)" = "$$(cat .revdesc 2> /dev/null)" ||\ %.texi: %.org .orgconfig .revdesc @printf "Generating $@\n" - @$(EMACS) $(ORG_ARGS) $< $(ORG_EVAL) + @$(EMACS_ORG) $< $(ORG_EVAL) %.info: %.texi @printf "Generating $@\n" diff --git a/lisp/Makefile b/lisp/Makefile index 77bd1bc..653e55b 100644 --- a/lisp/Makefile +++ b/lisp/Makefile @@ -7,12 +7,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)" CLEAN = $(ELCS) $(PKG)-autoloads.el @@ -22,7 +21,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)\ |
