|
Boost-Build : |
From: Gary Kratkin (gary_at_[hidden])
Date: 2008-01-30 01:43:27
[I posted a similar message on boost.users without reply]
I'm a bjam neophyte trying to generate .pdb files for the static library
targets of a complete boost build. My idea was to pass -Fd in the relevant
actions blocks, something like this:
actions compile-c-c++
{
$(.CC)
@"@($(<[1]:W).rsp:E="$(>[1]:W)" -Fd"$(cur-pdb-file)" -Fo"$(<[1]:W)" -Yu"$(>[3]:D=)"
-Fp"$(>[2]:W)" $(CC_RSPLINE))" $(.CC.FILTER)
}
The question is how to determine the high level target name (the .lib) at
this level. I attempted to set the variable cur-pdb-file from an archive
rule:
# New static lib rule to set pdb name for compiles.
# Create a pdb name from the target. The name comes in like this:
#
<pbin.v2\libs\signals\build\msvc-9.0\debug\link-static\threading-multi>libboost_signals-vc90-mt-gd-1_35.lib
# so strip the <p and the > at the start and end of the path.
rule archive ( targets + : sources * : properties * )
{
local split = [ MATCH (<p)(.*)>(.*)([.])(.*) : $(<) ] ;
local dir-part = $(split[2]) ;
local file-part = $(split[3]) ;
cur-pdb-file = $(dir-part)"\\"$(file-part)".pdb" ;
echo "rule archive - cur-pdb-file: $(cur-pdb-file)" ;
}
but the rule is evaluated for all targets before the actions run, so
cur-pdb-file is incorrect for all but one target. Can someone point me in
the right direction? I don't understand the model.
This is VS2008 and either 1_34_1 or 1_35 release branch.
Thanks,
Gary Kratkin
Boost-Build 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