Re: [PATCH 2/2] Makefile: work around ksh's failure to handle missing list argument to for loop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 7/4/2010 20:37, schrieb Michael J Gruber:
> Brandon Casey venit, vidit, dixit 02.07.2010 20:50:
>> In this case, the for loop in the Makefile expands to look like this:
>>
>>    for p in ; do
>>
>> and ksh complains like this:
>>
>>    /bin/ksh: syntax error at line 15 : `;' unexpected
>>
>> The existing attempt to work around this issue, introduced by 70b89f87,
>> tried to protect the for loop by first testing whether REMOTE_CURL_ALIASES
>> was empty, but it does not seem to work.  So adopt Bruce Stephens's
> 
> What does that mean? Either it works or it doesn't. I did work back
> then. Does it (i.e.: the test for emtyness) fail to work for certain shells?

Before the test for emptyness can happen, the complete statement must be
parsed, but ksh finds a syntax error in the statement and, therefore,
cannot even begin to execute the statement. (ksh doesn't follow POSIX in
this regard, where this would not be a syntax error.)

-- Hannes
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]