|
Boost-Build : |
From: Rene Rivera (grafik.list_at_[hidden])
Date: 2004-11-30 22:48:23
Joel wrote:
> Joao Abecasis wrote:
>
>> Hi,
>>
>> Joel wrote:
>>
>>
>>> Hi,
>>>
>>> Here are some tweaks. I really think we should do this
>>> in the CVS. It's getting out of control.
>>
>>
>>
>> I'll have to agree... I had to diff your archives to find out
>> what changed ;)
>>
>> One note on some of the tweaks, though. From my patches you
>> cannot rely on SPIRIT_HAVE_BOOST_THREADS,
>> SPIRIT_HAVE_BOOST_REGEX, SPIRIT_NO_MINIBOOST to not being
>> defined. The top level Jamrules explicitly sets them to the
>> literal "FALSE".
>>
>> This was the "hack" I could come up with... How can I test if a
>> variable is defined with bjam? All I found is that ?= will assign
>> if a variable is not defined and both empty and undefined
>> variables have a negative logical value.
>
>
> I guess we'll have to ask the Boost.Build guys. I cross posted
> to the list.
I'm guessing that by variable you mean environment variable..
Question is what do you mean by "defined" ?
If it means it has no value, you can test it has a value by using
evaluating it in a condition...
if $(SOME_VAR) { do_something ; }
If you want to test it doesn't have a value you negate...
if ! $(SOME_VAR) { not_something ; }
But if undefined is setting to a specific value then you just do a
comparison...
if $(SOME_VAR) = FALSE { false_something ; }
Place to look for that syntax is at:
http://www.boost.org/tools/build/jam_src/Jam.html
HTH.
-- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com - 102708583/icq
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