|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r79875 - trunk/tools/build/v2/build
From: jurko.gospodnetic_at_[hidden]
Date: 2012-08-05 12:30:42
Author: jurko
Date: 2012-08-05 12:30:41 EDT (Sun, 05 Aug 2012)
New Revision: 79875
URL: http://svn.boost.org/trac/boost/changeset/79875
Log:
Boost Build cleanup - minor stylistic changes.
Text files modified:
trunk/tools/build/v2/build/project.jam | 27 +++++++++++++++++----------
1 files changed, 17 insertions(+), 10 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:30:41 EDT (Sun, 05 Aug 2012)
@@ -900,11 +900,12 @@
#
module project-rules
{
+ import modules ;
+
rule using ( toolset-module : * )
{
- import toolset ;
- import modules ;
import project ;
+ import toolset ;
# Temporarily change the search path so the module referred to by
# 'using' can be placed in the same directory as Jamfile. User will
@@ -919,25 +920,31 @@
: $(18) : $(19) ;
modules.poke : BOOST_BUILD_PATH : $(x) ;
- # The above might have clobbered .current-project (newly created project
- # instances automatically get set as the 'current' project). Restore the
- # correct value.
+ # The above might have clobbered .current-project in case it caused a
+ # new project instance to be created (which would then automatically
+ # 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) ] ;
}
- import modules ;
-
rule import ( * : * : * )
{
modules.import project ;
local caller = [ CALLER_MODULE ] ;
- local saved = [ modules.peek project : .current-project ] ;
+ local saved-project = [ modules.peek project : .current-project ] ;
module $(caller)
{
modules.import $(1) : $(2) : $(3) ;
}
- modules.poke project : .current-project : $(saved) ;
+
+ # The above might have clobbered .current-project in case it caused a
+ # new project instance to be created (which would then automatically
+ # 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 : $(saved-project) ;
}
rule project ( id ? : options * : * )
@@ -949,7 +956,7 @@
local attributes = [ project.attributes $(caller) ] ;
if $(id)
{
- $(attributes).set id : $(id) ;
+ $(attributes).set id : $(id) ;
}
local explicit-build-dir ;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk