|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r64496 - trunk/tools/build/v2/build
From: ghost_at_[hidden]
Date: 2010-07-31 07:40:35
Author: vladimir_prus
Date: 2010-07-31 07:40:34 EDT (Sat, 31 Jul 2010)
New Revision: 64496
URL: http://svn.boost.org/trac/boost/changeset/64496
Log:
Don't bark on conditionals in usage requirements.
Text files modified:
trunk/tools/build/v2/build/project.py | 11 ++++++-----
trunk/tools/build/v2/build/property.py | 6 +++---
trunk/tools/build/v2/build/property_set.py | 18 ++++--------------
trunk/tools/build/v2/build/targets.py | 2 +-
4 files changed, 14 insertions(+), 23 deletions(-)
Modified: trunk/tools/build/v2/build/project.py
==============================================================================
--- trunk/tools/build/v2/build/project.py (original)
+++ trunk/tools/build/v2/build/project.py 2010-07-31 07:40:34 EDT (Sat, 31 Jul 2010)
@@ -758,15 +758,16 @@
non_free = property.remove("free", unconditional)
if non_free:
- pass
- # FIXME:
- #errors.error "usage-requirements" $(specification) "have non-free properties" $(non-free) ;
+ get_manager().errors()("usage-requirements %s have non-free properties %s" \
+ % (specification, non_free))
- t = property.translate_paths(property.create_from_strings(specification), self.location)
+ t = property.translate_paths(
+ property.create_from_strings(specification, allow_condition=True),
+ self.location)
existing = self.__dict__.get("usage-requirements")
if existing:
- new = property_set.create(existing.raw() + t)
+ new = property_set.create(existing.all() + t)
else:
new = property_set.create(t)
self.__dict__["usage-requirements"] = new
Modified: trunk/tools/build/v2/build/property.py
==============================================================================
--- trunk/tools/build/v2/build/property.py (original)
+++ trunk/tools/build/v2/build/property.py 2010-07-31 07:40:34 EDT (Sat, 31 Jul 2010)
@@ -60,7 +60,7 @@
(other._feature, other._value, other._condition))
-def create_from_string(s, allow_condition = False):
+def create_from_string(s, allow_condition=False):
condition = []
import types
@@ -98,9 +98,9 @@
return Property(f, value, condition)
-def create_from_strings(string_list, validate=False):
+def create_from_strings(string_list, allow_condition=False):
- return [create_from_string(s, validate) for s in string_list]
+ return [create_from_string(s, allow_condition) for s in string_list]
def reset ():
""" Clear the module state. This is mainly for testing purposes.
Modified: trunk/tools/build/v2/build/property_set.py
==============================================================================
--- trunk/tools/build/v2/build/property_set.py (original)
+++ trunk/tools/build/v2/build/property_set.py 2010-07-31 07:40:34 EDT (Sat, 31 Jul 2010)
@@ -154,7 +154,6 @@
self.incidental_ = []
self.free_ = []
self.base_ = []
- self.base_raw_ = []
self.dependency_ = []
self.non_dependency_ = []
self.conditional_ = []
@@ -199,18 +198,7 @@
raise BaseException ("Invalid property: '%s'" % p)
att = feature.attributes (get_grist (p))
-
- # A feature can be both incidental and free,
- # in which case we add it to incidental.
- if 'incidental' in att:
- pass
-# self.incidental_.append (p)
- elif 'free' in att:
- # self.free_.append (p)
- pass
- else:
- self.base_raw_.append (p)
-
+
if 'propagated' in att:
self.propagated_.append (p)
@@ -219,6 +207,8 @@
for p in properties:
+ # A feature can be both incidental and free,
+ # in which case we add it to incidental.
if p.feature().incidental():
self.incidental_.append(p)
elif p.feature().free():
@@ -251,7 +241,7 @@
def base (self):
""" Returns properties that are neither incidental nor free.
"""
- return self.base_raw_
+ return self.base_
def free (self):
""" Returns free properties which are not dependency properties.
Modified: trunk/tools/build/v2/build/targets.py
==============================================================================
--- trunk/tools/build/v2/build/targets.py (original)
+++ trunk/tools/build/v2/build/targets.py 2010-07-31 07:40:34 EDT (Sat, 31 Jul 2010)
@@ -1019,7 +1019,7 @@
if debug:
print " next alternative: required properties:", str(condition)
- if b2.util.set.contains (condition, property_set.raw ()):
+ if b2.util.set.contains (condition, property_set.all()):
if debug:
print " matched"
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