Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r64689 - in trunk/tools/build/v2: build tools
From: ghost_at_[hidden]
Date: 2010-08-09 04:35:11


Author: vladimir_prus
Date: 2010-08-09 04:35:02 EDT (Mon, 09 Aug 2010)
New Revision: 64689
URL: http://svn.boost.org/trac/boost/changeset/64689

Log:
Make 'mark-target-as-explicit' accept multiple target names.

Text files modified:
   trunk/tools/build/v2/build/project.py | 8 ++------
   trunk/tools/build/v2/build/targets.jam | 4 ++--
   trunk/tools/build/v2/build/targets.py | 6 +++---
   trunk/tools/build/v2/tools/package.py | 4 ++--
   4 files changed, 9 insertions(+), 13 deletions(-)

Modified: trunk/tools/build/v2/build/project.py
==============================================================================
--- trunk/tools/build/v2/build/project.py (original)
+++ trunk/tools/build/v2/build/project.py 2010-08-09 04:35:02 EDT (Mon, 09 Aug 2010)
@@ -1016,14 +1016,10 @@
         attributes.set("projects-to-build", now + dir, exact=True)
 
     def explicit(self, target_names):
- t = self.registry.current()
- for n in target_names:
- t.mark_target_as_explicit(n)
+ self.registry.current().mark_targets_as_explicit(target_names)
 
     def always(self, target_names):
- p = self.registry.current()
- for n in target_names:
- p.mark_target_as_always(n)
+ self.registry.current().mark_targets_as_alays(target_names)
 
     def glob(self, wildcards, excludes=None):
         return self.registry.glob_internal(self.registry.current(),

Modified: trunk/tools/build/v2/build/targets.jam
==============================================================================
--- trunk/tools/build/v2/build/targets.jam (original)
+++ trunk/tools/build/v2/build/targets.jam 2010-08-09 04:35:02 EDT (Mon, 09 Aug 2010)
@@ -297,14 +297,14 @@
     # Add 'target' to the list of targets in this project that should be build
     # only by explicit request
     #
- rule mark-target-as-explicit ( target-name )
+ rule mark-target-as-explicit ( target-name * )
     {
         # Record the name of the target, not instance, since this rule is called
         # before main target instances are created.
         self.explicit-targets += $(target-name) ;
     }
     
- rule mark-target-as-always ( target-name )
+ rule mark-target-as-always ( target-name * )
     {
         # Record the name of the target, not instance, since this rule is called
         # before main target instances are created.

Modified: trunk/tools/build/v2/build/targets.py
==============================================================================
--- trunk/tools/build/v2/build/targets.py (original)
+++ trunk/tools/build/v2/build/targets.py 2010-08-09 04:35:02 EDT (Mon, 09 Aug 2010)
@@ -131,7 +131,7 @@
 
                 # Inline targets are not built by default.
                 p = t.project()
- p.mark_target_as_explicit(name)
+ p.mark_targets_as_explicit([name])
                 result.append(name)
 
             else:
@@ -441,7 +441,7 @@
                         
         return result
 
- def mark_target_as_explicit (self, target_name):
+ def mark_targets_as_explicit (self, target_names):
         """Add 'target' to the list of targets in this project
         that should be build only by explicit request."""
         
@@ -449,7 +449,7 @@
         # rule is called before main target instaces are created.
         self.explicit_targets_.add(target_name)
 
- def mark_target_as_always(self, target_name):
+ def mark_targets_as_always(self, target_names):
         self.always_targets_.add(target_name)
     
     def add_alternative (self, target_instance):

Modified: trunk/tools/build/v2/tools/package.py
==============================================================================
--- trunk/tools/build/v2/tools/package.py (original)
+++ trunk/tools/build/v2/tools/package.py 2010-08-09 04:35:02 EDT (Mon, 09 Aug 2010)
@@ -130,7 +130,7 @@
     pt = get_manager().projects().current()
 
     for subname in ["bin", "lib", "headers", "lib-shared", "lib-static", "lib-shared-universe", "lib-shared-cygwin"]:
- pt.mark_target_as_explicit(name + "-" + subname)
+ pt.mark_targets_as_explicit([name + "-" + subname])
 
 @bjam_signature((["target_name"], ["package_name"], ["data", "*"], ["requirements", "*"]))
 def install_data(target_name, package_name, data, requirements):
@@ -148,7 +148,7 @@
     stage.install(target_name, data,
                   requirements + ["<location>" + os.path.join(datadir, package_name)])
 
- get_manager().projects().current().mark_target_as_explicit(target_name)
+ get_manager().projects().current().mark_targets_as_explicit([target_name])
 
 def get_prefix(package_name, requirements):
 


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