RFC: Support for future compilers in base

Lawrence Velázquez larryv at macports.org
Fri Feb 15 14:30:44 PST 2013


On Feb 15, 2013, at 5:11 PM, Ryan Schmidt <ryandesign at macports.org> wrote:

>> +    if {[string first "macports-gcc" $compiler] == 0 ||
>> +        [string first "dragonegg-" $compiler] == 0} {
>> +        return no
>> +    } else {
>> +        return yes
>>     }
> 
> Can't this be:
> 
>    return [string first "macports-gcc" $compiler] == 0 ||
>        [string first "dragonegg-" $compiler] == 0
> 
> 
>> +proc portconfigure::compiler_is_port {compiler} {
>> +    if {[portconfigure::compiler_port_name ${compiler}] == ""} {
>> +        return no
>> +    } else {
>> +        return yes
>> +    }
>> +}
> 
> Can't this be:
> 
> proc portconfigure::compiler_is_port {compiler} {
>    return [portconfigure::compiler_port_name ${compiler}] == ""
> }

I think you have the logic backwards. Both of those expressions would have to be negated before returning the result. Jeremy's original if statements return "no" when the conditionals evaluate to "true".

vq


More information about the macports-dev mailing list