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-407


From: Ralf Wildenhues
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.61a-407-g4503a1d
Date: Wed, 26 Mar 2008 05:56:15 +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=4503a1da1157db572d37dc683fc78bd677594cac

The branch, master has been updated
       via  4503a1da1157db572d37dc683fc78bd677594cac (commit)
      from  5c55fb1f4db4ce31263d71744014eddde28071fd (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 4503a1da1157db572d37dc683fc78bd677594cac
Author: Ralf Wildenhues <address@hidden>
Date:   Wed Mar 26 06:55:22 2008 +0100

    Warn, not fail on whitespace-only precious variable differences.
    
    * lib/autoconf/general.m4 (_AC_ARG_VAR_VALIDATE): Output
    precious variable differences less ambiguous with `ugly-quotes'.
    If their settings differ only in whitespace, do not fail, but
    reuse the old value.
    * tests/torture.at (AT_CHECK_AC_ARG_VAR): Extend macro to allow
    an optional status and expected-warning argument.  Fix m4
    quotation for initial value.
    (AC_ARG_VAR): Also test for whitespace-only differences, and
    that the old value is retained in this case.
    * doc/autoconf.texi (Setting Output Variables): Document this.
    * NEWS: Update.
    Report and initial patch by Paolo Bonzini.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

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

Summary of changes:
 ChangeLog               |   16 ++++++++++++++++
 NEWS                    |    3 +++
 doc/autoconf.texi       |    3 ++-
 lib/autoconf/general.m4 |   16 ++++++++++++----
 tests/torture.at        |   19 ++++++++++++++-----
 5 files changed, 47 insertions(+), 10 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7f82ee2..73b6864 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2008-03-26  Ralf Wildenhues  <address@hidden>
+
+       Warn, not fail on whitespace-only precious variable differences.
+       * lib/autoconf/general.m4 (_AC_ARG_VAR_VALIDATE): Output
+       precious variable differences less ambiguous with `ugly-quotes'.
+       If their settings differ only in whitespace, do not fail, but
+       reuse the old value.
+       * tests/torture.at (AT_CHECK_AC_ARG_VAR): Extend macro to allow
+       an optional status and expected-warning argument.  Fix m4
+       quotation for initial value.
+       (AC_ARG_VAR): Also test for whitespace-only differences, and
+       that the old value is retained in this case.
+       * doc/autoconf.texi (Setting Output Variables): Document this.
+       * NEWS: Update.
+       Report and initial patch by Paolo Bonzini.
+
 2008-03-26  Eric Blake  <address@hidden>
 
        Document busybox sed bug.
diff --git a/NEWS b/NEWS
index 79d72f1..3d24e69 100644
--- a/NEWS
+++ b/NEWS
@@ -76,6 +76,9 @@ GNU Autoconf NEWS - User visible changes.
 ** `configure --help=recursive' now works in read-only trees and from
    unconfigured build trees.
 
+** If precious variables differ only in whitespace, then the cache consistency
+   check warns instead of fails, and reuses the old value.
+
 ** AT_BANNER is now documented.
 
 ** AT_SETUP now handles macro expansions properly when calculating line
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index b72d875..991a714 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -8799,7 +8799,8 @@ configure: error: run `make distclean' and/or \
 
 @noindent
 and similarly if the variable is unset, or if its content is changed.
-
+If the content has white space changes only, then the error is degraded
+to a warning only, but the old value is reused.
 
 @item
 @var{variable} is kept during automatic reconfiguration
diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4
index 645108e..058e193 100644
--- a/lib/autoconf/general.m4
+++ b/lib/autoconf/general.m4
@@ -1547,10 +1547,18 @@ for ac_var in $ac_precious_vars; do
     ,);;
     *)
       if test "x$ac_old_val" != "x$ac_new_val"; then
-       AS_MESSAGE([error: `$ac_var' has changed since the previous run:], 2)
-       AS_MESSAGE([  former value:  $ac_old_val], 2)
-       AS_MESSAGE([  current value: $ac_new_val], 2)
-       ac_cache_corrupted=:
+       # differences in whitespace do not lead to failure.
+       ac_old_val_w=`echo x $ac_old_val`
+       ac_new_val_w=`echo x $ac_new_val`
+       if test "$ac_old_val_w" != "$ac_new_val_w"; then
+         AS_MESSAGE([error: `$ac_var' has changed since the previous run:], 2)
+         ac_cache_corrupted=:
+       else
+         AS_MESSAGE([warning: ignoring whitespace changes in `$ac_var' since 
the previous run:], 2)
+         eval $ac_var=\$ac_old_val
+       fi
+       AS_MESSAGE([  former value:  `$ac_old_val'], 2)
+       AS_MESSAGE([  current value: `$ac_new_val'], 2)
       fi;;
   esac
   # Pass precious variables to config.status.
diff --git a/tests/torture.at b/tests/torture.at
index 0d7509e..a9e9dc1 100644
--- a/tests/torture.at
+++ b/tests/torture.at
@@ -46,16 +46,18 @@ AT_CLEANUP
 ## AC_ARG_VAR.  ##
 ## ------------ ##
 
-# AT_CHECK_AC_ARG_VAR(FIRST-VALUE, SECOND-VALUE)
-# ----------------------------------------------
+# AT_CHECK_AC_ARG_VAR(FIRST-VALUE, SECOND-VALUE, [STATUS = 1])
+# ------------------------------------------------------------
 # Check that AC_ARG_VAR caches the latest values, diagnoses
-# inconsistencies, and arms config.status.
+# inconsistencies, and arms config.status.  Check that recheck
+# returns STATUS, save configure output in files 'stdout' and 'stderr'
+# for further inspection.
 m4_define([AT_CHECK_AC_ARG_VAR],
 [rm -f config.cache
 
 # Initial value.
 m4_ifval([$1],
-        [precious='m4_bpatsubst($1, [[']], ['\\''])'; export precious],
+        [precious='m4_bpatsubst([$1], [[']], ['\\''])'; export precious],
         [unset precious])
 AT_CHECK_CONFIGURE([--config-cache -q])
 AT_CHECK([cat file], [], [`$1'
@@ -75,7 +77,7 @@ AT_CHECK([cat file], [], [`$1'
 m4_ifval([$2],
         [precious='$2'; export precious],
         [unset precious])
-AT_CHECK_CONFIGURE([--config-cache], [1], [], [ignore])
+AT_CHECK_CONFIGURE([--config-cache], [m4_default([$3], [1])], [stdout], 
[stderr])
 
 ])# AT_CHECK_AC_ARG_VAR
 
@@ -121,6 +123,13 @@ AT_CHECK_AC_ARG_VAR([apple of my {eye}], [orange of my 
eye])
 AT_CHECK_AC_ARG_VAR(['p  r     ec"iou$], [orange of my eye])
 dnl restore font-lock: "
 
+# Warn (but do not fail) about a whitespace-only change
+AT_CHECK_AC_ARG_VAR([   apple  of       my eye  ], [apple of my eye],
+                   [0], ["has whitespace changes"])
+mv stdout configure-output
+AT_CHECK([grep "ignoring whitespace changes" stderr], [], [ignore])
+AT_CHECK([grep "precious:       apple" configure-output], [], [ignore])
+
 AT_CLEANUP
 
 


hooks/post-receive
--
GNU Autoconf source repository




reply via email to

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