grep-commit
[Top][All Lists]
Advanced

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

grep branch, master, updated. v2.7-14-g21de5e0


From: Paolo Bonzini
Subject: grep branch, master, updated. v2.7-14-g21de5e0
Date: Sun, 14 Nov 2010 16:00:26 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  21de5e00a99d3cb79913863ebeae6a2be6422a58 (commit)
      from  b717d5bdbe93f88eb687ebb7d3f26cc4e7368ee5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=21de5e00a99d3cb79913863ebeae6a2be6422a58


commit 21de5e00a99d3cb79913863ebeae6a2be6422a58
Author: Paolo Bonzini <address@hidden>
Date:   Sun Nov 14 16:54:37 2010 +0100

    configure: remove dependency on grep that supports long lines and -e
    
    * configure.ac (fn_grep): New.  Set GREP and EGREP to it, replace
    with newly-built grep before AC_OUTPUT.  Reported by Florin Iucha
    <http://savannah.gnu.org/bugs/?31646>.

diff --git a/configure.ac b/configure.ac
index 3c28218..b22fe98 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,6 +22,36 @@ AC_INIT([GNU grep],
         m4_esyscmd([build-aux/git-version-gen .tarball-version]),
         address@hidden)
 
+# Override grep during configure.
+fn_grep () {
+  test "$1" = -E && shift
+  case address@hidden:@:$1 in
+    0:*) AC_MSG_ERROR([fn_grep: expected pattern]) ;;
+    1:-*) AC_MSG_ERROR([fn_grep: invalid command line]) ;;
+    1:*) pattern=$1 ;;
+    2:--|2:-e|2:-Ee) pattern=$2 ;;
+    *) AC_MSG_ERROR([fn_grep: invalid command line]) ;;
+  esac
+
+  case $pattern in
+    *[].^$\\*[]*) AC_MSG_ERROR([fn_grep: regular expressions not supported])  
;;
+  esac
+
+  rc=1
+  while read line; do
+    case $line in
+      *$pattern*)
+        rc=0
+        AS_ECHO([$line]) ;;
+    esac
+  done
+  return $rc
+}
+
+test -n "$GREP" || GREP=fn_grep
+test -n "$EGREP" || EGREP=fn_grep
+ac_cv_path_EGREP=$EGREP
+
 AC_CONFIG_AUX_DIR(build-aux)
 AC_CONFIG_SRCDIR(src/grep.c)
 AC_DEFINE([GREP], 1, [We are building grep])
@@ -168,4 +198,6 @@ AC_CONFIG_FILES([
   doc/Makefile
   gnulib-tests/Makefile
 ])
+GREP="$ac_abs_top_builddir/src/grep"
+EGREP="$ac_abs_top_builddir/src/grep -E"
 AC_OUTPUT

-----------------------------------------------------------------------

Summary of changes:
 configure.ac |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
grep



reply via email to

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