Boost logo

Boost-Build :

From: Jurko Gospodnetiæ (jurko.gospodnetic_at_[hidden])
Date: 2008-04-30 16:10:05


   Hi all.

   Related to my previous post 'invalid/outdated comments & code in
generators.jam' I ran into some stale code in modifiers.jam where
classes defined there still used the long removed 'multiple' parameter
for the generators.construct() rule.

   Attached patch removes this code.

   Any objections to applying it? I have not found any code that
actually uses this code in boost but I guess this could potentially
break someone's build if they manually called any of the modified rules
in this module and actually passed them a value for the 'multiple'
parameter (even though that value was never used :-)).

   Best regards,
     Jurko Gospodnetiæ

Index: tools/build/v2/build/modifiers.jam
===================================================================
--- tools/build/v2/build/modifiers.jam (revision 44949)
+++ tools/build/v2/build/modifiers.jam (working copy)
@@ -45,7 +45,7 @@
     # Wraps the generation of the target to call before and after rules to
     # affect the real target.
     #
- rule run ( project name ? : property-set : sources + : multiple ? )
+ rule run ( project name ? : property-set : sources + )
     {
         local result ;
         local current-target = $(project)^$(name) ;
@@ -54,24 +54,20 @@
             # Before modifications...
             local project_ =
                 [ modify-project-before
- $(project) $(name) : $(property-set) : $(sources) : $(multiple) ] ;
+ $(project) $(name) : $(property-set) : $(sources) ] ;
             local name_ =
                 [ modify-name-before
- $(project) $(name) : $(property-set) : $(sources) : $(multiple) ] ;
+ $(project) $(name) : $(property-set) : $(sources) ] ;
             local property-set_ =
                 [ modify-properties-before
- $(project) $(name) : $(property-set) : $(sources) : $(multiple) ] ;
+ $(project) $(name) : $(property-set) : $(sources) ] ;
             local sources_ =
                 [ modify-sources-before
- $(project) $(name) : $(property-set) : $(sources) : $(multiple) ] ;
- local multiple_ =
- [ modify-multiple-before
- $(project) $(name) : $(property-set) : $(sources) : $(multiple) ] ;
+ $(project) $(name) : $(property-set) : $(sources) ] ;
             project = $(project_) ;
             name = $(name_) ;
             property-set = $(property-set_) ;
             sources = $(sources_) ;
- multiple = $(multiple_) ;
 
             # Generate the real target...
             local target-type-p =
@@ -79,7 +75,7 @@
             self.targets-in-progress += $(current-target) ;
             result =
                 [ generators.construct $(project) $(name)
- : $(target-type-p:G=) $(multiple)
+ : $(target-type-p:G=)
                     : $(property-set)
                     : $(sources) ] ;
             self.targets-in-progress = $(self.targets-in-progress[1--2]) ;
@@ -89,39 +85,33 @@
                 [ modify-target-after $(result)
                     : $(project) $(name)
                     : $(property-set)
- : $(sources)
- : $(multiple) ] ;
+ : $(sources) ] ;
         }
         return $(result) ;
     }
 
- rule modify-project-before ( project name ? : property-set : sources + : multiple ? )
+ rule modify-project-before ( project name ? : property-set : sources + )
     {
         return $(project) ;
     }
 
- rule modify-name-before ( project name ? : property-set : sources + : multiple ? )
+ rule modify-name-before ( project name ? : property-set : sources + )
     {
         return $(name) ;
     }
 
- rule modify-properties-before ( project name ? : property-set : sources + : multiple ? )
+ rule modify-properties-before ( project name ? : property-set : sources + )
     {
         return $(property-set) ;
     }
 
- rule modify-sources-before ( project name ? : property-set : sources + : multiple ? )
+ rule modify-sources-before ( project name ? : property-set : sources + )
     {
         return $(sources) ;
     }
 
- rule modify-multiple-before ( project name ? : property-set : sources + : multiple ? )
+ rule modify-target-after ( target : project name ? : property-set : sources + )
     {
- return $(multiple) ;
- }
-
- rule modify-target-after ( target : project name ? : property-set : sources + : multiple ? )
- {
         return $(target) ;
     }
 
@@ -170,7 +160,7 @@
 
     # Modifies the name, by cloning the target with the new name.
     #
- rule modify-target-after ( target : project name ? : property-set : sources + : multiple ? )
+ rule modify-target-after ( target : project name ? : property-set : sources + )
     {
         local result = $(target) ;
 


Boost-Build 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