|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2007-10-25 02:36:29
Johan Nilsson wrote:
> (please drop the html)
>
>>"ê¹ìí" <yhyun.kim_at_[hidden]> wrote in message
>>news:72199eb50710242152s40be8f2fnbbbeb2bdc388ca20_at_mail.gmail.com...
>>Hello.
>>
>>I declared some path-constants in Jamroot.
>>
>>After done that, I used them in Jamfiles. It worked fine as you knew.
>>
>>But I got a problem when I used them in *.jam files.
>>
>>Does anybody know how to use path-constants in *.jam files?
>
> I'm not really sure what you're after, but perhaps you could try something
> like:
>
> Use "modules.poke", to make them available in the "global" namespace (and
> perhaps modules.peek to retrieve them). You could also take a look at the
> IMPORT built-in.
>
> or:
>
> Pass the constants as arguments to the rules defined within your .jam
> files.
Right. Basically, .jam files don't have direct access to path-constants --
because path constants for Jamfiles and generally, location of .jam files
do not matter. I don't want any path constant to propagate into gcc.jam ;-)
Depending on what you're trying to do you can either:
1. Pass constants to your module explicitly, calling some rule.
2. Pass the name of Jamfile module to your module, and then use 'peek'.
3. Obtain name of Jamfile module from result of [ project.current ]
and again use 'peek'
- 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