From 27527b670ed0b9b11b7981bbba047a42594f6184 Mon Sep 17 00:00:00 2001 From: Achim Gratz Date: Thu, 20 Sep 2012 22:35:35 +0200 Subject: [PATCH] Makefile: add contrib files while generating autoloads MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * mk/targets.mk: Move copy of contrib additions to lisp/Makefile. * lisp/Makefile: Let `autoloads´ in lisp re-generate contrib files by depending on new target `addcontrib´ in the right order. --- lisp/Makefile | 13 +++++++++++-- mk/targets.mk | 9 +-------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/lisp/Makefile b/lisp/Makefile index da84db016..4bc86d4c6 100644 --- a/lisp/Makefile +++ b/lisp/Makefile @@ -14,7 +14,7 @@ _ORGCM_ = dirall single source slint1 slint2 .PHONY: all compile compile-dirty \ $(_ORGCM_) $(_ORGCM_:%=compile-%) \ - autoloads \ + autoloads addcontrib \ install clean cleanauto cleanall cleanelc clean-install # do not clean here, done in toplevel make @@ -48,7 +48,16 @@ slint1: @$(info Compiling single $(abspath $<)...) -@$(ELC) $< -autoloads: cleanauto $(LISPI) $(LISPV) +addcontrib: +ifneq ($(ORG_ADD_CONTRIB),) + $(CP) $(wildcard \ + $(addsuffix .el, \ + $(addprefix ../contrib/lisp/, \ + $(basename \ + $(notdir $(ORG_ADD_CONTRIB)))))) . +endif + +autoloads: cleanauto addcontrib $(LISPI) $(LISPV) $(LISPV): $(LISPF) @echo "org-version: $(ORGVERSION) ($(GITVERSION))" diff --git a/mk/targets.mk b/mk/targets.mk index aac6de9c8..31fc5e7fa 100644 --- a/mk/targets.mk +++ b/mk/targets.mk @@ -28,7 +28,7 @@ endif check test install $(INSTSUB) \ info html pdf card refcard doc docs \ autoloads cleanall clean $(CLEANDIRS:%=clean%) \ - clean-install cleanelc cleandirs \ + clean-install cleanelc cleandirs cleanaddcontrib \ cleanlisp cleandoc cleandocs cleantest \ compile compile-dirty uncompiled \ config config-test config-exe config-all config-eol @@ -121,13 +121,6 @@ $(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: