|
Boost-Commit : |
From: steven_at_[hidden]
Date: 2008-07-07 23:39:01
Author: steven_watanabe
Date: 2008-07-07 23:39:00 EDT (Mon, 07 Jul 2008)
New Revision: 47206
URL: http://svn.boost.org/trac/boost/changeset/47206
Log:
Dynamic libraries can be built now
Text files modified:
branches/build/python_port/python/boost/build/build/toolset.py | 4 ++++
branches/build/python_port/python/boost/build/build/virtual_target.py | 2 +-
branches/build/python_port/python/boost/build/tools/builtin.py | 22 ++++++++++++----------
3 files changed, 17 insertions(+), 11 deletions(-)
Modified: branches/build/python_port/python/boost/build/build/toolset.py
==============================================================================
--- branches/build/python_port/python/boost/build/build/toolset.py (original)
+++ branches/build/python_port/python/boost/build/build/toolset.py 2008-07-07 23:39:00 EDT (Mon, 07 Jul 2008)
@@ -36,6 +36,10 @@
self.condition = condition
self.rule = rule
+ def __str__(self):
+ return("Flag(" + str(self.variable_name) + ", " + str(self.values) +\
+ ", " + str(self.condition) + ", " + str(self.rule) + ")")
+
def reset ():
""" Clear the module state. This is mainly for testing purposes.
"""
Modified: branches/build/python_port/python/boost/build/build/virtual_target.py
==============================================================================
--- branches/build/python_port/python/boost/build/build/virtual_target.py (original)
+++ branches/build/python_port/python/boost/build/build/virtual_target.py 2008-07-07 23:39:00 EDT (Mon, 07 Jul 2008)
@@ -742,7 +742,7 @@
if self.actualized_:
return
- self.actualized = True
+ self.actualized_ = True
ps = self.properties ()
properties = self.adjust_properties (ps)
Modified: branches/build/python_port/python/boost/build/tools/builtin.py
==============================================================================
--- branches/build/python_port/python/boost/build/tools/builtin.py (original)
+++ branches/build/python_port/python/boost/build/tools/builtin.py 2008-07-07 23:39:00 EDT (Mon, 07 Jul 2008)
@@ -386,26 +386,28 @@
scanner.register (CScanner, 'include')
type.set_scanner ('CPP', CScanner)
+# Ported to trunk_at_47077
class LibGenerator (generators.Generator):
""" The generator class for libraries (target type LIB). Depending on properties it will
request building of the approapriate specific type -- SHARED_LIB, STATIC_LIB or
SHARED_LIB.
"""
- def __init__ (self, id = 'LibGenerator', composing = True, source_types = [], target_types_and_names = ['LIB'], requirements = []):
- generators.Generator.__init__ (self, id, composing, source_types, target_types_and_names, requirements)
+ def __init__(self, id = 'LibGenerator', composing = True, source_types = [], target_types_and_names = ['LIB'], requirements = []):
+ generators.Generator.__init__(self, id, composing, source_types, target_types_and_names, requirements)
- def run (self, project, name, prop_set, sources):
+ def run(self, project, name, prop_set, sources):
# The lib generator is composing, and can be only invoked with
# explicit name. This check is present in generator.run (and so in
# builtin.LinkingGenerator), but duplicate it here to avoid doing
# extra work.
if name:
- properties = prop_set.raw ()
+ properties = prop_set.raw()
# Determine the needed target type
actual_type = None
- properties_grist = get_grist (properties)
- if '<search>' in properties_grist or '<name>' in properties_grist:
+ properties_grist = get_grist(properties)
+ if '<source>' not in properties_grist and \
+ ('<search>' in properties_grist or '<name>' in properties_grist):
actual_type = 'SEARCHED_LIB'
elif '<file>' in properties_grist:
# The generator for
@@ -415,15 +417,15 @@
else:
actual_type = 'STATIC_LIB'
- prop_set = prop_set.add_raw (['<main-target-type>LIB'])
+ prop_set = prop_set.add_raw(['<main-target-type>LIB'])
# Construct the target.
- return generators.construct (project, name, actual_type, True, prop_set, sources, 'LIB')
+ return generators.construct(project, name, actual_type, prop_set, sources)
- def viable_source_types (self):
+ def viable_source_types(self):
return ['*']
-generators.register (LibGenerator ())
+generators.register(LibGenerator())
### # The implementation of the 'lib' rule. Beyond standard syntax that rule allows
### # simplified:
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