From simon.urbanek at r-project.org  Wed Apr 29 15:36:52 2009
From: simon.urbanek at r-project.org (Simon Urbanek)
Date: Wed, 29 Apr 2009 09:36:52 -0400
Subject: [Rd] Problems building R 2.9.0... on SGI and Sun once again
In-Reply-To: <200904290955.n3T9ti6H016943@ruuvi.it.helsinki.fi>
References: <200904290955.n3T9ti6H016943@ruuvi.it.helsinki.fi>
Message-ID: <F4F64C57-A1FF-4EE0-9DAE-8C233B49BC7B@r-project.org>


On Apr 29, 2009, at 5:55 , Atro Tossavainen wrote:

> (This is really in response to Peter Dalgaard, not to myself)
>
>> This seems to come from constructions of the form
>>
>> for i in $FOO : do .... ; done
>>
>> If $FOO is empty, then the resulting "for i in ;" is a syntax error
>> with some versions of bash and sh.
>
> Given that one should generally be writing scripts for the Bourne
> shell, it is IMHO the case that "for i in ;" is a syntax error,  
> period.
>
>> Current Linux versions of bash do not have that behaviour.
>
> ...violating Bourne shell compatibility in yet another way...
>
>> One workaround could be to upgrade bash.
>
> If R is to be an application that is not specific to (recent  
> distributions
> of) Linux, one should expect and code for systems that may not have  
> bash
> at all but only the Bourne shell.
>
>> Another workaround could be to safeguard the for-loop with
>>
>> test "$FOO" != "" && for i in $FOO : do .... ; done
>>
>> in all of the Makefiles where this can be an issue.
>
> That is one of the possible ways in which R developers could, I
> suppose, address the issue.
>

You could check, I suppose, that it has been addressed in a similar  
way ;).

Cheers,
Simon



[Rd] Problems building R 2.9.0... on SGI and Sun once again
Simon Urbanek