compile error mol-0.9.70

Samuel Rydh mol-general@lists.maconlinux.org
Sat, 27 Mar 2004 00:27:51 +0100


On Fri, Mar 26, 2004 at 11:26:20PM +0100, Andreas Schwab wrote:
> Some versions of bash makes omitting the word list after `in' a syntax
> error (IIRC the previous POSIX standard didn't allow this syntax).  To
> avoid the error, you should use something like this:
> 
>         list='$(...)'; for x in $$list; do ...

Yeah, I suspected that much. I was just surprised to see this
problem since I have tested the build system on a wide range
of installations (including very ancient ones) and I find it hard
to believe that new versions of bash would regress to disallow
this syntax.

But a quick glance through the p1003.2-d11.2 standard from 1991 shows
that the 'for x in ; do...' syntax is unspecified (although in my opinion
quite natural). On the other hand 'for x in ... ; do ; done' generates
an error which is a bit inconsistent if 'for x in ; do ...' is accepted
as a valid syntax.

Anyway, I have added the workaround.

/Samuel