Browse Source

Makefile: add contrib files while generating autoloads

* 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.
Achim Gratz 8 years ago
parent
commit
27527b670e
2 changed files with 12 additions and 10 deletions
  1. 11 2
      lisp/Makefile
  2. 1 8
      mk/targets.mk

+ 11 - 2
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))"

+ 1 - 8
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: