From ddbdcd0c0409cd28c76cfa2d754c4f86c57fef20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurko=20Gospodneti=C4=87?= Date: Tue, 17 Jul 2012 09:29:02 +0000 Subject: [PATCH] Reverting revision [79571] since it broke the generators_test.py Boost Build test. It seems Boost Jam might not have the complete fix implemented to allow us to avoid this Boost Build code. [SVN r79573] --- src/build/virtual-target.jam | 13 +++++++++++++ src/build/virtual_target.py | 11 +++++++++++ 2 files changed, 24 insertions(+) diff --git a/src/build/virtual-target.jam b/src/build/virtual-target.jam index 28e58fd3a..b8ff55cf1 100644 --- a/src/build/virtual-target.jam +++ b/src/build/virtual-target.jam @@ -761,6 +761,19 @@ class action DEPENDS $(actual-targets) : $(self.actual-sources) $(self.dependency-only-sources) ; + # This works around a bug with -j and actions that produce multiple + # target, where: + # - dependency on the first output is found, and the action is + # started + # - dependency on the second output is found, and bjam noticed that + # command is already running + # - instead of waiting for the command, dependents of the second + # targets are immediately updated. + if $(actual-targets[2]) + { + INCLUDES $(actual-targets) : $(actual-targets) ; + } + # Action name can include additional argument to rule, which should # not be passed to 'set-target-variables' toolset.set-target-variables diff --git a/src/build/virtual_target.py b/src/build/virtual_target.py index f688130ab..51dff0374 100644 --- a/src/build/virtual_target.py +++ b/src/build/virtual_target.py @@ -797,6 +797,17 @@ class Action: self.engine_.add_dependency (actual_targets, self.actual_sources_ + self.dependency_only_sources_) + # This works around a bug with -j and actions that + # produce multiple target, where: + # - dependency on the first output is found, and + # the action is started + # - dependency on the second output is found, and + # bjam noticed that command is already running + # - instead of waiting for the command, dependents + # of the second targets are immediately updated. + if len(actual_targets) > 1: + bjam.call("INCLUDES", actual_targets, actual_targets) + # FIXME: check the comment below. Was self.action_name_ [1] # Action name can include additional argument to rule, which should not # be passed to 'set-target-variables'