Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2008-02-15 03:44:50


On Friday 15 February 2008 06:03:43 Khassapov, Alex wrote:
> Thanks,
>
> I found how to call rule from context of another module:
>
> local mod = [ CALLER_MODULE ] ;
> module $(mod)
> {
> use-project $(id) : $(dir) ;
> }

Beware! Suppose you have this:

        rule my-helper ( ........... )
        {
                my-helper-aux .....
        }
        rule my-helper-aux ( ... )
        {
             local mod = [ CALLER_MODULE ] ;
             module $(mod)
             {
                 use-project $(id) : $(dir) ;
             }
        }

Then things won't work quite as nicely. That's why I'm suggesting
to use project.current together with project.module -- this does
not depend on the immediate caller.

- 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