Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-06-16 06:03:59


On Thursday 16 June 2005 14:53, David Abrahams wrote:

> > Hmm... did you try something like:
> >
> > local c = [ project.current ]
> > local project-module = [ $(c).project-module ]
> > module $(project-module)
> > {
> > # Declare everything you want.
> > }
> >
> > That would be equivalent to putting the code in "{}" right in invoking
> > Jamfile.
>
> Of course I didn't :)
> How would I know to do something like that?

Well... the only way to make the rule ask exactly as if the code is in Jamfile
is to change to the Jamfiles's module.

>
> Do you think that's an appropriate strategy for the world-at-large,
> and not just the cogniscenti?

I think it's fine. The only other approach I see is to allow the user to
specify, for each rule in Jamfile, if it should be inherited by child project
localized (so that it work in context of Jamfile without any effort), or not.

They used to be inherited localized at some point, but then it leads to
strange behaviour. Consider:

.something = .... ;

rule helper ( )
{
... use .something ...
}

Then each child Jamfile will get a localized version of .helper, that will
look for .something in that Jamfile, not in the Jamfile that defines the
rule.

Probably can be helped with the constant rule, but still I found it more
logical to inherit rules non-localized.

- Volodya

-- 
Vladimir Prus
http://vladimir_prus.blogspot.com
Boost.Build V2: http://boost.org/boost-build2
 

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