Boost logo

Boost-Build :

Subject: Re: [Boost-build] How to peek into the global module? / Name of the global module?
From: Deniz Bahadir (D.Bahadir_at_[hidden])
Date: 2010-02-18 08:45:26


I made a small mistake in the example, it should read like this:

myVariable1 = "myVal1" ;
constant myVariable2 : "myVal2" ;

module anotherModule {
   echo "myVal1 is: " [ modules.peek <NAME_OF_GLOBAL_MODULE> : myVariable1 ] ;
   echo "myVal2 is: " [ modules.peek <NAME_OF_GLOBAL_MODULE> : myVariable2 ] ;
}

The question is still the same.
DENIZ

2010/2/18 Deniz Bahadir <D.Bahadir_at_[hidden]>:
> Hi guys,
>
> I have a short question: What is the name of the global module?
> I need this, because I want to use "modules.peek" to get the value of
> a variable, which I defined in Jamroot, from within another module as
> in the following short example:
>
>
> myVariable1 = "myVal1" ;
> constant my Variable2 : "myVal2" ;
>
> module anotherModule {
>    echo "myVal1 is: " [ modules.peek <NAME_OF_GLOBAL_MODULE> : myVal1 ] ;
>    echo "myVal2 is: " [ modules.peek <NAME_OF_GLOBAL_MODULE> : myVal2 ] ;
> }
>
>
> BTW: Does it make any difference, if the variable was created as
> constant or as old-style Bjam-variable?
>
> Thanks in advance,
> DENIZ
>


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