Thread (3 messages) flat view 3 messages, 3 authors, 2016-06-15

[PATCH/RFC] SunOS grep does not understand -C<n>

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:05
Subsystem: kernel build + files below scripts/ (unless maintained elsewhere), the rest · Maintainers: Nathan Chancellor, Nicolas Schier, Linus Torvalds

I noticed that the first "grep -C1" test in t7002 does not pass on my 
SunOS-5.11-i86pc, and that is not because our way to spawn external
grep is broken, but because the native grep does not understand -C<n>.

Is it just me and my installation (i.e. I might have failed to install
saner grep from the distribution that everybody uses), or everybody on
SunOS is using this option himself because our Makefile doesn't do that
automatically for them?

Just in case it is the latter, here is a proposed patch.

---
 Makefile |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index bde27ed..daf4296 100644
--- a/Makefile
+++ b/Makefile
@@ -728,6 +728,7 @@ ifeq ($(uname_S),SunOS)
 	NO_MKDTEMP = YesPlease
 	NO_MKSTEMPS = YesPlease
 	NO_REGEX = YesPlease
+	NO_EXTERNAL_GREP = YesPlease
 	ifeq ($(uname_R),5.7)
 		NEEDS_RESOLV = YesPlease
 		NO_IPV6 = YesPlease
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help