diff options
author | David Ahern <dsahern@gmail.com> | 2013-11-06 08:55:35 -0700 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-11-07 10:40:47 -0300 |
commit | a614d01bdd0cc8200d917da25f5a3d539b944193 (patch) | |
tree | 72b71a18008e104bf44bcf89bb0937dd4bef1134 /tools/perf | |
parent | 744a971940520cf0818e1fe882b64892c528e6de (diff) | |
download | linux-a614d01bdd0cc8200d917da25f5a3d539b944193.tar.bz2 |
perf tools: Fix version when building out of tree
When building perf out of tree:
$ make perf-tar-src-pkg
$ tar -xf perf-<ver>.tar -C /tmp
$ cd /tmp/perf<ver>
$ make -C tools/perf
you get this warning message:
make[1]: *** No rule to make target `kernelversion'. Stop.
Fix it by saving the perf version in the tar file and using that for the
out of tree builds.
v2: removed short form request and fixed up version string from usual output.
Signed-off-by: David Ahern <dsahern@gmail.com>
Suggested-by: Ingo Molnar <mingo@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/1383753335-25782-1-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rwxr-xr-x | tools/perf/util/PERF-VERSION-GEN | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/util/PERF-VERSION-GEN b/tools/perf/util/PERF-VERSION-GEN index ce7a804b2951..39f17507578d 100755 --- a/tools/perf/util/PERF-VERSION-GEN +++ b/tools/perf/util/PERF-VERSION-GEN @@ -19,6 +19,9 @@ if test -d ../../.git -o -f ../../.git then TAG=$(git describe --abbrev=0 --match "v[0-9].[0-9]*" 2>/dev/null ) CID=$(git log -1 --abbrev=4 --pretty=format:"%h" 2>/dev/null) && CID="-g$CID" +elif test -f ../../PERF-VERSION-FILE +then + TAG=$(cut -d' ' -f3 ../../PERF-VERSION-FILE | sed -e 's/\"//g') fi if test -z "$TAG" then |