Boost logo

Boost-Build :

Subject: Re: [Boost-build] [boost-build] pass build variant to SHELL rule in Jamroot?
From: Vladimir Prus (vladimir.prus_at_[hidden])
Date: 2015-06-25 02:35:26


On 6/24/2015 11:54 PM, Ryan Gonzalez wrote:
>
>
> On June 24, 2015 3:29:06 PM CDT, Steve Lorimer <steve.lorimer_at_[hidden]> wrote:
>> Is it possible to obtain the build variant in the Jamroot and pass it
>> to a
>> script invoked with the SHELL rule?
>>
>> If so, how can I pass it to the SHELL rule?
>>
>> local result = [ SHELL "script.sh" : "$(variant)" ] ;
>>
>> The above doesn't seem to work (the second argument to the rule doesn't
>> seem to be passed to the script, regardless of what I put there)
>>
>
> I believe it should be:
>
> [ SHELL "script.sh $(variant)" ]
>
> Is accessing the variants like this even possible? I always thought variant info was filled in at a later stage.

Indeed, when Boost.Build parses a Jamfile, there's no particular value of the variant property, or any other
properties, as described at:

        http://www.boost.org/build/doc/html/bbv2/overview.html#bbv2.overview.concepts
        http://www.boost.org/build/doc/html/bbv2/faq.html#bbv2.faq.featurevalue

HTH,
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