|
Boost Users : |
From: Daniel Krügler (dsp_at_[hidden])
Date: 2006-08-01 03:09:24
Hello!
Regrettably my posting "Labeling patched Boost versions" from 2006-07-21
got no response :-(( - so I would like to manipulate the boost bjam
on my own to reach the effect that the build libraries will have a fixed
character sequence suffix (aka "build id") but I got lost, when I tried
this.
My assumption was that I only need to modify Jamfile.v2 in the root
directory where I found the promising rules beginning with line 92:
# This rule is called by Boost.Build to determine the name of
# target. We use it to encode build variant, compiler name and
# boost version in the target name
rule tag ( name : type ? : property-set )
{
if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB
{
if $(layout) = versioned
{
name = [ stage.add-variant-and-compiler $(name)
: $(type) : $(property-set) ] ;
local version-tag = [ MATCH "^([^.]+)[.]([^.]+)" :
$(BOOST_VERSION[1]) ] ;
version-tag = $(version-tag:J="_") ;
# On NT, library with version suffix won't be recognized
# by linkers. On CYGWIN, we get strage duplicate symbol
# errors when library is generated with version suffix.
# On OSX, version suffix is not needed -- the linker expets
# libFoo.1.2.3.dylib format.
# AIX linkers don't accept version suffixes either.
if [ $(property-set).get <os> ] in NT CYGWIN MACOSX AIX
{
return $(name:B)-$(version-tag)$(name:S) ;
}
else
{
return
$(name:B)-$(version-tag)$(name:S).$(BOOST_VERSION) ;
}
}
else
{
return [ stage.add-variant-and-compiler $(name)
: $(type) : $(property-set) ] ;
}
}
}
Naively I just tried to add a fixed string to the returned name, e.g.
# This rule is called by Boost.Build to determine the name of
# target. We use it to encode build variant, compiler name and
# boost version in the target name
rule tag ( name : type ? : property-set )
{
if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB
{
if $(layout) = versioned
{
name = [ stage.add-variant-and-compiler $(name)
: $(type) : $(property-set) ] ;
local version-tag = [ MATCH "^([^.]+)[.]([^.]+)" :
$(BOOST_VERSION[1]) ] ;
version-tag = $(version-tag:J="_") ;
# On NT, library with version suffix won't be recognized
# by linkers. On CYGWIN, we get strage duplicate symbol
# errors when library is generated with version suffix.
# On OSX, version suffix is not needed -- the linker expets
# libFoo.1.2.3.dylib format.
# AIX linkers don't accept version suffixes either.
if [ $(property-set).get <os> ] in NT CYGWIN MACOSX AIX
{
return $(name:B)-$(version-tag)$(name:S)."A" ;
}
else
{
return
$(name:B)-$(version-tag)$(name:S).$(BOOST_VERSION)."B" ;
}
}
else
{
return [ stage.add-variant-and-compiler $(name)
: $(type) : $(property-set)."C" ] ;
}
}
}
but that did not influence the resulting names of a new bjam build at
all. Could someone please help a dump bjam beginner to reach the wanted
effect, e.g. to attach a given fixed string constant like "M20060801"
to all created libraries??
Thank you very much for your patience,
Daniel Krügler
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net