From 400bb88f9cab27393b5134b04d4d0e6e0245af61 Mon Sep 17 00:00:00 2001 From: Achim Gratz Date: Sat, 15 Sep 2012 18:27:56 +0200 Subject: [PATCH] Makefile: add contrib already for autoloads so that uncompiled can have contrib/, too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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. --- mk/targets.mk | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/mk/targets.mk b/mk/targets.mk index e0771d70d..aac6de9c8 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