Boost logo

Boost-Commit :

From: ghost_at_[hidden]
Date: 2007-10-16 01:42:09


Author: vladimir_prus
Date: 2007-10-16 01:42:09 EDT (Tue, 16 Oct 2007)
New Revision: 40070
URL: http://svn.boost.org/trac/boost/changeset/40070

Log:
Allow to register same bjam action repeatedly.

Text files modified:
   branches/build/python_port/python/boost/build/engine/engine.py | 9 ++++++---
   1 files changed, 6 insertions(+), 3 deletions(-)

Modified: branches/build/python_port/python/boost/build/engine/engine.py
==============================================================================
--- branches/build/python_port/python/boost/build/engine/engine.py (original)
+++ branches/build/python_port/python/boost/build/engine/engine.py 2007-10-16 01:42:09 EDT (Tue, 16 Oct 2007)
@@ -117,10 +117,13 @@
         set_update_action method. The action_name should be callable
         in the global module of bjam.
         """
- if self.actions.has_key(action_name):
- raise "Bjam action %s is already defined" % action_name
 
- self.actions[action_name] = BjamNativeAction(action_name)
+ # We allow duplicate calls to this rule for the same
+ # action name. This way, jamfile rules that take action names
+ # can just register them without specially checking if
+ # action is already registered.
+ if not self.actions.has_key(action_name):
+ self.actions[action_name] = BjamNativeAction(action_name)
     
     # Overridables
 


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