From P.Dalgaard at biostat.ku.dk  Thu Apr 23 18:20:35 2009
From: P.Dalgaard at biostat.ku.dk (Peter Dalgaard)
Date: Thu, 23 Apr 2009 18:20:35 +0200
Subject: [Rd] Problems building R 2.9.0... on SGI and Sun once again
In-Reply-To: <20090423155431.GA6821@cs.umn.edu>
References: <200904201154.n3KBswHQ013943@ruuvi.it.helsinki.fi>
	<20090423155431.GA6821@cs.umn.edu>
Message-ID: <49F09553.4000705@biostat.ku.dk>

Darin A. England wrote:
> I have the same problem trying build R 2.9.0 on AIX using the IBM 
> Visual Age compilers and GNU make. I'm trying to figure it out, but
> any hints on a fix are greatly appreciated.


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. Current Linux versions of bash do not have
that behaviour. As we saw in an earlier post, quotes around $FOO is not
the answer.

One workaround could be to upgrade bash.

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.




-- 
   O__  ---- Peter Dalgaard             ?ster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)              FAX: (+45) 35327907



[Rd] Problems building R 2.9.0... on SGI and Sun once again
Peter Dalgaard