|
Boost-Commit : |
From: grafikrobot_at_[hidden]
Date: 2008-04-11 01:36:28
Author: grafik
Date: 2008-04-11 01:36:28 EDT (Fri, 11 Apr 2008)
New Revision: 44166
URL: http://svn.boost.org/trac/boost/changeset/44166
Log:
Add support for toolset requirements at the definition level.
Text files modified:
trunk/tools/build/v2/tools/common.jam | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
Modified: trunk/tools/build/v2/tools/common.jam
==============================================================================
--- trunk/tools/build/v2/tools/common.jam (original)
+++ trunk/tools/build/v2/tools/common.jam 2008-04-11 01:36:28 EDT (Fri, 11 Apr 2008)
@@ -145,10 +145,11 @@
# extend it with all the values.
#
# The return value from this rule is a condition to be used for flags settings.
-rule check-init-parameters ( toolset : * )
+rule check-init-parameters ( toolset requirement * : * )
{
local sig = $(toolset) ;
local condition = <toolset>$(toolset) ;
+ local subcondition ;
for local index in 2 3 4 5 6 7 8 9
{
local name = $($(index)[1]) ;
@@ -185,6 +186,7 @@
.had-value.$(toolset).$(name) = true ;
}
feature.extend-subfeature toolset $(t) : $(name) : $(value) ;
+ subcondition += <toolset-$(t):$(name)>$(value) ;
}
else
{
@@ -218,12 +220,25 @@
}
.all-signatures += $(sig) ;
.init-loc.$(sig) = [ errors.nearest-user-location ] ;
+
+ # If we have a requirment, this version should only be applied under that
+ # condition. To accomplish this we add a toolset requirement that imposes the toolset
+ # subcondition, which encodes the version.
+ if $(requirement)
+ {
+ local r = <toolset>$(toolset) $(requirement) ;
+ toolset.add-requirements $(r:J=,):$(subcondition:J=/) ;
+ }
+
+ # We add the requirements, if any, to the condition to scope the toolset
+ # variables and options to this specific version.
+ condition += $(requirement) ;
if $(.show-configuration)
{
ECHO notice: $(condition) ;
}
- return $(condition) ;
+ return $(condition:J=/) ;
}
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