Ralf Wildenhues <Ralf.Wildenhues <at> gmx.de> writes: > > export POSIXLY_CORRECT > > POSIXLY_CORRECT= > > > > (the two lines can appear in either order). > > FWIW, you need to re-export a variable each time you change it; otherwise, > it is possible that the variable has the new value, but the environment > will propagate the old one; 'info Autoconf --index export' documents this.
That section of the manual states: | Therefore you should `export' again each environment variable that | you update; the export can occur before or after the assignment. You only have to do the export once for the life of the shell, not once per assignment. In other words, the bug is not that those shells track a local and an environment variable separately every time you make a local change, but rather that those shells forget to mark inherited variables as export, while still exporting inherited variables on to children. Once you mark the variable as exported, the shell knows that the variable is on the export list, regardless of how many more times you change it. -- Eric Blake