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.61a-365


From: Ralf Wildenhues
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.61a-365-g2abed75
Date: Sun, 02 Mar 2008 12:01:53 +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=2abed75dde56a57de82794fb97fc71f2275c0af5

The branch, master has been updated
       via  2abed75dde56a57de82794fb97fc71f2275c0af5 (commit)
      from  c197dc8d27790ecf5f18ee6769545a07cccedf9f (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 2abed75dde56a57de82794fb97fc71f2275c0af5
Author: Benoit Sigoure <address@hidden>
Date:   Tue Dec 18 13:54:07 2007 +0100

    Properly handle funny file names for headers in config.status.
    
        The test suite did not cover this bug because the code was not
        quoting properly the arguments of `rm -f' (which "fails" silently)
        as well as the arguments of `diff' (whose output was redirected to
        /dev/null so we couldn't see its error message).
        * lib/autoconf/status.m4 (_AC_OUTPUT_HEADER): Properly quote the
        file names passed to `rm' and `diff'.
        * tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS):
        Add a regression test.
    
    Signed-off-by: Benoit Sigoure <address@hidden>
    Signed-off-by: Ralf Wildenhues <address@hidden>

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

Summary of changes:
 ChangeLog              |   12 ++++++++++++
 lib/autoconf/status.m4 |    6 +++---
 tests/torture.at       |    9 +++++++++
 3 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 38cfe8e..c480adf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,16 @@
 2008-03-01  Benoit Sigoure  <address@hidden>
+
+       Properly handle funny file names for headers in config.status.
+       The test suite did not cover this bug because the code was not
+       quoting properly the arguments of `rm -f' (which "fails" silently)
+       as well as the arguments of `diff' (whose output was redirected to
+       /dev/null so we couldn't see its error message).
+       * lib/autoconf/status.m4 (_AC_OUTPUT_HEADER): Properly quote the
+       file names passed to `rm' and `diff'.
+       * tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS):
+       Add a regression test.
+
+2008-03-01  Benoit Sigoure  <address@hidden>
        and Ralf Wildenhues  <address@hidden>
 
        Properly expand @configure_input@ in config.status.
diff --git a/lib/autoconf/status.m4 b/lib/autoconf/status.m4
index 398d0cb..c8f329a 100644
--- a/lib/autoconf/status.m4
+++ b/lib/autoconf/status.m4
@@ -864,10 +864,10 @@ m4_define([_AC_OUTPUT_HEADER],
       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
     } >"$tmp/config.h" \
       || AC_MSG_ERROR([could not create $ac_file])
-    if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
+    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
       AC_MSG_NOTICE([$ac_file is unchanged])
     else
-      rm -f $ac_file
+      rm -f "$ac_file"
       mv "$tmp/config.h" "$ac_file" \
        || AC_MSG_ERROR([could not create $ac_file])
     fi
@@ -879,7 +879,7 @@ m4_define([_AC_OUTPUT_HEADER],
 dnl If running for Automake, be ready to perform additional
 dnl commands to set up the timestamp files.
 m4_ifdef([_AC_AM_CONFIG_HEADER_HOOK],
-        [_AC_AM_CONFIG_HEADER_HOOK([$ac_file])
+        [_AC_AM_CONFIG_HEADER_HOOK(["$ac_file"])
 ])dnl
 ])# _AC_OUTPUT_HEADER
 
diff --git a/tests/torture.at b/tests/torture.at
index b179afe..c052c04 100644
--- a/tests/torture.at
+++ b/tests/torture.at
@@ -274,6 +274,15 @@ AT_CHECK([grep OK "$file"], [], [OK
 ])
 AT_CHECK([./config.status "--header=$file:$file.in"],
         [0], [ignore])
+# Run the same test a 2nd time to see that config.status does not recreate
+# the header (regression test)
+AT_CHECK([./config.status "--header=$file:$file.in"],
+        [0], [config.status: creating file with  funny \ ' \' $ & #!*? name
+config.status: file with  funny \ ' \' $ & #!*? name is unchanged
+])
+AT_CHECK([grep ' & ' "$file"], [],
+[/* file with  funny \ ' \' $ & #!*? name.  Generated from file with  funny \ 
' \' $ & #!*? name.in by configure.  */
+])
 AT_CHECK([grep OK "$file"], [], [OK
 ])
 AT_CLEANUP


hooks/post-receive
--
GNU Autoconf source repository




reply via email to

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