summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAchim Gratz <Stromeko@Stromeko.DE>2012-09-15 18:27:56 +0200
committerAchim Gratz <Stromeko@Stromeko.DE>2012-09-15 18:54:29 +0200
commit400bb88f9cab27393b5134b04d4d0e6e0245af61 (patch)
tree4c16c7890a374f7ba6b8d982c931a8280ddc2b82
parentcb34324a82ef2628d5b1b6b5bd8b1246c2729969 (diff)
downloadorg-mode-400bb88f9cab27393b5134b04d4d0e6e0245af61.tar.gz
Makefile: add contrib already for autoloads so that uncompiled can have contrib/, too
* mk/targets.mk: Add contrib files already for autoloads so that uncompiled can have contrib/lisp/ added, too. Remove all files from contrib/lisp/ that are found in lisp/ for `cleanlisp´ so that switching between different contrib configurations becomes easier. Remove variable ORG_TO_LISP since it is not needed anymore.
-rw-r--r--mk/targets.mk37
1 files changed, 18 insertions, 19 deletions
diff --git a/mk/targets.mk b/mk/targets.mk
index e0771d7..aac6de9 100644
--- a/mk/targets.mk
+++ b/mk/targets.mk
@@ -10,13 +10,6 @@ SUBDIRS = $(OTHERDIRS) $(LISPDIRS)
INSTSUB = $(SUBDIRS:%=install-%)
ORG_MAKE_DOC ?= info html pdf
-ORG_FROM_CONTRIB = $(wildcard \
- $(addsuffix .el, \
- $(addprefix contrib/lisp/, \
- $(basename \
- $(notdir $(ORG_ADD_CONTRIB))))))
-ORG_TO_LISP = $(ORG_FROM_CONTRIB:contrib/%=%)
-
ifneq ($(wildcard .git),)
GITVERSION ?= $(shell git describe --abbrev=6 HEAD)
ORGVERSION ?= $(subst release_,,$(shell git describe --abbrev=0 HEAD))
@@ -53,8 +46,12 @@ config config-all::
$(foreach var,$(CONF_BASE),$(info $(var) = $($(var))$(EOL)))
$(foreach var,$(CONF_DEST),$(info $(var) = $(DESTDIR)$($(var))$(EOL)))
$(info ========= Additional files from contrib/lisp)
- $(info ORG_FROM_CONTRIB =)
- $(info $(ORG_TO_LISP:lisp/%=%))
+ $(info $(notdir \
+ $(wildcard \
+ $(addsuffix .el, \
+ $(addprefix contrib/lisp/, \
+ $(basename \
+ $(notdir $(ORG_ADD_CONTRIB))))))))
config-test config-all::
$(info )
$(info ========= Test configuration)
@@ -89,9 +86,6 @@ local.mk:
-@$(MAKE_LOCAL_MK)
all compile::
-ifneq ($(ORG_FROM_CONTRIB),)
- $(CP) $(ORG_FROM_CONTRIB) lisp/
-endif
$(foreach dir, doc lisp, $(MAKE) -C $(dir) clean;)
compile compile-dirty::
$(MAKE) -C lisp $@
@@ -127,6 +121,13 @@ $(INSTSUB):
$(MAKE) -C $(@:install-%=%) install
autoloads: lisp
+ifneq ($(ORG_ADD_CONTRIB),)
+ $(CP) $(wildcard \
+ $(addsuffix .el, \
+ $(addprefix contrib/lisp/, \
+ $(basename \
+ $(notdir $(ORG_ADD_CONTRIB)))))) lisp/
+endif
$(MAKE) -C $< $@
cleandirs:
@@ -134,22 +135,20 @@ cleandirs:
clean: cleanlisp cleandoc
-cleanall: cleandirs cleantest
+cleanall: cleandirs cleantest cleanaddcontrib
-$(FIND) . \( -name \*~ -o -name \*# -o -name .#\* \) -exec $(RM) {} \;
-$(FIND) $(CLEANDIRS) \( -name \*~ -o -name \*.elc \) -exec $(RM) {} \;
$(CLEANDIRS:%=clean%):
-$(FIND) $(@:clean%=%) \( -name \*~ -o -name \*.elc \) -exec $(RM) {} \;
-ifneq ($(ORG_TO_LISP),)
-cleanlisp: cleanaddcontrib
-cleanaddcontrib:
- $(RM) $(ORG_TO_LISP)
-endif
-
cleanelc:
$(MAKE) -C lisp $@
+cleanaddcontrib:
+ -$(RM) $(wildcard $(addprefix lisp/,$(notdir $(wildcard contrib/lisp/*.el))))
+
+cleanlisp: cleanaddcontrib
cleanlisp cleandoc:
$(MAKE) -C $(@:clean%=%) clean