From: Eric Blake Date: Wed, 9 Apr 2008 18:09:45 +0000 (-0600) Subject: Tweak wording about SHELL in Makefile. X-Git-Tag: v2.63~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3dce090c8686a072532c76a014d47639834529a;p=thirdparty%2Fautoconf.git Tweak wording about SHELL in Makefile. * doc/autoconf.texi (The Make Macro SHELL): Stronger wording on the importance of proper SHELL settings. Reported by Bruno Haible, in http://lists.gnu.org/archive/html/bug-libtool/2008-04/msg00029.html. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index 7fdd8977e..9b396f91f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-08-21 Eric Blake + + Tweak wording about SHELL in Makefile. + * doc/autoconf.texi (The Make Macro SHELL): Stronger wording on + the importance of proper SHELL settings. + Reported by Bruno Haible, in + http://lists.gnu.org/archive/html/bug-libtool/2008-04/msg00029.html. + 2008-08-20 Ralf Wildenhues Avoid timestamp races for updated input. diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 865f25bba..5e5c1ae6b 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -16327,13 +16327,22 @@ your makefiles. If you use Autoconf, do SHELL = @@SHELL@@ @end example +@noindent +If you use Automake, this is done for you. + Do not force @code{SHELL = /bin/sh} because that is not correct -everywhere. For instance @acronym{DJGPP} lacks @code{/bin/sh}, and when -its @acronym{GNU} @code{make} port sees such a setting it enters a special -emulation mode where features like pipes and redirections are emulated -on top of DOS's @command{command.com}. Unfortunately this emulation is -incomplete; for instance it does not handle command substitutions. -On @acronym{DJGPP} @code{SHELL} should point to Bash. +everywhere. Remember, @file{/bin/sh} is not Posix compliant on many +systems, such as FreeBSD 4, NetBSD 3, AIX 3, Solaris 10, or Tru64. +Additionally, @acronym{DJGPP} lacks @code{/bin/sh}, and when its +@acronym{GNU} @command{make} port sees such a setting it enters a +special emulation mode where features like pipes and redirections are +emulated on top of DOS's @command{command.com}. Unfortunately this +emulation is incomplete; for instance it does not handle command +substitutions. Using @code{@@SHELL@@} means that your makefile will +benefit from the same improved shell, such as @command{bash} or +@command{ksh}, that was discovered during @command{configure}, so that +you aren't fighting two different sets of shell bugs between the two +contexts. Posix-compliant @command{make} should never acquire the value of $(SHELL) from the environment, even when @code{make -e} is used