From: Michal Marek Date: Mon, 30 May 2011 12:12:09 +0000 (+0200) Subject: perf: Use make kernelversion instead of parsing the Makefile X-Git-Tag: firefly_0821_release~7613^2~923^2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5d61b9fd19d9f3cf653dbba615876e7792eea5ea;p=firefly-linux-kernel-4.4.55.git perf: Use make kernelversion instead of parsing the Makefile Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Signed-off-by: Michal Marek --- diff --git a/tools/perf/util/PERF-VERSION-GEN b/tools/perf/util/PERF-VERSION-GEN index 26d4d3fd6deb..9c5fb4d93824 100755 --- a/tools/perf/util/PERF-VERSION-GEN +++ b/tools/perf/util/PERF-VERSION-GEN @@ -23,12 +23,7 @@ if test -d ../../.git -o -f ../../.git && then VN=$(echo "$VN" | sed -e 's/-/./g'); else - eval $(grep '^VERSION[[:space:]]*=' ../../Makefile|tr -d ' ') - eval $(grep '^PATCHLEVEL[[:space:]]*=' ../../Makefile|tr -d ' ') - eval $(grep '^SUBLEVEL[[:space:]]*=' ../../Makefile|tr -d ' ') - eval $(grep '^EXTRAVERSION[[:space:]]*=' ../../Makefile|tr -d ' ') - - VN="${VERSION}.${PATCHLEVEL}.${SUBLEVEL}${EXTRAVERSION}" + VN=$(make -sC ../.. kernelversion) fi VN=$(expr "$VN" : v*'\(.*\)')