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.66-18-g


From: Eric Blake
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.66-18-ga759826
Date: Tue, 20 Jul 2010 14:15:14 +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=a759826d2198c94761bc8f92847501b58253fc3a

The branch, master has been updated
       via  a759826d2198c94761bc8f92847501b58253fc3a (commit)
      from  70201af851c0640cda80ec1c522e00a23906f9bf (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 a759826d2198c94761bc8f92847501b58253fc3a
Author: Eric Blake <address@hidden>
Date:   Tue Jul 20 07:43:56 2010 -0600

    Also reject ' and newline from AC_INIT strings.
    
    * lib/autoconf/general.m4 (_AC_INIT_LITERAL): Reject a couple more
    problematic characters.
    * tests/base.at (AC_INIT with unusual version strings): Enhance
    test.
    * doc/autoconf.texi (Initializing configure) <AC_INIT>: Further
    clarifications, and clean up wording about use of m4_esyscmd.
    * NEWS: Update previous news entry.
    Suggested by Paolo Bonzini.
    
    Signed-off-by: Eric Blake <address@hidden>

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

Summary of changes:
 ChangeLog               |   12 ++++++++++++
 NEWS                    |    8 +++-----
 doc/autoconf.texi       |   14 +++++++++-----
 lib/autoconf/general.m4 |    9 +++++----
 tests/base.at           |   11 ++++++++++-
 5 files changed, 39 insertions(+), 15 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 1228e9b..bd7c15f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2010-07-20  Eric Blake  <address@hidden>
+
+       Also reject ' and newline from AC_INIT strings.
+       * lib/autoconf/general.m4 (_AC_INIT_LITERAL): Reject a couple more
+       problematic characters.
+       * tests/base.at (AC_INIT with unusual version strings): Enhance
+       test.
+       * doc/autoconf.texi (Initializing configure) <AC_INIT>: Further
+       clarifications, and clean up wording about use of m4_esyscmd.
+       * NEWS: Update previous news entry.
+       Suggested by Paolo Bonzini.
+
 2010-07-20  Ralf Wildenhues  <address@hidden>
 
        Let autoreconf pass warning flags to new-enough aclocal.
diff --git a/NEWS b/NEWS
index a1ce558..e8fcd3d 100644
--- a/NEWS
+++ b/NEWS
@@ -14,11 +14,9 @@ GNU Autoconf NEWS - User visible changes.
    file for inspection by the commands in the ACTION-IF-TRUE argument.
 
 ** AC_INIT again allows parentheses and other characters that are literal
-   in quoted and unquoted here-documents and in double-quoted strings
-   in its PACKAGE and VERSION arguments.  This is relevant for
-   packages not using these strings nor products like PACKAGE_STRING
-   in other contexts, e.g., for Automake, and may be subject to
-   further restrictions in the future.  Regression introduced in 2.66.
+   in single- or double-quoted strings, and in quoted and unquoted
+   here-documents, for its PACKAGE and VERSION arguments.  Regression
+   introduced in 2.66.
 
 ** autoreconf passes warning flags to new enough versions of aclocal.
 
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index cba4b1b..c47d510 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -1845,11 +1845,15 @@ other than alphanumerics and underscores are changed to 
@samp{-}.  If
 provided, @var{url} should be the home page for the package.
 
 The arguments of @code{AC_INIT} must be static, i.e., there should not
-be any shell computation, but they can be computed by M4 (the use of
address@hidden is permissible).  This is because the package
-information strings are expanded at M4 time into several contexts, and
-must give the same text at shell time whether used in double-quoted
-strings, quoted here-documents, or unquoted here-documents.
+be any shell computation, quotes, or newlines, but they can be computed
+by M4.  This is because the package information strings are expanded at
+M4 time into several contexts, and must give the same text at shell time
+whether used in single-quoted strings, double-quoted strings, quoted
+here-documents, or unquoted here-documents.  It is permissible to use
address@hidden or @code{m4_esyscmd_s} for computing a version string
+that changes with every commit to a version control system (in fact,
+Autoconf does just that, for all builds of the development tree made
+between releases).
 
 The following M4 macros (e.g., @code{AC_PACKAGE_NAME}), output variables
 (e.g., @code{PACKAGE_NAME}), and preprocessor symbols (e.g.,
diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4
index bb18845..8e9c8cf 100644
--- a/lib/autoconf/general.m4
+++ b/lib/autoconf/general.m4
@@ -226,11 +226,12 @@ AU_ALIAS([AC_HELP_STRING], [AS_HELP_STRING])
 
 # _AC_INIT_LITERAL(STRING)
 # ------------------------
-# Reject STRING if it cannot be used as-is in double-quoted strings,
-# as well as quoted and unquoted here-docs.
+# Reject STRING if it contains newline, or if it cannot be used as-is
+# in single-quoted strings, double-quoted strings, and quoted and
+# unquoted here-docs.
 m4_define([_AC_INIT_LITERAL],
-[m4_if(m4_index([$1], dnl font-lock"
-["])AS_LITERAL_HEREDOC_IF([$1], [-]), [-1-], [],
+[m4_if(m4_index(m4_translit([[$1]], [
+""], ['']), ['])AS_LITERAL_HEREDOC_IF([$1], [-]), [-1-], [],
   [m4_warn([syntax], [AC_INIT: not a literal: $1])])])
 
 # _AC_INIT_PACKAGE(PACKAGE-NAME, VERSION, BUG-REPORT, [TARNAME], [URL])
diff --git a/tests/base.at b/tests/base.at
index 6dc9a17..3fcc096 100644
--- a/tests/base.at
+++ b/tests/base.at
@@ -259,7 +259,16 @@ AT_CHECK([grep 'AC_INIT: not a literal: ' stderr], [], 
[ignore])
 
 AT_DATA([configure.ac],
 [[AC_INIT([GNU String++],
-         ["codename" 2.48], [http://clisp.cons.org/], [clisp])
+         ['codename' 2.48], [http://clisp.cons.org/], [clisp])
+AC_OUTPUT
+]])
+
+AT_CHECK_AUTOCONF([-Werror], [1], [ignore], [stderr])
+AT_CHECK([grep 'AC_INIT: not a literal: ' stderr], [], [ignore])
+
+AT_DATA([configure.ac],
+[[AC_INIT([GNU
+String++], [2.48], [http://clisp.cons.org/], [clisp])
 AC_OUTPUT
 ]])
 


hooks/post-receive
-- 
GNU Autoconf source repository



reply via email to

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