setting a variable in a variant for later use

Jonathan Stickel jjstickel at gmail.com
Thu Oct 18 08:49:29 PDT 2012


On 10/18/12 09:35 , Joshua Root wrote:
> On 2012-10-19 02:16 , Jeremy Lavergne wrote:
>>> I am trying to set a variable in a variant for later use in
>>> another variant, but I am getting errors that the variable does
>>> not exist. Here are the relevant lines:
>>
>> Try wrapping your code in "if {[variant_isset ...]} {...}" rather
>> than inside a variant block--much like how default_variants is used
>> in your code.
>
> That's probably the best approach, since variants aren't guaranteed
> to be evaluated in any particular order.
>
> - Josh
>

Thanks for the prompt, although terse, responses. I am not sure I 
follow. It seems like this would create verbose, nested variants, which 
I was hoping to avoid. Can you provide a simple example?

Thanks,
Jonathan


More information about the macports-dev mailing list