autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: stronger docs on @SHELL@ usage in Makefile


From: Eric Blake
Subject: Re: stronger docs on @SHELL@ usage in Makefile
Date: Thu, 21 Aug 2008 15:54:50 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

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 <address@hidden>
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 <address@hidden>
---
 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  <address@hidden>
 
+       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:
+
address@hidden
+$ @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
address@hidden example
+
 @node Comments in Make Rules
 @section Comments in Make Rules
 @cindex Comments in @file{Makefile} rules
-- 
1.6.0








reply via email to

[Prev in Thread] Current Thread [Next in Thread]