Skip to contentSkip to conversation

perf tools: Don't corrupt PERF-VERSION-FILE with make debug

PATCH In review Robert Richter 2 participants 2 messages Jun 20, 2011 – Jun 22, 2011 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf tools: Don't corrupt PERF-VERSION-FILE with make debug

When running make with debug option -d the PERF-VERSION-FILE gets corrupted because make is noisy:

PERF-VERSION-FILE:2: *** missing separator. Stop.

Fixing this by not passing the make flags in the MAKEFLAGS environment variable to the sub-make that generates the version string.

---
 tools/perf/util/PERF-VERSION-GEN |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
tools/perf/util/PERF-VERSION-GEN +1 -1
index 9c5fb4d..ad73300 100755
@@ -23,7 +23,7 @@ if test -d ../../.git -o -f ../../.git &&
 then
 	VN=$(echo "$VN" | sed -e 's/-/./g');
 else
-	VN=$(make -sC ../.. kernelversion)
+	VN=$(MAKEFLAGS= make -sC ../.. kernelversion)
 fi
 
 VN=$(expr "$VN" : v*'\(.*\)')
Signature · 1 line
1.7.5.3
#1 lore raw
Quoted 18 lines · Robert Richter

When running make with debug option -d the PERF-VERSION-FILE gets corrupted because make is noisy:

PERF-VERSION-FILE:2: *** missing separator. Stop.

Fixing this by not passing the make flags in the MAKEFLAGS environment variable to the sub-make that generates the version string.

---
 tools/perf/util/PERF-VERSION-GEN |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
tools/perf/util/PERF-VERSION-GEN +0 -0
index 9c5fb4d..ad73300 100755

tools/perf/util/PERF-VERSION-GEN if test -d ../../.git -o -f ../../.git && · line 26

Quoted 5 lines
tools/perf/util/PERF-VERSION-GEN +1 -1
@@ -23,7 +23,7 @@ if test -d ../../.git -o -f ../../.git &&
 then
 	VN=$(echo "$VN" | sed -e 's/-/./g');
 else
-	VN=$(make -sC ../.. kernelversion)
+	VN=$(MAKEFLAGS= make -sC ../.. kernelversion)

Yeah, and this has been fixed recently, via:

37aa9a2eb4d9: perf: clear out make flags when calling kernel make kernelver

Thanks,

Ingo