|
From: Daniel J S. <dan...@ie...> - 2012-12-27 07:11:36
|
On 12/26/2012 08:11 PM, Mikhail Kononets wrote:
> On 27/12/2012 00:09, Daniel J Sebald wrote:
>> On 12/26/2012 02:57 PM, Mikhail Kononets wrote:
>>> i can see the following line inside the ./configure script
>>>
>>> CXX=${CXX-${host_alias}-c++}
>>
>> Strange construct. Given
>>
>> AA=${BB-${CC}-c++}
>>
>> it seems that if BB is defined AA ends up being BB. If BB is not
>> defined and CC is then AA is ${CC}-c++. If neither BB or CC is defined
>> then AA is -c++. Is the dash supposed to be similar to a conditional?
>
> first dash is conditional, but the second must be literal in this notation.
OK, it is conditional. I did some tests here and the correct
construct/syntax appears to be the following:
AA=${BB-${CC-c++}}
It is easy enough to test at a shell command line by having BB/CC
defined and not defined in various combinations.
Dan
|