$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r78302 - trunk/tools/build/v2/engine
From: steven_at_[hidden]
Date: 2012-05-02 02:55:48
Author: steven_watanabe
Date: 2012-05-02 02:55:44 EDT (Wed, 02 May 2012)
New Revision: 78302
URL: http://svn.boost.org/trac/boost/changeset/78302
Log:
Avoid a spurious dependency.
Text files modified: 
   trunk/tools/build/v2/engine/make.c |    18 +++++++++++++-----                      
   1 files changed, 13 insertions(+), 5 deletions(-)
Modified: trunk/tools/build/v2/engine/make.c
==============================================================================
--- trunk/tools/build/v2/engine/make.c	(original)
+++ trunk/tools/build/v2/engine/make.c	2012-05-02 02:55:44 EDT (Wed, 02 May 2012)
@@ -301,6 +301,7 @@
 {
     TARGETS    * c;
     TARGET     * ptime = t;
+    TARGET     * located_target = 0;
     time_t       last;
     time_t       leaf;
     time_t       hlast;
@@ -346,11 +347,7 @@
          * depending on us will depend on that other target as well.
          */
         if ( another_target )
-        {
-            TARGET * other = bindtarget( another_target );
-            t->depends = targetentry( t->depends, other );
-            other->dependants = targetentry( other->dependants, t );
-        }
+            located_target = bindtarget( another_target );
 
         t->binding = t->time ? T_BIND_EXISTS : T_BIND_MISSING;
     }
@@ -436,6 +433,14 @@
             make0rescan( target_scc( c->target->includes ), rescanning );
     }
 
+    if ( located_target )
+    {
+        if ( located_target->fate == T_FATE_INIT )
+            make0( located_target, ptime, depth + 1, counts, anyhow, rescanning );
+        else if ( located_target->fate != T_FATE_MAKING && rescanning )
+            make0rescan( located_target, rescanning );
+    }
+
     /* Step 3b: recursively make0() internal includes node. */
     if ( t->includes )
         make0( t->includes, p, depth + 1, counts, anyhow, rescanning );
@@ -449,6 +454,9 @@
         t->depends = targetchain( t->depends, incs );
     }
 
+    if ( located_target )
+        t->depends = targetentry( t->depends, located_target );
+
     /* Step 3d: detect cycles. */
     {
         int cycle_depth = depth;