|
Boost-Build : |
From: João Abecasis (jpabecasis_at_[hidden])
Date: 2006-04-21 13:13:09
Marc Boris Dürner wrote:
> Hi,
>
> I successfully used bjam to build a previous jam project by renaming bjam to
> xjam. Except for one rule (FDefines) and using the right JAM_TOOLSET no
> changes were neccesary. It would be nice if bjam could be kept compatible to
> classic-jam in the future.
>
> I am now trying the enhanced syntax of bjam like module etc. IT seems that I
> can declare modules but not call rules in it from the global space, even
> when qualified.
>
> Example:
> module X
> {
> rule greet ( x ) { Echo x ; }
> }
>
>
> module Y
> {
> rule salute { greet ; }
> }
>
> # this deoes not work, but is an unknown rule
> X.greet ;
>
>
> Any ideas why?
The thing is that part of the magic (<module>.<rule>) is offered by
Boost.Build v2 and not directly by bjam. You would have to invoke the
BBv2 rule import in order for that to work.
module X
{
rule greet ( x ) { echo x ; }
}
import X ;
X.greet ;
> Surprisingly, when I IMPORT X : greet : : greet ; then I can call greet like
> a global rule.
What BB does is alias X::greet to X.greet in the global namespace, where
X.greet is actually a single identifier.
HTH,
João
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