autoconf-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] Updates to shell portability documentation


From: Eric Blake
Subject: Re: [PATCH] Updates to shell portability documentation
Date: Wed, 15 Oct 2008 20:24:54 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Eric Blake <ebb9 <at> byu.net> writes:

> According to Paolo Bonzini on 10/15/2008 5:33 AM:
> > This updates the documentation according to the fact that M4sh will
> > be able to find a SVR2-or-better shell.  I also found a few more places
> > where the docs were out-of-date and referred to workarounds that
> > Autoconf does not apply anymore.
> > 
> > Ok?
> 
> Awesome!  Some nits before you can apply:

And some nits after you applied.  I'm pushing this:

From: Eric Blake <address@hidden>
Date: Wed, 15 Oct 2008 11:22:25 -0600
Subject: [PATCH] Cleanups to previous patches.

* doc/autoconf.texi (Portable Shell): Minor edits.
(Limitations of Builtins): Touch up wording.
* lib/m4sugar/m4sh.m4 (AS_LINENO_PUSH): Nuke trailing whitespace.
(_AS_SHELL_SANITIZE): Wrap comments less than 80 columns.

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog           |    8 ++++++++
 doc/autoconf.texi   |   16 +++++++++-------
 lib/m4sugar/m4sh.m4 |    9 +++++----
 3 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 9789f57..d4619b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-10-15  Eric Blake  <address@hidden>
+
+       Cleanups to previous patches.
+       * doc/autoconf.texi (Portable Shell): Minor edits.
+       (Limitations of Builtins): Touch up wording.
+       * lib/m4sugar/m4sh.m4 (AS_LINENO_PUSH): Nuke trailing whitespace.
+       (_AS_SHELL_SANITIZE): Wrap comments less than 80 columns.
+
 2008-10-15  Paolo Bonzini  <address@hidden>
 
        Updates to shell portability documentation.
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index fe51667..b3ffc76 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -12794,10 +12794,11 @@ Portable Shell
 shell and can be assumed to be part of the least common denominator.
 
 On the other hand, if you're using M4sh you can assume that the shell
-has the features that were added in SVR2, including shell functions,
+has the features that were added in SVR2 (circa 1984), including shell
+functions,
 @command{return}, @command{unset}, and I/O redirection for builtins.  For
 more information, refer to @uref{http://@/www.in-ulm.de/@/~mascheck/@/bourne/}.
-However, some pitfalls have to be avoided for portable use of this
+However, some pitfalls have to be avoided for portable use of these
 constructs; these will be documented in the rest of this chapter.
 See in particular @ref{Shell Functions} and @ref{Limitations of
 Builtins, , Limitations of Shell Builtins}.
@@ -14555,10 +14556,11 @@ Limitations of Builtins
 @end example
 
 New applications which are not aiming at portability should use
address@hidden instead of @samp{echo}.  M4sh provides the @code{AS_ECHO}
-and @code{AS_ECHO_N} macros (corresponding to @samp{echo -n} which use
address@hidden if it is available, or otherwise resort to various creative
-tricks in order to work around the above problems.
address@hidden instead of @command{echo}.  M4sh provides the
address@hidden and @code{AS_ECHO_N} macros, which choose between
address@hidden -n} on implementations where that works, @command{printf} if
+it is available, or other creative tricks in order to work around the
+above problems.
 
 
 @item @command{eval}
@@ -14799,7 +14801,7 @@ Limitations of Builtins
 @noindent
 Or, especially if the @dfn{else} branch is short, you can use @code{||}.
 In M4sh, the @code{AS_IF} macro provides an easy way to write these kinds
-of conditionals as;
+of conditionals:
 
 @example
 AS_IF([cmp -s file file.new], [], [mv file.new file])
diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4
index 64cc8db..b42e87f 100644
--- a/lib/m4sugar/m4sh.m4
+++ b/lib/m4sugar/m4sh.m4
@@ -420,9 +420,10 @@ if test ! -f "$as_myself"; then
   AS_EXIT
 fi
 
-# Unset variables that we do not need and cause bugs (e.g. in pre-3.0 UWIN 
ksh).
-# But do not cause bugs in bash 2.01; the "|| exit 1" suppresses any
-# "Segmentation fault" message there.  '((' could trigger a bug in pdksh 
5.2.14.
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
 for as_var in BASH_ENV ENV MAIL MAILPATH
 do eval test x\${$as_var+set} = xset && dnl
  ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
@@ -698,7 +699,7 @@ m4_define([AS_ERROR],
 # ------------------------
 # If this is the outermost call to AS_LINENO_PUSH, make sure that
 # AS_MESSAGE will print LINENO as the line number.
-m4_defun([AS_LINENO_PUSH], 
+m4_defun([AS_LINENO_PUSH],
 [as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack])
 
 
-- 
1.6.0.2








reply via email to

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