Ralf Wildenhues <Ralf.Wildenhues <at> gmx.de> writes:

> 
> The SHELL wording tweaking is fine with me, please apply.

Done.  In testing it, I found another make SHELL bug, fixed in GNU make 3.81 
but broken in many other implementations.  I added this commit to the series:

From: Eric Blake <[EMAIL PROTECTED]>
Date: Thu, 21 Aug 2008 09:32:21 -0600
Subject: [PATCH] Document another make bug.

* doc/autoconf.texi (The Make Macro SHELL): Mention bug in BSD
make, GNU make <= 3.80.

Signed-off-by: Eric Blake <[EMAIL PROTECTED]>
---
 ChangeLog         |    4 ++++
 doc/autoconf.texi |   17 +++++++++++++++++
 2 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 9b396f9..772a4e3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2008-08-21  Eric Blake  <[EMAIL PROTECTED]>
 
+       Document another make bug.
+       * doc/autoconf.texi (The Make Macro SHELL): Mention bug in BSD
+       make, GNU make <= 3.80.
+
        Tweak wording about SHELL in Makefile.
        * doc/autoconf.texi (The Make Macro SHELL): Stronger wording on
        the importance of proper SHELL settings.
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 5e5c1ae..907bb83 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -16368,6 +16368,23 @@ The Make Macro SHELL
 bar
 @end example
 
+Conversely, @command{make} is not supposed to export any changes to the
+macro @code{SHELL} to child processes.  Again, many implementations
+break this rule:
+
[EMAIL PROTECTED]
+$ @kbd{cat Makefile}
+all:
+        @@echo $(SHELL)
+        @@printenv SHELL
+$ @kbd{env SHELL=sh make -e SHELL=/bin/ksh}   # BSD Make, GNU make 3.80
+/bin/ksh
+/bin/ksh
+$ @kbd{env SHELL=sh gmake -e SHELL=/bin/ksh}  # GNU make 3.81
+/bin/ksh
+sh
[EMAIL PROTECTED] example
+
 @node Comments in Make Rules
 @section Comments in Make Rules
 @cindex Comments in @file{Makefile} rules
-- 
1.6.0






Reply via email to