large improvement for parallel builds. works without V=99 now and without warnings. tested with -j on an 2x dual core opteron machine

SVN-Revision: 11414
This commit is contained in:
Felix Fietkau
2008-06-09 15:38:45 +00:00
parent 21e09858f1
commit 4c665e6ca4
10 changed files with 45 additions and 38 deletions

View File

@@ -28,8 +28,8 @@ define subdir
$(call warn,$(1),d,BD $(1)/$(bd))
$(foreach target,$(SUBTARGETS),
$(call warn_eval,$(1)/$(bd),t,T,$(1)/$(bd)/$(target): $(if $(QUILT),,$($(1)/$(bd)/$(target)) $(call $(1)//$(target),$(1)/$(bd))))
+$$(MAKE) -j1 -C $(1)/$(bd) $(target) $(if $(findstring $(bd),$($(1)/builddirs-ignore-$(target))), || $(call MESSAGE, ERROR: $(1)/$(bd) failed to build.))
$(if $(findstring $(bd),$($(1)/builddirs-parallel)),$$(SUBMAKE),$$(_SINGLE)$$(SUBMAKE) -j1) \
-C $(1)/$(bd) $(target) $(if $(findstring $(bd),$($(1)/builddirs-ignore-$(target))), || $(call MESSAGE, ERROR: $(1)/$(bd) failed to build.))
$$(if $(call debug,$(1)/$(bd),v),,.SILENT: $(1)/$(bd)/$(target))
# legacy targets