|
Boost-Commit : |
From: ghost_at_[hidden]
Date: 2008-05-18 00:29:54
Author: vladimir_prus
Date: 2008-05-18 00:29:53 EDT (Sun, 18 May 2008)
New Revision: 45469
URL: http://svn.boost.org/trac/boost/changeset/45469
Log:
Various fixes.
Text files modified:
branches/build/python_port/python/boost/build/build/project.py | 21 ++++++++++++++++++---
1 files changed, 18 insertions(+), 3 deletions(-)
Modified: branches/build/python_port/python/boost/build/build/project.py
==============================================================================
--- branches/build/python_port/python/boost/build/build/project.py (original)
+++ branches/build/python_port/python/boost/build/build/project.py 2008-05-18 00:29:53 EDT (Sun, 18 May 2008)
@@ -765,8 +765,18 @@
self.rules = {}
self.local_names = [x for x in self.__class__.__dict__
if x not in ["__init__", "init_project", "add_rule",
- "error_reporting_wrapper"]]
+ "error_reporting_wrapper", "add_rule_for_type"]]
self.all_names_ = [x for x in self.local_names]
+
+ def add_rule_for_type(self, type):
+ rule_name = type.lower();
+
+ def xpto (name, sources, requirements = [], default_build = None, usage_requirements = []):
+ return self.manager_.targets().create_typed_target(
+ type, self.registry.current(), name[0], sources,
+ requirements, default_build, usage_requirements)
+
+ self.add_rule(type.lower(), xpto)
def add_rule(self, name, callable):
self.rules[name] = callable
@@ -783,8 +793,10 @@
except ExceptionWithUserContext, e:
e.report()
except Exception, e:
- print "internal error:", e
- traceback.print_exc()
+ try:
+ self.manager_.errors().handle_stray_exception (e)
+ except ExceptionWithUserContext, e:
+ e.report()
finally:
self.manager_.errors().pop_jamfile_context()
@@ -931,6 +943,9 @@
location = attributes.get("location")
m = self.registry.load_module(toolset[0], [location])
+ if not m.__dict__.has_key("init"):
+ self.registry.manager.errors()(
+ "Tool module '%s' does not define the 'init' method" % toolset[0])
m.init(*args)
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