Skip to contentSkip to conversation

perf: fix makefile generation under dash

PATCH Applied Sergei Trofimovich 5 participants 5 messages Jul 19, 2015 – Jul 21, 2015 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf: fix makefile generation under dash

Under dash 'echo -n' yields '-n' to stdout. Use printf "" instead.

CC Peter Zijlstra <[email protected]>
CC Ingo Molnar <[email protected]>
CC Arnaldo Carvalho de Melo <[email protected]>
CC Jiri Olsa <[email protected]>
CC Namhyung Kim <[email protected]>
CC Adrian Hunter <[email protected]>
---
 tools/perf/config/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/config/Makefile +1 -1
index 094ddae..bc0b59e 100644
@@ -11,7 +11,7 @@ ifneq ($(obj-perf),)
 obj-perf := $(abspath $(obj-perf))/
 endif
 
-$(shell echo -n > $(OUTPUT).config-detected)
+$(shell printf "" > $(OUTPUT).config-detected)
 detected     = $(shell echo "$(1)=y"       >> $(OUTPUT).config-detected)
 detected_var = $(shell echo "$(1)=$($(1))" >> $(OUTPUT).config-detected)
 
Signature · 1 line
2.4.6
Acked-by on v1 1/1
#1 lore raw
Quoted 2 lines · Sergei Trofimovich

Under dash 'echo -n' yields '-n' to stdout. Use printf "" instead.

thanks,
jirka

Quoted 29 lines
CC Peter Zijlstra <[email protected]>
CC Ingo Molnar <[email protected]>
CC Arnaldo Carvalho de Melo <[email protected]>
CC Jiri Olsa <[email protected]>
CC Namhyung Kim <[email protected]>
CC Adrian Hunter <[email protected]>
---
 tools/perf/config/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/config/Makefile +1 -1
index 094ddae..bc0b59e 100644
@@ -11,7 +11,7 @@ ifneq ($(obj-perf),)
 obj-perf := $(abspath $(obj-perf))/
 endif
 
-$(shell echo -n > $(OUTPUT).config-detected)
+$(shell printf "" > $(OUTPUT).config-detected)
 detected     = $(shell echo "$(1)=y"       >> $(OUTPUT).config-detected)
 detected_var = $(shell echo "$(1)=$($(1))" >> $(OUTPUT).config-detected)
 
Signature · 1 line
2.4.6
maintainer Applied
#3 lore raw

Em Mon, Jul 20, 2015 at 09:44:55AM +0200, Ingo Molnar escreveu:

Quoted 9 lines · Sergei Trofimovich
Quoted 2 lines

Under dash 'echo -n' yields '-n' to stdout.

Btw, 'echo -n' is a pretty common construct in shell scripts - Dash would really do people a big favor by implementing it, and it's a very simple feature.

Thanks, applied.

- Arnaldo

#4 lore raw

[tip:perf/core] perf tools: Fix makefile generation under dash

In reply to Sergei Trofimovich
perf tools: Fix makefile generation under dash
Commit-ID:  52c0a18b9010fb19d10889e8a00aa784197d357c
Gitweb:     http://git.kernel.org/tip/52c0a18b9010fb19d10889e8a00aa784197d357c
Author:     Sergei Trofimovich <[email protected]>
AuthorDate: Sun, 19 Jul 2015 10:30:05 +0100
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Mon, 20 Jul 2015 17:49:50 -0300

perf tools: Fix makefile generation under dash

Under dash 'echo -n' yields '-n' to stdout. Use printf "" instead.

---
 tools/perf/config/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/config/Makefile +1 -1
index a9b93d1..8768f84 100644
@@ -11,7 +11,7 @@ ifneq ($(obj-perf),)
 obj-perf := $(abspath $(obj-perf))/
 endif
 
-$(shell echo -n > $(OUTPUT).config-detected)
+$(shell printf "" > $(OUTPUT).config-detected)
 detected     = $(shell echo "$(1)=y"       >> $(OUTPUT).config-detected)
 detected_var = $(shell echo "$(1)=$($(1))" >> $(OUTPUT).config-detected)