Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56046 - trunk/tools/build/v2/build
From: ghost_at_[hidden]
Date: 2009-09-05 08:59:39


Author: vladimir_prus
Date: 2009-09-05 08:59:39 EDT (Sat, 05 Sep 2009)
New Revision: 56046
URL: http://svn.boost.org/trac/boost/changeset/56046

Log:
Merge feature.jam changes into Python
Text files modified:
   trunk/tools/build/v2/build/feature.py | 15 +++++++++++++--
   1 files changed, 13 insertions(+), 2 deletions(-)

Modified: trunk/tools/build/v2/build/feature.py
==============================================================================
--- trunk/tools/build/v2/build/feature.py (original)
+++ trunk/tools/build/v2/build/feature.py 2009-09-05 08:59:39 EDT (Sat, 05 Sep 2009)
@@ -1,6 +1,6 @@
 # Status: mostly ported.
 # TODO: carry over tests.
-# Base revision: 40480
+# Base revision: 56043
 #
 # Copyright 2001, 2002, 2003 Dave Abrahams
 # Copyright 2002, 2006 Rene Rivera
@@ -128,7 +128,17 @@
 
     feature = add_grist (feature)
     f = __all_features [feature]
+ attributes = f['attributes']
+ bad_attribute = None
 
+ if "free" in attributes:
+ bad_attribute = "free"
+ elif "optional" in attributes:
+ bad_attribute = "optional"
+
+ if bad_attribute:
+ raise InvalidValue ("%s property %s cannot have a default" % (bad_attribute, feature))
+
     if isinstance(value, list):
         value = value[0]
 
@@ -370,7 +380,8 @@
     values = [value_string]
 
     if f['subfeatures']:
- values = value_string.split('-')
+ if not value_string in f['subfeatures']:
+ values = value_string.split('-')
 
     # An empty value is allowed for optional features
     if not values[0] in f['values'] and \


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