Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-02-25 11:15:44


Rene Rivera wrote:
> [2003-02-25] Vladimir Prus wrote:
> >Ee... the 'name-modifier' generator has '<name-modify>yes' as
> > requirements,
>
> it
>
> >should be preferred to generic linker. There are three problems:
> >
> >1. The <name-modify> is not optional, so the default value is added to
>
> build
>
> >request. Later <name-modify>yes is added too, so there are two different
> >values. Not sure this is the real problem yet.
>
> I see you fixed that. I coun't immediate see how to fix this, so thanks :-)

I've made <name-modify> optional. Kind of kluge, but works for now.

> So the "optional-properties" rule is the one that makes the modifier more
> specific now? I'll read up on those rules then.

Please let me know if the docs are unclear, and I'll clarify 'em in that case.

> >3. When cloning the target, you don't clone the action. The problem is
> > that action has a back pointer to all it's targets, so cloning just
> > target does not work. Your comment which reads:
> >
> > # Need a MUTCH better way to clone a target...
> > # ...Or a way to mutate an existing target safely.
> >
> >Is *extremely* right!
>
> Ah totally unaware that the action was part of it also :-(

OK, I've tried to tweak the UML diagram in virtual-targets.jam. Not sure this
is of any help :-/

> >1. Cloning of targets should become separate rule, unless we want bugs all
> >over the place (current stage.jam uses the same).
>
> Definitely... but what about the other choice I mention in my comment? Can
> a target, as returned by the "run" rule be safely modified without cloning
> it? In the name-modifier case I could not because there is no way (that I
> know) of changing the name of the target.

I think there's no way to safely modify a target. The reason is simple: we try
to avoid duplicated targets (so that we don't recompile twice). The
virtual-target.register rule takes care of it: you give it a new virtual
target and it returns the already created one, if it has the same properties.

This scheme requires that you don't change the created targets. I've afraid
cloning is the only option.

- 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