From 761501ed9ce55810c856cf194e32fb4fa2094c0c Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 24 Jun 2009 08:08:23 +0000 Subject: [PATCH] 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. [SVN r54298] --- src/tools/common.jam | 46 ++++++++++++++++++++------------------------ 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/src/tools/common.jam b/src/tools/common.jam index 901175ce2..8df9d53d6 100644 --- a/src/tools/common.jam +++ b/src/tools/common.jam @@ -751,37 +751,34 @@ actions hard-link # 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 : + case : result += $(name:B) ; - - case : + + case : result += [ join-tag $(f:G=) : [ toolset-tag $(name) : $(type) : - $(property-set) ] ] ; - - case : + $(property-set) ] ] ; + + case : result += [ join-tag $(f:G=) : [ threading-tag $(name) : $(type) - : $(property-set) ] ] ; - - case : + : $(property-set) ] ] ; + + case : result += [ join-tag $(f:G=) : [ runtime-tag $(name) : $(type) : - $(property-set) ] ] ; - - case : + $(property-set) ] ] ; + + case : local key = [ MATCH : $(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 : + case : local key = [ MATCH : $(f:G) ] ; local p0 = [ MATCH <($(key))> : [ $(property-set).raw ] ] ; if $(p0) @@ -793,14 +790,13 @@ rule format-name ( format * : name : type ? : property-set ) } } - 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) ; }