$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r79876 - trunk/tools/build/v2/build
From: jurko.gospodnetic_at_[hidden]
Date: 2012-08-05 12:46:19
Author: jurko
Date: 2012-08-05 12:46:19 EDT (Sun, 05 Aug 2012)
New Revision: 79876
URL: http://svn.boost.org/trac/boost/changeset/79876
Log:
Boost Build cleanup - project-rules.using() & project-rules.import() rules now restore the original 'current project' reference the same way.
Text files modified: 
   trunk/tools/build/v2/build/project.jam |     4 +++-                                    
   1 files changed, 3 insertions(+), 1 deletions(-)
Modified: trunk/tools/build/v2/build/project.jam
==============================================================================
--- trunk/tools/build/v2/build/project.jam	(original)
+++ trunk/tools/build/v2/build/project.jam	2012-08-05 12:46:19 EDT (Sun, 05 Aug 2012)
@@ -907,6 +907,8 @@
         import project ;
         import toolset ;
 
+        local saved-project = [ modules.peek project : .current-project ] ;
+
         # Temporarily change the search path so the module referred to by
         # 'using' can be placed in the same directory as Jamfile. User will
         # expect the module to be found even though the directory is not in
@@ -925,7 +927,7 @@
         # get set as the 'current' project). Restore the correct value so any
         # main targets declared after this do not get mapped to the loaded
         # module's project.
-        modules.poke project : .current-project : [ project.target $(caller) ] ;
+        modules.poke project : .current-project : $(saved-project) ;
     }
 
     rule import ( * : * : * )