
... but they do work in version 2.04.21.
Let me start from the beginning. I just upgraded one of my systems from Red Hat 7.1 to 7.2 and suddenly all my automake-generated Makefile's stopped working. The problem can be easily exemplified as follows:
$ bash --version GNU bash, version 2.05.8(1)-release (i386-redhat-linux-gnu) Copyright 2000 Free Software Foundation, Inc. $ for k in ; do echo flip; done bash: syntax error near unexpected token `;' $
On a Red Hat 7.1 system I have, instead,
$ bash --version GNU bash, version 2.04.21(1)-release (i386-redhat-linux-gnu) Copyright 1999 Free Software Foundation, Inc. $ for k in ; do echo flip; done $
i.e., the loop body is executed zero times. This observation prompted me to read the bash FAQ available at ftp://ftp.cwru.edu/pub/bash/FAQ and especially question
E7) What about empty for loops in Makefiles?
whose answer says, among other things,
In versions of bash before bash-2.05a, this was a syntax error. If the reserved word `in' was present, a word must follow it before the semicolon or newline. The language in the manual page referring to the list of words being empty referred to the list after it is expanded. These versions of bash required that there be at least one word following the `in' when the construct was parsed.
...
The latest drafts of the updated POSIX standard have changed this: the word list is no longer required. Bash versions 2.05a and later accept the new syntax.
So, assuming that version "2.05.8(1)-release" is after "bash-2.05a" this would seem a bug in "2.05.8(1)-release". However, assuming "2.04.21(1)-release" is before "bash-2.05a", this would also indicate there is a bug in the FAQ. Does anyone know what is happening? Is there any workaround apart from downgrading bash? All the best,
Roberto

Roberto Bagnara bagnara@cs.unipr.it wrote:
So, assuming that version "2.05.8(1)-release" is after "bash-2.05a"
2.05a is the newest version of GNU bash. 2.05.8(1)-release is something RedHat made out of, I assume, 2.05, the previous version. If you have a problem with GNU's bash, report it here. If you have a problem with RedHat's bash, report it to RedHat. If they introduced the problem, they can fx it; if they find that the problem present in the original GNU release, they can report it here, or notify you so you can do so.
Is there any workaround apart from downgrading bash?
Install GNU's bash 2.05a.
paul
participants (2)
-
prj@po.cwru.edu
-
Roberto Bagnara