summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAchim Gratz <Stromeko@Stromeko.DE>2012-11-07 17:38:12 (GMT)
committer Achim Gratz <Stromeko@Stromeko.DE>2012-11-07 17:44:20 (GMT)
commitca5d5e9c9b792f139362968de60b5a3cbf92064b (patch)
treead1825921e5c48fb40a73ee394f2847cc205968b
parentc20730be9aef8c5389aaaef08664515b0a749bd9 (diff)
downloadorg-mode-ca5d5e9c9b792f139362968de60b5a3cbf92064b.zip
org-mode-ca5d5e9c9b792f139362968de60b5a3cbf92064b.tar.gz
Makefile: fix a bug with ORG_ADD_CONTRIB
* lisp/Makefile: The added files from contrib need to be known before LISPF is constructed. Also, make all variables simply defined to avoid recursive evaluation.
-rw-r--r--lisp/Makefile32
1 files changed, 19 insertions, 13 deletions
diff --git a/lisp/Makefile b/lisp/Makefile
index e2f1768..0e10c23 100644
--- a/lisp/Makefile
+++ b/lisp/Makefile
@@ -4,13 +4,23 @@ ifeq ($(MAKELEVEL), 0)
$(error This make needs to be started as a sub-make from the toplevel directory.)
endif
-LISPV = org-version.el
-LISPI = org-loaddefs.el
-LISPA = $(LISPV) $(LISPI)
-LISPB = $(LISPA:%el=%elc) org-install.elc
-LISPF = $(filter-out $(LISPA),$(sort $(wildcard *.el)))
-LISPC = $(filter-out $(LISPB) $(LISPN:%el=%elc),$(LISPF:%el=%elc))
-_ORGCM_ = dirall single source slint1 slint2
+ifneq ($(ORG_ADD_CONTRIB),)
+ _ORG_ADD_EL_ := \
+ $(notdir \
+ $(wildcard \
+ $(addsuffix .el, \
+ $(addprefix ../contrib/lisp/, \
+ $(basename \
+ $(notdir $(ORG_ADD_CONTRIB)))))))
+endif
+
+LISPV := org-version.el
+LISPI := org-loaddefs.el
+LISPA := $(LISPV) $(LISPI)
+LISPB := $(LISPA:%el=%elc) org-install.elc
+LISPF := $(filter-out $(LISPA),$(sort $(wildcard *.el) $(_ORG_ADD_EL_)))
+LISPC := $(filter-out $(LISPB) $(LISPN:%el=%elc),$(LISPF:%el=%elc))
+_ORGCM_ := dirall single source slint1 slint2
-include local.mk
.PHONY: all compile compile-dirty \
@@ -51,11 +61,7 @@ slint1:
addcontrib:
ifneq ($(ORG_ADD_CONTRIB),)
- $(CP) $(wildcard \
- $(addsuffix .el, \
- $(addprefix ../contrib/lisp/, \
- $(basename \
- $(notdir $(ORG_ADD_CONTRIB)))))) .
+ $(CP) $(addprefix ../contrib/lisp/,$(_ORG_ADD_EL_)) .
endif
autoloads: cleanauto addcontrib $(LISPI) $(LISPV)
@@ -70,7 +76,7 @@ $(LISPI): $(LISPV) $(LISPF)
@$(RM) $(@)
@$(MAKE_ORG_INSTALL)
-install: $(LISPF) compile
+install: compile $(LISPF)
if [ ! -d $(DESTDIR)$(lispdir) ] ; then \
$(MKDIR) $(DESTDIR)$(lispdir) ; \
fi ;