|
Boost-Build : |
From: Phillip Seaver (phil_at_[hidden])
Date: 2005-06-01 03:53:06
Toon Knapen wrote:
> Vladimir Prus wrote:
> > No, the <name> feature is still not there. Does "_d" stands for
> "debug"? Then,
> > maybe using the full-blown <tag> feature would be a better approach?
>
> So I tried the 'full blown' tag feature.
> But if I do following for instance:
>
> <Jamroot>
> rule debug-name ( name : type ? : property-set )
> { return $(name)_d ; }
>
> exe tt : tt.cpp : <tag>@debug-name ;
> </Jamroot>
>
> I get an error saying that there is a
> 'duplicate name of actual target: <pbin/gcc/debug>tt_d'
I haven't tried what you're doing, but could it be because there's
nothing in there that refers to the variant?
"<variant>debug:<tag>@debug-name" might work, for example. What I was
using (because, as you said, the non-rule version of <tag> no longer
works) was the following:
rule my_tag ( name : type ? : property-set ) {
local tags ;
local v = [ $(property-set).get <variant> ] ;
if $(v) = debug {
tags += d ;
}
if $(tags) {
return [ virtual-target.add-suffix $(name)_$(tags:J="")
: $(type) : $(property-set) ] ;
}
}
I didn't write this code -- I copied it from somewhere, probably the
jamboost or boost-users archives.
>
> For the moment I solved this doing
>
> obj tt_obj : tt.cpp ;
> exe tt : tt_obj : <tag>@debug-name ;
>
>
> BTW, I also tried the 'historical' <tag> feature but that one is broken.
I'm currently using m10, but when I used the nightly from a while ago (3
weeks, maybe?), I noticed that, too. That's why I went looking for a
sample rule.
Phillip
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