autoconf-patches
[Top][All Lists]
Advanced

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

Re: generated tests/*.at in cvs?


From: Ralf Wildenhues
Subject: Re: generated tests/*.at in cvs?
Date: Tue, 4 Apr 2006 22:42:25 +0200
User-agent: Mutt/1.5.9i

Hi Stepan,

* Stepan Kasal wrote on Tue, Apr 04, 2006 at 05:55:20PM CEST:
> On Tue, Apr 04, 2006 at 05:32:40PM +0200, Ralf Wildenhues wrote:
> > So it seems to me that `$egrep -f' has a good chance of success, as
> > it seems to work on all systems I looked at.
> 
> settled; thank you for helping with the decision.

Heck, looking into a fix, I guess it's easy to support both..

OK to apply (tested on OpenBSD)?

Cheers,
Ralf

        * tests/mktests.sh: If `egrep' does not support multiple
        patterns separated by newlines, use `-f' instead.

Index: tests/mktests.sh
===================================================================
RCS file: /cvsroot/autoconf/autoconf/tests/mktests.sh,v
retrieving revision 1.47
diff -u -r1.47 mktests.sh
--- tests/mktests.sh    3 Apr 2006 19:34:49 -0000       1.47
+++ tests/mktests.sh    4 Apr 2006 20:41:12 -0000
@@ -27,7 +27,7 @@
 as_me=`echo "$0" | sed 's,.*[\\/],,'`
 
 trap 'echo "'"$as_me"': failed.  To proceed run make check." >&2
-      rm -f acdefuns audefuns requires *.tat
+      rm -f ac_egrep au_egrep acdefuns audefuns requires *.tat
       for file
       do
         touch `echo "$file" | sed "s,.*[\\/],,;s/\..*/.at/"`
@@ -203,6 +203,18 @@
 else egrep='egrep'
 fi
 
+# We assume either newline-separated patterns or -f works.
+if echo b | $egrep 'a
+(b|c)' >/dev/null 2>&1
+then 
+  egrep_f=
+else
+  egrep_f=-f
+  echo "$ac_exclude_egrep" >ac_egrep
+  ac_exclude_egrep=ac_egrep
+  echo "$au_exclude_egrep" >au_egrep
+  au_exclude_egrep=au_egrep
+fi
 
 ## ------------------------- ##
 ## Creating the test files.  ##
@@ -219,14 +231,14 @@
     sort |
     uniq |
     # Watch out we are `set -e': don't fail.
-    ($egrep -v "$ac_exclude_egrep" || true) >acdefuns
+    ($egrep -v $egrep_f "$ac_exclude_egrep" || true) >acdefuns
 
   # Get the list of macros which are defined in Autoupdate level.
   cat $file |
     sed -n 's/^AU_DEFUN(\[*\([a-zA-Z][a-zA-Z0-9_]*\).*$/\1/p' |
     sort |
     uniq |
-    ($egrep -v "$au_exclude_egrep" || true) > audefuns
+    ($egrep -v $egrep_f "$au_exclude_egrep" || true) > audefuns
 
   # Filter out required macros.
   {
@@ -271,7 +283,7 @@
   fi
 done
 
-rm -f acdefuns audefuns requires
+rm -f ac_egrep au_egrep acdefuns audefuns requires
 
 trap 0
 exit 0




reply via email to

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