]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* tests/local.at (AT_CHECK_M4): Fix this so that the testsuite
authorStepan Kasal <kasal@ucw.cz>
Mon, 11 Sep 2006 16:42:57 +0000 (16:42 +0000)
committerStepan Kasal <kasal@ucw.cz>
Mon, 11 Sep 2006 16:42:57 +0000 (16:42 +0000)
  works with GNU M4 1.4.3 again; make the normalized form
  match the current m4 message; fix the description.
* test/tools.at (autom4te cache): Adapt to the change.

ChangeLog
tests/local.at
tests/tools.at

index 2bac05a1322cf26d22ea3f0c16ea168efb73aa96..8660fce5a710d0a7f074d626fd13826cc57c05ce 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-09-11  Stepan Kasal  <kasal@ucw.cz>
+
+       * tests/local.at (AT_CHECK_M4): Fix this so that the testsuite
+         works with GNU M4 1.4.3 again; make the normalized form
+         match the current m4 message; fix the description.
+       * test/tools.at (autom4te cache): Adapt to the change.
+
 2006-09-11  Paul Eggert  <eggert@cs.ucla.edu>
 
        * doc/autoconf.texi (Here-Documents): Document bug in UnixWare
index aae1d6eb58b938a17cff8ca17a72c1a7735b44f3..a79682fb1bc284edfb3bada8ce77603a23b5745c 100644 (file)
@@ -63,40 +63,50 @@ m4_define([AT_CHECK_PERL_SYNTAX],
 
 # AT_CHECK_M4(COMMAND, [EXIT-STATUS = 0], STDOUT, STDERR)
 # -------------------------------------------------------
-# If stderr is specified, normalize the observed stderr.  E.g. (GNU M4 1.5):
+# If stderr is specified, normalize the observed stderr.
+# This (using GNU M4 1.4.6 or later)
 #
-#  /usr/local/bin/m4: script.4s: 1: Cannot open foo: No such file or directory
+#  /usr/local/bin/m4:script.4s:1: cannot open `foo': No such file or directory
 #  autom4te: /usr/local/bin/m4 failed with exit status: 1
 #
-# or (using gm4 as GNU M4 1.4):
+# or this (GNU M4 1.4 installed as gm4)
 #
 #  script.4s:1: /usr/local/bin/gm4: Cannot open foo: No such file or directory
 #  autom4te: /usr/local/bin/gm4 failed with exit status: 1
 #
 # becomes
 #
-#  m4: script.4s: 1: Cannot open foo: No such file or directory
+#  m4:script.4s:1: cannot open `foo': No such file or directory
 #  autom4te: m4 failed with exit status: 1
 #
 # We use the following sed patterns:
 #
-#     (file): (line): (m4):
-# or  (m4): (file): (line):
-# to  m4: (file): (line):
+#     (m4): ?(file): ?(line):
+# or  (file): ?(line): ?(m4):
+# to  m4:(file):(line):
+#
+# and
+#     m4:(file):(line): Cannot open foo:
+# to  m4:(file):(line): cannot open `foo':
 #
 # and
 #     autom4te: [^ ]m4
 # or  autom4te: [^ ]m4.exe
 # to  autom4te: m4
+#
+# Moreover, DJGPP error messages include the error code in brackets;
+# remove the error code during normalization.
+#
 m4_define([AT_CHECK_M4],
 [AT_CHECK([$1], [$2], [$3], m4_ifval([$4], [stderr]))
 m4_ifval([$4],
-[AT_CHECK([[sed -e 's/^\([^:]*\): *\([0-9][0-9]*\): *[^:]*m4: /m4: \1: \2: /' \
-               -e 's/^[^:]*m4: *\([^:]*\): *\([0-9][0-9]*\): /m4: \1: \2: /' \
-               -e 's/^autom4te: [^ ]*m4 /autom4te: m4 /' \
-               -e 's/^autom4te: [^ ]*m4\.exe /autom4te: m4 /' \
-               -e 's/ (E[A-Z]*)$//' \
-          stderr]], [0],[$4])])
+[AT_CHECK([[sed 's/^[^:]*m4: *\([^:]*:\) *\([0-9][0-9]*: \)/m4:\1\2/
+       s/^\([^:]*:\) *\([0-9][0-9]*:\)[^:]*m4: /m4:\1\2 /
+       s/^\(m4:[^:]*:[0-9][0-9]*: \)C\(annot open \)\([^`:]*\):/\1c\2`\3'\'':/
+       s/^autom4te: [^ ]*m4 /autom4te: m4 /
+       s/^autom4te: [^ ]*m4\.exe /autom4te: m4 /
+       s/ (E[A-Z]*)$//
+    ' stderr]], [0],[$4])])
 ])
 
 # AT_CHECK_AUTOM4TE(FLAGS, [EXIT-STATUS = 0], STDOUT, STDERR)
index 92eaa75ad24726309104c8713e8b773518902324..f6447b79c3fdc22775c0114680266c75447f7873 100644 (file)
@@ -100,7 +100,7 @@ AT_CHECK_M4SUGAR
 mkdir sub
 mv foo sub
 AT_CHECK_M4SUGAR([], [1], [],
-[m4: script.4s: 1: cannot open `foo': No such file or directory
+[m4:script.4s:1: cannot open `foo': No such file or directory
 autom4te: m4 failed with exit status: 1
 ])