|
Boost-Commit : |
From: jurko.gospodnetic_at_[hidden]
Date: 2008-05-12 14:32:00
Author: jurko
Date: 2008-05-12 14:31:59 EDT (Mon, 12 May 2008)
New Revision: 45304
URL: http://svn.boost.org/trac/boost/changeset/45304
Log:
Documented that modules.call-in and modules.call-locally rules may forward at most 8 parameters to the rules they call. Also removed the extra unused $(9) parameter forwarding in the modules.call-locally rule.
Text files modified:
trunk/tools/build/v2/kernel/modules.jam | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
Modified: trunk/tools/build/v2/kernel/modules.jam
==============================================================================
--- trunk/tools/build/v2/kernel/modules.jam (original)
+++ trunk/tools/build/v2/kernel/modules.jam 2008-05-12 14:31:59 EDT (Mon, 12 May 2008)
@@ -63,7 +63,8 @@
# Call the given rule locally in the given module. Use this for rules accepting
# rule names as arguments, so that the passed rule may be invoked in the context
# of the rule's caller (for example, if the rule accesses module globals or is a
-# local rule).
+# local rule). Note that rules called this way may accept at most 8 parmeters.
+#
rule call-in ( module-name ? : rule-name args * : * )
{
module $(module-name)
@@ -75,14 +76,19 @@
# Given a possibly qualified rule name and arguments, remove any initial module
# qualification from the rule and invoke it in that module. If there is no
-# module qualification, the rule is invoked in the global module.
+# module qualification, the rule is invoked in the global module. Note that
+# rules called this way may accept at most 8 parmeters.
+#
rule call-locally ( qualified-rule-name args * : * )
{
local module-rule = [ MATCH (.*)\\.(.*) : $(qualified-rule-name) ] ;
local rule-name = $(module-rule[2]) ;
rule-name ?= $(qualified-rule-name) ;
- return [ call-in $(module-rule[1]) : $(rule-name) $(args)
- : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ] ;
+ # We pass only 8 parameters here since Boost Jam allows at most 9 rule
+ # parameter positions and the call-in rule already uses up the initial
+ # position for the module name.
+ return [ call-in $(module-rule[1]) : $(rule-name) $(args) : $(2) : $(3) :
+ $(4) : $(5) : $(6) : $(7) : $(8) ] ;
}
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