diff build-aux/find-files-with-tests.sh @ 16132:43e6415393ff

build: check for grep in configure and then use it in build process. * configure.ac: Add call to AC_PROG_GREP. * build-aux/common.mk: substitute environment variable GREP with value from configure. Use $(GREP) in commands. * build-aux/find-files-with-tests.sh: use $(GREP) instead of grep in commands.
author Rik <rik@octave.org>
date Tue, 26 Feb 2013 16:52:33 -0800
parents 98fc95793699
children
line wrap: on
line diff
--- a/build-aux/find-files-with-tests.sh
+++ b/build-aux/find-files-with-tests.sh
@@ -1,6 +1,7 @@
 #! /bin/sh
 
 set -e
+GREP=${GREP:-grep}
 SED=${SED:-sed}
 
 srcdir="$1"
@@ -13,7 +14,7 @@
   else
     file="$srcdir/$arg"
   fi
-  if [ "`grep -l '^%!' $file`" ]; then
+  if [ "`$GREP -l '^%!' $file`" ]; then
     echo "$file" | $SED "s,\\$srcdir/,,";
   fi
 done