Boost logo

Boost-Build :

From: David Abrahams (dave_at_[hidden])
Date: 2005-07-01 18:13:36


Andrey Melnikov <melnikov_at_[hidden]> writes:

> David Abrahams wrote:
>> Andrey Melnikov <melnikov_at_[hidden]> writes:
>>
>>>What's the differense between [ modules.peek : TOOLS ] ; and [
>>>os.environ TOOLS ] ?
>>
>>
>> The former looks into the global module for the TOOLS variable. It
>> might not correspond to anything in the environment. The latter gets
>> the value of the TOOLS variable in the environment. When bjam starts,
>> it puts the environment plus the command-line -s options into the
>> global module, but it also does some weird preprocessing on the
>> values, like splitting them at whitespace, so they start out not being
>> quite what's in the environment, and can always be changed later.
>>
> I'd like to pick up values from both command line -s and environment
> just like bbv1 recognizes TOOLS. How should I do this?

You can peek the global module as above and hope for the best, or you
can examine os.environ and peek the global module for the ARGV
variable and inspect the arguments to bjam directly. I guess ARGV
ought to be a rule if we want it to be inviolable.

HTH,

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com
 

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