autoconf-commit
[Top][All Lists]
Advanced

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

[SCM] GNU Autoconf source repository branch, master, updated. v2.64-32-g


From: Eric Blake
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.64-32-g6ecb883
Date: Fri, 11 Sep 2009 02:47:47 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=6ecb883bb1b549ca92417a6c66a5f6358f527df2

The branch, master has been updated
       via  6ecb883bb1b549ca92417a6c66a5f6358f527df2 (commit)
       via  98410813c9be734296603f7c582e30fb06165796 (commit)
      from  9c16f1a80d38800d400403a78f322b74c09c827d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 6ecb883bb1b549ca92417a6c66a5f6358f527df2
Author: Eric Blake <address@hidden>
Date:   Thu Sep 10 20:16:46 2009 -0600

    Document that AS_INIT is automatically used.
    
    * doc/autoconf.texi (Initialization Macros) <AS_INIT>: Add words
    to clarify that only bare-bones scripts need a direct AS_INIT.
    Suggested by Reuben Thomas.
    
    Signed-off-by: Eric Blake <address@hidden>

commit 98410813c9be734296603f7c582e30fb06165796
Author: Eric Blake <address@hidden>
Date:   Thu Sep 10 20:05:21 2009 -0600

    Clarify portability pitfall of test.
    
    * doc/autoconf.texi (Limitations of Builtins) <test>: Give more
    reasons why -a and -o are not portable.
    Reported by Reuben Thomas.
    
    Signed-off-by: Eric Blake <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog         |   12 ++++++++++++
 doc/autoconf.texi |   23 ++++++++++++++++-------
 2 files changed, 28 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 80f5609..9ea4ed6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2009-09-10  Eric Blake  <address@hidden>
+
+       Document that AS_INIT is automatically used.
+       * doc/autoconf.texi (Initialization Macros) <AS_INIT>: Add words
+       to clarify that only bare-bones scripts need a direct AS_INIT.
+       Suggested by Reuben Thomas.
+
+       Clarify portability pitfall of test.
+       * doc/autoconf.texi (Limitations of Builtins) <test>: Give more
+       reasons why -a and -o are not portable.
+       Reported by Reuben Thomas.
+
 2009-09-10  Ralf Wildenhues  <address@hidden>
 
        Document sed limitation with escaped metacharacters.
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 82a9f2a..4203cd0 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -12949,7 +12949,10 @@ generated from, and code to sanitize the environment 
for the rest of the
 script.  Among other initializations, this sets @env{SHELL} to the shell
 chosen to run the script (@pxref{CONFIG_SHELL}), and @env{LC_ALL} to
 ensure the C locale.  Finally, it changes the current diversion to
address@hidden
address@hidden  @code{AS_INIT} is called automatically by @code{AC_INIT}
+and @code{AT_INIT}, so shell code in @file{configure},
address@hidden, and @file{testsuite} all benefit from a sanitized
+shell environment.
 @end defmac
 
 @defmac AS_INIT_GENERATED (@var{file}, @ovar{comment})
@@ -16388,12 +16391,18 @@ that name in Autoconf code is asking for trouble 
since it is an M4 quote
 character.
 
 The @option{-a}, @option{-o}, @samp{(}, and @samp{)} operands are not
-portable and should be avoided.  Thus, portable uses of @command{test}
-should never have more than four arguments, and scripts should use shell
-constructs like @samp{&&} and @samp{||} instead.  If you combine
address@hidden&&} and @samp{||} in the same statement, keep in mind that they
-have equal precedence, so it is often better to parenthesize even when
-this is redundant.  For example:
+present in all implementations, and have been marked obsolete by Posix
+2008.  This is because there are inherent ambiguities in using them.
+For example, @samp{test "$1" -a "$2"} looks like a binary operator to
+check whether two strings are both non-empty, but if @samp{$1} is the
+literal @samp{!}, then some implementations of @command{test} treat it
+as a negation of the unary operator @option{-a}.
+
+Thus, portable uses of @command{test} should never have more than four
+arguments, and scripts should use shell constructs like @samp{&&} and
address@hidden||} instead.  If you combine @samp{&&} and @samp{||} in the same
+statement, keep in mind that they have equal precedence, so it is often
+better to parenthesize even when this is redundant.  For example:
 
 @smallexample
 # Not portable:


hooks/post-receive
-- 
GNU Autoconf source repository




reply via email to

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