autoconf-patches
[Top][All Lists]
Advanced

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

FYI: Don't issue spurious whitespaces


From: Akim Demaille
Subject: FYI: Don't issue spurious whitespaces
Date: Wed, 27 Aug 2003 17:16:59 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

CVS M4 was experiencing a failure with CVS Autoconf because AC_FD_CC
was issuing a warning, and the later created spurious whitespaces.  As
a result,

    echo "configure: failed program was:" >&AC_FD_CC

expanded in

    echo "configure: failed program was:" >&
5

which is somewhat different :)

The test suite is now more rigorous.

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * tests/m4sugar.at (cross_warning): Make sure to enable the
        output, so that we can track spurious m4sugar output.
        * tests/local.at: Require 2.57.
        (AT_CHECK_M4SUGAR, AT_CHECK_M4SH): Don't m4_default the arguments that
        are defaulted by AT_CHECK anyway.
        Use AT_CHECK_AUTOM4TE.
        * lib/m4sugar/m4sugar.m4: There should be no output at all: add a
        missing dnl.

Index: lib/m4sugar/m4sugar.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/m4sugar/m4sugar.m4,v
retrieving revision 2.75
diff -u -u -r2.75 m4sugar.m4
--- lib/m4sugar/m4sugar.m4 22 Aug 2003 13:38:34 -0000 2.75
+++ lib/m4sugar/m4sugar.m4 27 Aug 2003 15:11:17 -0000
@@ -222,7 +222,7 @@
 [_m4_warn([$1], [$2],
 m4_ifdef([m4_expansion_stack],
          [m4_defn([m4_expansion_stack])
-m4_location[: the top level]]))
+m4_location[: the top level]]))dnl
 ])
 
 
Index: tests/local.at
===================================================================
RCS file: /cvsroot/autoconf/autoconf/tests/local.at,v
retrieving revision 1.2
diff -u -u -r1.2 local.at
--- tests/local.at 23 Jun 2003 14:53:18 -0000 1.2
+++ tests/local.at 27 Aug 2003 15:11:17 -0000
@@ -18,7 +18,7 @@
 # 02111-1307, USA.
 
 # We need a very up to date version of Autotest.
-m4_version_prereq([2.53])
+m4_version_prereq([2.57])
 
 # Used in many tests.
 m4_pattern_allow([^AS_EXIT$])
@@ -90,7 +90,7 @@
 # ----------------------------------------------------------
 m4_define([AT_CHECK_M4SUGAR],
 [AT_CHECK_AUTOM4TE([--language=m4sugar script.4s -o script $1],
-         m4_default([$2], [0]), [$3], [$4])])
+                  [$2], [$3], [$4])])
 
 
 
@@ -113,8 +113,8 @@
 # AT_CHECK_M4SH(FLAGS, [EXIT-STATUS = 0], STDOUT, STDERR)
 # -------------------------------------------------------
 m4_define([AT_CHECK_M4SH],
-[AT_CHECK([autom4te --language=m4sh script.as -o script $1],
-         m4_default([$2], [0]), [$3], [$4])])
+[AT_CHECK_AUTOM4TE([--language=m4sh script.as -o script $1],
+                  [$2], [$3], [$4])])
 
 
 
@@ -359,7 +359,7 @@
 AT_CHECK_ENV
 
 AT_CLEANUP()dnl
-])# AT_CHECK_UPDATE
+])# AT_CHECK_AU_MACRO
 
 
 
@@ -368,4 +368,3 @@
 ## ----------------------- ##
 
 AT_INIT
-
Index: tests/m4sugar.at
===================================================================
RCS file: /cvsroot/autoconf/autoconf/tests/m4sugar.at,v
retrieving revision 1.24
diff -u -u -r1.24 m4sugar.at
--- tests/m4sugar.at 22 Aug 2003 13:38:34 -0000 1.24
+++ tests/m4sugar.at 27 Aug 2003 15:11:17 -0000
@@ -44,12 +44,12 @@
 AT_DATA_M4SUGAR([script.4s],
 [[m4_init
 m4_defun([cross_warning],
-[m4_warn([cross],  [cross])
-])
+[m4_warn([cross],  [cross])])
 
-m4_warn([obsolete],  [obsolete])
-cross_warning
-m4_warn([syntax], [syntax])
+m4_divert_push([0])m4_wrap([m4_divert_pop([0])[]])dnl
+m4_warn([obsolete],  [obsolete])dnl
+cross_warning[]dnl
+m4_warn([syntax], [syntax])dnl
 ]])
 
 AT_CHECK_M4SUGAR([-o-], 0, [],
@@ -59,20 +59,20 @@
 AT_CHECK_M4SUGAR([-o- -Wall -f], 0, [],
 [script.4s:6: warning: obsolete
 script.4s:7: warning: cross
-script.4s:4: cross_warning is expanded from...
+script.4s:3: cross_warning is expanded from...
 script.4s:7: the top level
 script.4s:8: warning: syntax
 ])
 
 AT_CHECK_M4SUGAR([-o- -Wnone,cross -f], 0, [],
 [script.4s:7: warning: cross
-script.4s:4: cross_warning is expanded from...
+script.4s:3: cross_warning is expanded from...
 script.4s:7: the top level
 ])
 
 AT_CHECK_M4SUGAR([-o- -Wnone,cross,error -f], 1, [],
 [[script.4s:7: warning: cross
-script.4s:4: cross_warning is expanded from...
+script.4s:3: cross_warning is expanded from...
 script.4s:7: the top level
 ]])
 
@@ -100,18 +100,19 @@
 [m4_require([foo])])
 
 m4_init
+m4_divert_push([0])m4_wrap([m4_divert_pop([0])[]])dnl
 baz
 ]])
 
 AT_CHECK_M4SUGAR([], 1, [],
-[[script.4s:11: error: m4@&address@hidden: circular dependency of foo
-script.4s:11: foo is required by...
+[[script.4s:12: error: m4@&address@hidden: circular dependency of foo
+script.4s:12: foo is required by...
 script.4s:5: bar is expanded from...
-script.4s:11: bar is required by...
+script.4s:12: bar is required by...
 script.4s:2: foo is expanded from...
-script.4s:11: foo is required by...
+script.4s:12: foo is required by...
 script.4s:8: baz is expanded from...
-script.4s:11: the top level
+script.4s:12: the top level
 autom4te: m4 failed with exit status: 1
 ]])
 AT_CLEANUP





reply via email to

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