Bug 938956 - Add a generic recursion rule. r=gps
authorMike Hommey <mh+mozilla@glandium.org>
Sat, 16 Nov 2013 13:40:53 +0900
changeset 169514 7bead59330cc3d4108b14443779eeb90e6e44cf5
parent 169513 10fecade0b53c3411be67766a4b6c1bbf6535bfe
child 169515 5e1ebc80c9173a7acfba2ed50f6b8f55bce9d894
push idunknown
push userunknown
push dateunknown
reviewersgps
bugs938956
milestone28.0a1
Bug 938956 - Add a generic recursion rule. r=gps Use by running: make -C objdir recurse RECURSED_COMMAND="command_to_run in_each_subdirectory"
config/recurse.mk
js/src/config/recurse.mk
--- a/config/recurse.mk
+++ b/config/recurse.mk
@@ -230,8 +230,14 @@ endif
 binaries libs:: $(TARGETS) $(BINARIES_PP)
 ifneq (_.,$(recurse_targets)_$(DEPTH))
 	@$(if $(or $(recurse_targets),$^),$(call py_action,link_deps,-o binaries --group-all $(if $(want_abspaths),--abspaths )--topsrcdir $(topsrcdir) --topobjdir $(DEPTH) --dist $(DIST) $(ALL_DEP_FILES)))
 endif
 
 endif
 
 endif # ifdef MOZ_PSEUDO_DERECURSE
+
+recurse:
+	@$(RECURSED_COMMAND)
+	$(LOOP_OVER_PARALLEL_DIRS)
+	$(LOOP_OVER_DIRS)
+	$(LOOP_OVER_TOOL_DIRS)
--- a/js/src/config/recurse.mk
+++ b/js/src/config/recurse.mk
@@ -230,8 +230,14 @@ endif
 binaries libs:: $(TARGETS) $(BINARIES_PP)
 ifneq (_.,$(recurse_targets)_$(DEPTH))
 	@$(if $(or $(recurse_targets),$^),$(call py_action,link_deps,-o binaries --group-all $(if $(want_abspaths),--abspaths )--topsrcdir $(topsrcdir) --topobjdir $(DEPTH) --dist $(DIST) $(ALL_DEP_FILES)))
 endif
 
 endif
 
 endif # ifdef MOZ_PSEUDO_DERECURSE
+
+recurse:
+	@$(RECURSED_COMMAND)
+	$(LOOP_OVER_PARALLEL_DIRS)
+	$(LOOP_OVER_DIRS)
+	$(LOOP_OVER_TOOL_DIRS)