[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1437277382-57362-1-git-send-email-ryao@gentoo.org>
Date: Sat, 18 Jul 2015 23:43:00 -0400
From: Richard Yao <ryao@...too.org>
To: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Naohiro Aota <naota@...too.org>,
Emilio López <emilio@...pez.com.ar>,
Richard Yao <ryao@...too.org>, Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Jiri Olsa <jolsa@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
Adrian Hunter <adrian.hunter@...el.com>,
linux-kernel@...r.kernel.org (open list:PERFORMANCE EVENTS SUBSYSTEM)
Subject: [PATCH] perf tools: Do not require /bin/sh be bash
Commit fcfd6611fbccdbf2593bd949097a5c0e45cd96da truncated
.config-detected by piping echo -n to it. On systems where /bin/sh is
not bash and echo is a builtin, echo -n prints "-n", which breaks the
build:
.config-detected:1: *** missing separator. Stop.
This broke builds on my Gentoo systems where /bin/sh is dash and
possibly other systems where /bin/sh is not bash as well. It is easily
solved by piping cat /dev/null. Piping an empty command should have been
a suitable substitute, but zsh hangs when asked to do that.
This method of truncating a file works on bash, busybox ash, dash and
zsh. Other shells were not tested.
Signed-off-by: Richard Yao <ryao@...too.org>
Reviewed-by: Emilio López <emilio@...pez.com.ar>
---
tools/perf/config/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 094ddae..70426d6 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -11,7 +11,7 @@ ifneq ($(obj-perf),)
obj-perf := $(abspath $(obj-perf))/
endif
-$(shell echo -n > $(OUTPUT).config-detected)
+$(shell cat /dev/null > $(OUTPUT).config-detected)
detected = $(shell echo "$(1)=y" >> $(OUTPUT).config-detected)
detected_var = $(shell echo "$(1)=$($(1))" >> $(OUTPUT).config-detected)
--
2.3.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists