Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r64554 - in trunk/tools/build/v2: build test tools
From: ghost_at_[hidden]
Date: 2010-08-02 17:27:35


Author: vladimir_prus
Date: 2010-08-02 17:27:33 EDT (Mon, 02 Aug 2010)
New Revision: 64554
URL: http://svn.boost.org/trac/boost/changeset/64554

Log:
Somewhat fix searched libraries.

Text files modified:
   trunk/tools/build/v2/build/property.py | 11 +++++++----
   trunk/tools/build/v2/build/virtual_target.py | 2 +-
   trunk/tools/build/v2/test/searched_lib.py | 2 +-
   trunk/tools/build/v2/tools/builtin.py | 21 +++++++++++----------
   4 files changed, 20 insertions(+), 16 deletions(-)

Modified: trunk/tools/build/v2/build/property.py
==============================================================================
--- trunk/tools/build/v2/build/property.py (original)
+++ trunk/tools/build/v2/build/property.py 2010-08-02 17:27:33 EDT (Mon, 02 Aug 2010)
@@ -26,12 +26,15 @@
 
     __slots__ = ('_feature', '_value', '_condition')
 
- def __init__(self, feature, value, condition = []):
- assert(feature.free() or value.find(':') == -1)
- self._feature = feature
+ def __init__(self, f, value, condition = []):
+ if type(f) == type(""):
+ f = feature.get(f)
+ # At present, single property has a single value.
+ assert type(value) != type([])
+ assert(f.free() or value.find(':') == -1)
+ self._feature = f
         self._value = value
         self._condition = condition
-
         
     def feature(self):
         return self._feature

Modified: trunk/tools/build/v2/build/virtual_target.py
==============================================================================
--- trunk/tools/build/v2/build/virtual_target.py (original)
+++ trunk/tools/build/v2/build/virtual_target.py 2010-08-02 17:27:33 EDT (Mon, 02 Aug 2010)
@@ -879,7 +879,7 @@
         actions which create them.
     """
     def __init__ (self, manager, prop_set):
- Action.__init__ (self, manager, None, None, prop_set)
+ Action.__init__ (self, manager, [], None, prop_set)
         
     def actualize (self):
         if not self.actualized_:

Modified: trunk/tools/build/v2/test/searched_lib.py
==============================================================================
--- trunk/tools/build/v2/test/searched_lib.py (original)
+++ trunk/tools/build/v2/test/searched_lib.py 2010-08-02 17:27:33 EDT (Mon, 02 Aug 2010)
@@ -46,7 +46,7 @@
 import path ;
 import project ;
 
-local here = [ project.attribute $(__name__) location ] ;
+path-constant here : . ;
 here = [ path.root $(here) [ path.pwd ] ] ;
 
 exe main : main.cpp helper ;

Modified: trunk/tools/build/v2/tools/builtin.py
==============================================================================
--- trunk/tools/build/v2/tools/builtin.py (original)
+++ trunk/tools/build/v2/tools/builtin.py 2010-08-02 17:27:33 EDT (Mon, 02 Aug 2010)
@@ -336,7 +336,7 @@
         return self.search_
         
     def actualize_location (self, target):
- project.manager ().engine ().add_not_file_target (target)
+ bjam.call("NOTFILE", target)
     
     def path (self):
         #FIXME: several functions rely on this not being None
@@ -578,19 +578,21 @@
         generators.Generator.__init__ (self, id, composing, source_types, target_types_and_names, requirements)
         
     def run (self, project, name, prop_set, sources):
+
         lib_sources = prop_set.get('<library>')
- [ sources.append (project.manager().get_object(x)) for x in lib_sources ]
+ sources.extend(lib_sources)
         
         # Add <library-path> properties for all searched libraries
         extra = []
         for s in sources:
             if s.type () == 'SEARCHED_LIB':
                 search = s.search()
- extra.append(replace_grist(search, '<library-path>'))
+ extra.extend(property.Property('<library-path>', sp) for sp in search)
 
         orig_xdll_path = []
                    
- if prop_set.get('<hardcode-dll-paths>') == ['true'] and type.is_derived(self.target_types_ [0], 'EXE'):
+ if prop_set.get('<hardcode-dll-paths>') == ['true'] \
+ and type.is_derived(self.target_types_ [0], 'EXE'):
             xdll_path = prop_set.get('<xdll-path>')
             orig_xdll_path = [ replace_grist(x, '<dll-path>') for x in xdll_path ]
             # It's possible that we have libraries in sources which did not came
@@ -670,12 +672,12 @@
         fst = []
         for s in sources:
             if type.is_derived(s.type(), 'SEARCHED_LIB'):
- name = s.real_name()
+ n = s.real_name()
                 if s.shared():
- fsa.append(name)
+ fsa.append(n)
 
                 else:
- fst.append(name)
+ fst.append(n)
 
             else:
                 sources2.append(s)
@@ -685,9 +687,8 @@
             add.append("<find-shared-library>" + '&&'.join(fsa))
         if fst:
             add.append("<find-static-library>" + '&&'.join(fst))
-
- spawn = generators.Generator.generated_targets(self, sources2,prop_set.add_raw(add), project, name)
-
+
+ spawn = generators.Generator.generated_targets(self, sources2, prop_set.add_raw(add), project, name)
         return spawn
 
 


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