Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r54298 - trunk/tools/build/v2/tools
From: ghost_at_[hidden]
Date: 2009-06-24 04:08:24


Author: vladimir_prus
Date: 2009-06-24 04:08:23 EDT (Wed, 24 Jun 2009)
New Revision: 54298
URL: http://svn.boost.org/trac/boost/changeset/54298

Log:
Make common.format-name don't check target type.

The use in Jamroot calls it only for library targets,
and other projects might want to call the function for
other target types.

Text files modified:
   trunk/tools/build/v2/tools/common.jam | 46 ++++++++++++++++++---------------------
   1 files changed, 21 insertions(+), 25 deletions(-)

Modified: trunk/tools/build/v2/tools/common.jam
==============================================================================
--- trunk/tools/build/v2/tools/common.jam (original)
+++ trunk/tools/build/v2/tools/common.jam 2009-06-24 04:08:23 EDT (Wed, 24 Jun 2009)
@@ -751,37 +751,34 @@
 #
 rule format-name ( format * : name : type ? : property-set )
 {
- if [ type.is-derived $(type) LIB ]
+ local result = "" ;
+ for local f in $(format)
     {
- local result = "" ;
- for local f in $(format)
+ switch $(f:G)
         {
- switch $(f:G)
- {
- case <base> :
+ case <base> :
                 result += $(name:B) ;
-
- case <toolset> :
+
+ case <toolset> :
                 result += [ join-tag $(f:G=) : [ toolset-tag $(name) : $(type) :
- $(property-set) ] ] ;
-
- case <threading> :
+ $(property-set) ] ] ;
+
+ case <threading> :
                 result += [ join-tag $(f:G=) : [ threading-tag $(name) : $(type)
- : $(property-set) ] ] ;
-
- case <runtime> :
+ : $(property-set) ] ] ;
+
+ case <runtime> :
                 result += [ join-tag $(f:G=) : [ runtime-tag $(name) : $(type) :
- $(property-set) ] ] ;
-
- case <version:*> :
+ $(property-set) ] ] ;
+
+ case <version:*> :
                 local key = [ MATCH <version:(.*)> : $(f:G) ] ;
                 local version = [ $(property-set).get <$(key)> ] ;
                 version ?= $(key) ;
- version = [ MATCH "^([^.]+)[.]([^.]+)[.]?([^.]*)" : $(version) ]
- ;
+ version = [ MATCH "^([^.]+)[.]([^.]+)[.]?([^.]*)" : $(version) ] ;
                 result += [ join-tag $(f:G=) : $(version[1])_$(version[2]) ] ;
 
- case <property:*> :
+ case <property:*> :
                 local key = [ MATCH <property:(.*)> : $(f:G) ] ;
                 local p0 = [ MATCH <($(key))> : [ $(property-set).raw ] ] ;
                 if $(p0)
@@ -793,14 +790,13 @@
                     }
                 }
 
- case * :
+ case * :
                 result += $(f:G=) ;
- }
         }
- result = [ virtual-target.add-prefix-and-suffix $(result:J=) : $(type) :
- $(property-set) ] ;
- return $(result) ;
     }
+ result = [ virtual-target.add-prefix-and-suffix $(result:J=) : $(type) :
+ $(property-set) ] ;
+ return $(result) ;
 }
 
 


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