Skip to contentSkip to conversation

perf Makefile: fix GNU-only grep usage

PATCH In review John Spencer 2 participants 2 messages Aug 25, 2014 – Aug 26, 2014 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 perf Makefile: fix GNU-only grep usage

From efa79d5b7bc750369332a3a34442573af7b1b35c Mon Sep 17 00:00:00 2001
From: John Spencer <[email protected]>
Date: Mon, 25 Aug 2014 21:24:30 +0200
Subject: [PATCH 1/2] perf Makefile: fix GNU-only grep usage

this makes it work with non-GNU grep's as well.

---
 tools/perf/config/utilities.mak | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/config/utilities.mak +1 -1
index 4d985e0..7076a62 100644
@@ -132,7 +132,7 @@ endef
 #
 # Usage: bool-value = $(call is-absolute,path)
 #
-is-absolute = $(shell echo $(shell-sq) | grep ^/ -q && echo y)
+is-absolute = $(shell echo $(shell-sq) | grep -q ^/ && echo y)
 
 # lookup
 #
Signature · 1 line
1.8.4
maintainer Acked-by on v1 1/2
#1 lore raw

Hi John,

You'd better to CC the lkml ([email protected]) for the perf patches to get reviewed by other developers. I'm copying to the list this time.

Quoted 8 lines · John Spencer

From efa79d5b7bc750369332a3a34442573af7b1b35c Mon Sep 17 00:00:00 2001
From: John Spencer <[email protected]>
Date: Mon, 25 Aug 2014 21:24:30 +0200
Subject: [PATCH 1/2] perf Makefile: fix GNU-only grep usage

this makes it work with non-GNU grep's as well.

Thanks,
Namhyung

Quoted 18 lines
---
 tools/perf/config/utilities.mak | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/config/utilities.mak +1 -1
index 4d985e0..7076a62 100644
@@ -132,7 +132,7 @@ endef
 #
 # Usage: bool-value = $(call is-absolute,path)
 #
-is-absolute = $(shell echo $(shell-sq) | grep ^/ -q && echo y)
+is-absolute = $(shell echo $(shell-sq) | grep -q ^/ && echo y)
 
 # lookup
 #