Don't hardcode '.so' suffix.

* tools/stage.jam
  (stage-shared-linking-generator.run): Don't hardcode 'so' suffix.
* build/virtual-target.jam
  (abstract-file-target.suffix): Compute and return the real suffix
  that will be used. Previously, it would return something only if the
  suffix was explicitly set.


[SVN r26414]
This commit is contained in:
Vladimir Prus 2004-12-03 11:02:56 +00:00
parent 58566b47bd
commit f0fef4524b
2 changed files with 24 additions and 19 deletions

View File

@ -227,6 +227,21 @@ class abstract-file-target : virtual-target
{
self.suffix = $(suffix) ;
}
else if ! $(self.suffix)
{
if $(self.type)
{
local properties ;
if $(self.action)
{
local ps = [ $(self.action).properties ] ;
properties = [ $(ps).raw ] ;
}
self.suffix = [ type.generated-target-suffix $(self.type) :
$(properties) ] ;
}
}
return $(self.suffix) ;
}
@ -412,26 +427,15 @@ class abstract-file-target : virtual-target
rule actual-basename ( )
{
local name = [ path.native $(self.name) ] ;
if $(self.suffix)
local suffix = [ suffix ] ;
if $(suffix)
{
name = $(name).$(self.suffix) ;
return $(name).$(suffix) ;
}
else if $(self.type)
else
{
local properties ;
if $(self.action)
{
local ps = [ $(self.action).properties ] ;
properties = [ $(ps).raw ] ;
}
local suffix = [ type.generated-target-suffix $(self.type) :
$(properties) ] ;
if $(suffix)
{
name = $(name).$(suffix) ;
}
}
return $(name) ;
return $(name) ;
}
}

View File

@ -359,9 +359,10 @@ class stage-shared-lib-generator : generator
# Need to change the name of the target and relink
local relinked =
[ stage.relink-file $(project) : $(property-set) : $(source) ] ;
# FIXME: use hardcoded .so.
local so-version = [ $(property-set).get <so-version> ] ;
$(relinked).suffix so.$(so-version) ;
local existing-suffix = [ $(relinked).suffix ] ;
$(relinked).suffix $(existing-suffix).$(so-version) ;
# Break into private member of 'virtual-target' and change
# the name.
modules.poke $(relinked) : self.name : $(name) ;