1 Nov 2011 13:12
[PATCH] m4sh: always re-exec with $CONFIG_SHELL, if it's set
Stefano Lattarini <stefano.lattarini <at> gmail.com>
2011-11-01 12:12:11 GMT
2011-11-01 12:12:11 GMT
* lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Always re-execute the current script with $CONFIG_SHELL, if that's set. * tests/m4sh.at: Add tests for the new semantics, in ... (Re-exec with CONFIG_SHELL): ... this new section. * doc/autoconf.texi (config.status Invocation): Update. * doc/install.texi (Defining Variables): Likewise. * NEWS: Likewise. --- ChangeLog | 11 ++++++ doc/autoconf.texi | 11 ++---- doc/install.texi | 6 ++-- lib/m4sugar/m4sh.m4 | 90 +++++++++++++++++++++++++++++++++----------------- tests/m4sh.at | 68 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 145 insertions(+), 41 deletions(-) diff --git a/ChangeLog b/ChangeLog index e51f7d7..188c394 100644 --- a/ChangeLog +++ b/ChangeLog <at> <at> -1,3 +1,14 <at> <at> +2011-11-01 Stefano Lattarini <stefano.lattarini <at> gmail.com> + + m4sh: always re-exec with $CONFIG_SHELL, if it's set + * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Always re-execute + the current script with $CONFIG_SHELL, if that's set. + * tests/m4sh.at: Add tests for the new semantics, in ... + (Re-exec with CONFIG_SHELL): ... this new section. + * doc/autoconf.texi (config.status Invocation): Update. + * doc/install.texi (Defining Variables): Likewise. + * NEWS: Likewise.(Continue reading)
--- *all* the m4sh-generated scripts
will do the same as well. This is probably an overkill, and might be
undesirable under certain conditions (or simply for the tastes of some
prospective m4sh clients).
2. There is currently no documented way to prevent this re-execution;
in the long run, it would be nice to offer possibility for overrides
(the user is always right!), both "global" (with an environment
variable probably -- CONFIG_SHELL_NO_REEXEC? or M4SH_NO_REEXEC?)
and "local" (an ad-hoc "early" option for configure maybe, say
`--no-reexec'?).
3. The current implementation of _AS_DETECT_BETTER_SHELL probably does
too much; see the "FIXME" comment my patch introduces:
# The real workhorse for detecting a shell with the correct features.
# FIXME: this should be split into two macros, one to detect a better
RSS Feed