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.69-19-g


From: Eric Blake
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.69-19-g1bb1041
Date: Thu, 16 Aug 2012 04:24:00 +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=1bb104167ed88a355a1c66e3e86cd49d9128cc4b

The branch, master has been updated
       via  1bb104167ed88a355a1c66e3e86cd49d9128cc4b (commit)
      from  5fdd360bcbeeff0fdb3214aad1866c2f9eace98d (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 1bb104167ed88a355a1c66e3e86cd49d9128cc4b
Author: Eric Blake <address@hidden>
Date:   Wed Aug 15 22:17:49 2012 -0600

    AC_SUBST: document and test previous patch
    
    Test that: invalid variable names are detected, that the variable
    name does not get macro expanded, that assignment to the variable
    works whether as part of AC_SUBST or independently, that the last
    assignment wins.
    
    * doc/autoconf.texi (Setting Output Variables) <AC_SUBST>: Mention
    that variable does not overlap with macros.
    * tests/base.at (AC_SUBST): New test.
    
    Signed-off-by: Eric Blake <address@hidden>

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

Summary of changes:
 doc/autoconf.texi |    3 +-
 tests/base.at     |   59 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+), 1 deletions(-)

diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index c4ebe11..b3f7a23 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -9876,7 +9876,8 @@ output file may contain @code{|#_!!_#|}.)
 If @var{value} is given, in addition assign it to @var{variable}.
 
 The string @var{variable} is passed to @code{m4_pattern_allow}
-(@pxref{Forbidden Patterns}).
+(@pxref{Forbidden Patterns}).  @var{variable} is not further expanded,
+even if there is another macro by the same name.
 @end defmac
 
 @defmac AC_SUBST_FILE (@var{variable})
diff --git a/tests/base.at b/tests/base.at
index 7979413..d8550df 100644
--- a/tests/base.at
+++ b/tests/base.at
@@ -708,3 +708,62 @@ libdir=${exec_prefix}/lib
 ]])
 
 AT_CLEANUP
+
+## ---------- ##
+## AC_SUBST.  ##
+## ---------- ##
+
+AT_SETUP([AC_SUBST])
+AT_KEYWORDS([AS@&address@hidden)
+
+# Check that a valid variable name is used.
+AT_DATA([configure.ac],
+[[AC_INIT([test], [1])
+AC_SUBST([1], [bar])
+AC_OUTPUT
+]])
+AT_CHECK_AUTOCONF([], [1], [], [stderr])
+AT_CHECK([grep 'not a valid shell variable' stderr], [], [ignore])
+
+AT_DATA([configure.ac],
+[[AC_INIT([test], [1])
+AC_SUBST([], [bar])
+AC_OUTPUT
+]])
+AT_CHECK_AUTOCONF([], [1], [], [stderr])
+AT_CHECK([grep 'not a valid shell variable' stderr], [], [ignore])
+
+AT_DATA([configure.ac],
+[[AC_INIT([test], [1])
+AC_SUBST([*], [bar])
+AC_OUTPUT
+]])
+AT_CHECK_AUTOCONF([], [1], [], [stderr])
+AT_CHECK([grep 'not a valid shell variable' stderr], [], [ignore])
+
+# Make sure AC_SUBST handles variables as expected.
+AT_DATA([file.in],
address@hidden@
address@hidden@
+FOO
+]])
+AT_DATA([configure.ac],
+[[AC_INIT([test], [0])
+m4_define([FOO], [baz])
+AC_SUBST([FOO], [bar])
+BAR=one
+AC_SUBST([B@&address@hidden)
+BAR=two
+AC_CONFIG_FILES([file])
+AC_OUTPUT
+]])
+
+AT_CHECK_AUTOCONF([], [], [], [stderr])
+AT_CHECK_CONFIGURE
+AT_CHECK([cat file], [],
+[[bar
+two
+FOO
+]])
+
+AT_CLEANUP


hooks/post-receive
-- 
GNU Autoconf source repository



reply via email to

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