summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2017-10-05 18:13:00 +0200
committerJonas Bernoulli <jonas@bernoul.li>2017-10-06 12:47:46 +0200
commitd68fe1c53819efec6fe6a124e64b0eb127a53e62 (patch)
treee5e911cab051218cfc1c2c0d4136a91e5bda6c6f /Makefile
parentb0ff338baa46e3413dbed97790d27b8cc8cea47e (diff)
make: rename and sanitize some variables
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 15 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index d0987ab..8e3f151 100644
--- a/Makefile
+++ b/Makefile
@@ -7,11 +7,19 @@ ELCS = $(ELS:.el=.elc)
DEPS = dash
-EMACS ?= emacs
-EFLAGS ?=
-EFLAGS += --eval '(setq with-editor-emacsclient-executable nil)'
-DFLAGS ?= $(addprefix -L ../,$(DEPS))
-OFLAGS ?= -L ../dash -L ../org/lisp -L ../ox-texinfo+
+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 ../dash
+ORG_LOAD_PATH += -L ../org/lisp
+ORG_LOAD_PATH += -L ../org/contrib/lisp
+ORG_LOAD_PATH += -L ../ox-texinfo+
+endif
INSTALL_INFO ?= $(shell command -v ginstall-info || printf install-info)
MAKEINFO ?= makeinfo
@@ -47,7 +55,7 @@ loaddefs: $(PKG)-autoloads.el
%.elc: %.el
@printf "Compiling $<\n"
- @$(EMACS) -Q --batch $(EFLAGS) -L . $(DFLAGS) -f batch-byte-compile $<
+ @$(EMACS) -Q --batch $(EMACS_ARGS) $(LOAD_PATH) -f batch-byte-compile $<
bump-version:
@sed -i -e "s/\(#+SUBTITLE: for version \)[.0-9]*/\1$(VERSION)/" $(PKG).org
@@ -59,7 +67,7 @@ pdf: $(PKG).pdf
%.texi: %.org
@printf "Generating $@\n"
- @$(EMACS) -Q --batch $(OFLAGS) \
+ @$(EMACS) -Q --batch $(ORG_LOAD_PATH) \
-l ox-extra.el -l ox-texinfo+.el $< -f org-texinfo-export-to-texinfo
@printf "\n" >> $@
@rm -f $@~