Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-12-16 11:29:25


Hi Pedro,

> > This means the name should be complete customisable by means of some
> > user-provided rule. Currently, the <tag> feature can be used to
> > specify a
> > rule which returns the right name. If the rule prototype is:
> >
> > rule tag-rule ( original-name * : original-suffix ? : target-type
> > ? :
> > properties )
> > {
> >
> > }
> >
> > Then the rule can return new name using whatever rules, including
> > those you
> > list above. It will also be possible for one project to add version to
> > lib
> > names, and for another project to don't add it. What do you think?
>
> The basic idea is very good but, looking at the code, it seems this
> will be called just once per target and modify all files generated by
> that target the same way. To support the Windows case, I would need it
> to be called once per generated file... Can you move the <tag> logic
> down to the generator.generated-targets? Or are there any side-effects
> I overlooked?

Yea, we must be carefull to avoid applying <tag> to all targets. Say:

lib a : a.cpp ;

you don't want to apply <tag> to a.obj, right? Of course, this is doable, just
not as straight-forward as I'd like.

> > The only question is how to conveniently specify in top-level Jamfile
> > that
> > specific <tag> feature should apply to lib targets.
> >
> > I was thinking about
> >
> > project top :
> > requirements <main-target-type>LIB:<tag>@some-naming-scheme
> > ;
> >
> > but this won't work for target which type is *derived* from "LIB", or
> > if lib
> > generator is used when building main target which type is not "lib".
>
> Almost perfect, isn't it :-(
> Still, I think most people can live with this and, those who don't, can
> apply the rule to all targets and discriminate that in the rule itself.

BTW, I forgot to ask the most important question: why do you prefer to specify
<tag> on targets, not on stage? To avoid relinking, or you have some other
reasons. I suspect I'll need to write a FAQ entry on this.

- Volodya

 


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