autoconf-patches
[Top][All Lists]
Advanced

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

Re: Fix .exe-related test failure on MinGW.


From: Ralf Wildenhues
Subject: Re: Fix .exe-related test failure on MinGW.
Date: Tue, 25 Mar 2008 07:04:57 +0100
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

* Eric Blake wrote on Tue, Mar 25, 2008 at 04:22:11AM CET:
> According to Ralf Wildenhues on 3/24/2008 8:40 AM:
> |  [AT_CHECK([[sed 's/^[^:]*m4: *\([^:]*:\) *\([0-9][0-9]*: \)/m4:\1\2/
> | +   s/^[^:]*m4\.exe: *\([^:]*:\) *\([0-9][0-9]*: \)/m4:\1\2/
>
> Thanks for this.  Is it any more efficient to do a single:
>
> s/^[^:]*m4[.ex]*: *...
>
> than your two substitutions?  At least, that's how m4's testsuite tackled
> the issue.

I have not measured what's more efficient.  But factorization is more
concise, so I applied this, which also allows .exe in the third set of
warnings.

Cheers,
Ralf

    * tests/local.at (AT_CHECK_M4): Factorize warning output
    normalization.
    Suggested by Eric Blake.
    
diff --git a/tests/local.at b/tests/local.at
index 33fbf05..0f0ecad 100644
--- a/tests/local.at
+++ b/tests/local.at
@@ -106,13 +106,11 @@ m4_define([AT_CHECK_M4],
 [AT_CHECK([$1], [$2], [$3],
           m4_case([$4], [], [], [ignore], [ignore], [stderr]))
 m4_case([$4], [], [], [ignore], [],
-[AT_CHECK([[sed 's/^[^:]*m4: *\([^:]*:\) *\([0-9][0-9]*: \)/m4:\1\2/
-       s/^[^:]*m4\.exe: *\([^:]*:\) *\([0-9][0-9]*: \)/m4:\1\2/
-       s/^\([^:]*:\) *\([0-9][0-9]*:\)[^:]*m4: /m4:\1\2 /
+[AT_CHECK([[sed 's/^[^:]*m4[.ex]*: *\([^:]*:\) *\([0-9][0-9]*: \)/m4:\1\2/
+       s/^\([^:]*:\) *\([0-9][0-9]*:\)[^:]*m4[.ex]*: /m4:\1\2 /
        s/: C\(annot open \)\([^`:]*\):/: c\1`\2'\'':/
        s/: include:\( cannot open\)/:\1/
-       s/^autom4te: [^ ]*m4 /autom4te: m4 /
-       s/^autom4te: [^ ]*m4\.exe /autom4te: m4 /
+       s/^autom4te: [^ ]*m4[.ex]* /autom4te: m4 /
        s/ (E[A-Z]*)$//
     ' stderr >&2]], [0], [], [$4])])
 ])




reply via email to

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