summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2008-03-12 17:39:16 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-03-13 00:57:53 -0700
commit5f7c643afe8da21c82762f872632d6407530f9e8 (patch)
tree539bc16db70d8fda7ff4cdc4021e247d6df628dd /Makefile
parentt6000lib: tr portability fix (diff)
downloadtgif-5f7c643afe8da21c82762f872632d6407530f9e8.tar.xz
add NO_EXTERNAL_GREP build option
Previously, we just chose whether to allow external grep based on the __unix__ define. However, there are systems which define this macro but which have an inferior group (e.g., one that does not support all options used by t7002). This allows users to accept the potential speed penalty to get a more consistent grep experience (and to pass the testsuite). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index e3eaa6a543..bc46fd44f5 100644
--- a/Makefile
+++ b/Makefile
@@ -148,6 +148,9 @@ all::
# is a simplified version of the merge sort used in glibc. This is
# recommended if Git triggers O(n^2) behavior in your platform's qsort().
#
+# Define NO_EXTERNAL_GREP if you don't want "git grep" to ever call
+# your external grep (e.g., if your system lacks grep, if its grep is
+# broken, or spawning external process is slower than built-in grep git has).
GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
@$(SHELL_PATH) ./GIT-VERSION-GEN
@@ -760,6 +763,9 @@ endif
ifdef DIR_HAS_BSD_GROUP_SEMANTICS
COMPAT_CFLAGS += -DDIR_HAS_BSD_GROUP_SEMANTICS
endif
+ifdef NO_EXTERNAL_GREP
+ BASIC_CFLAGS += -DNO_EXTERNAL_GREP
+endif
ifeq ($(TCLTK_PATH),)
NO_TCLTK=NoThanks