autoconf-patches
[Top][All Lists]
Advanced

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

Re: Test all macros for cache (`configure -C') safety


From: Paul Eggert
Subject: Re: Test all macros for cache (`configure -C') safety
Date: Fri, 04 Feb 2005 22:54:52 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Noah Misch <address@hidden> writes:

> 2005-01-18  Noah Misch  <address@hidden>
>
>       * tests/local.at (AT_CMP): New macro.
>       (AT_DATA_AUTOCONF): Do not call AC_PROG_GREP.
>       (AC_SAVE_STATE): Move environment grep...
>       (AT_CHECK_ENV): to here.  Filter out `'$''.  Use AT_CMP.
>       (AT_CONFIG_CMP): New macro.
>       (AT_CHECK_MACRO): Run `configure' twice with cache and compare results.
>       * tests/c.at (Extensions): Do not exit early.
>       * tests/atlocal.in: Inherit $GREP.

Thanks.  I installed that.  It has some trailing white space, though.

Also, isn't it a bit simpler just to invoke "diff" directly on the
input files when comparing them?  I guess this would result in a
diff-of-a-diff output on failure, but that's OK.

(One minor question: why is AT_CMP's m4_fatal useful?  I left it in
though.)

I installed the following:

2005-02-04  Paul Eggert  <address@hidden>

        * tests/local.at (AT_CMP): Use diff directly on input files rather
        than copying them.

--- local.at    5 Feb 2005 05:45:14 -0000       1.11
+++ local.at    5 Feb 2005 06:51:45 -0000       1.12
@@ -34,12 +34,10 @@ AT_TESTED([autom4te autoconf autoheader 
 
 # AT_CMP(FILE-1, FILE-2)
 # ----------------------
-# Check FILE-1 and FILE-2 for equality, like `cmp FILE-1 FILE-2'.  This macro
-# clobbers `expout'.
+# Check FILE-1 and FILE-2 for equality, like `cmp FILE-1 FILE-2'.
 m4_define([AT_CMP],
 [m4_ifval([$2],, [m4_fatal([AT_CMP takes two arguments.])])[]dnl
-cp -f "$1" expout
-AT_CHECK([cat "$2"], 0, [expout])
+AT_CHECK([$at_diff "$1" "$2"])
 ])# AT_CMP
 
 
@@ -330,7 +328,7 @@ do
     { $GREP -v \
 '^\(ac\|as\)_
 ^\(PPID\|RANDOM\|SECONDS\|'\'\\\$\''\)=
-^[[^=]]*=$'        $act_file 
+^[[^=]]*=$'        $act_file
       $GREP ^ac_cv $act_file ; } |
       # Lines that do not look like `foo=bar' are probably latter lines of
       # multiline values; trim them.




reply via email to

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