* perf version not set when building out of tree
@ 2013-10-31 23:31 David Ahern
2013-11-01 7:02 ` Ingo Molnar
0 siblings, 1 reply; 5+ messages in thread
From: David Ahern @ 2013-10-31 23:31 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, LKML, Namhyung Kim, Jiri Olsa, Ingo Molnar
When building 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 the warning message:
make[1]: *** No rule to make target `kernelversion'. Stop.
which comes from tools/perf/util/PERF-VERSION-GEN,
if test -z "$TAG"
then
TAG=$(MAKEFLAGS= make -sC ../.. kernelversion)
fi
There is no top level Makefile. perf is actually built, but has no
version info:
$ tools/perf/perf --version
perf version
I thought someone had proposed a way to fix that.
David
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: perf version not set when building out of tree
2013-10-31 23:31 perf version not set when building out of tree David Ahern
@ 2013-11-01 7:02 ` Ingo Molnar
2013-11-01 13:30 ` David Ahern
2013-11-05 23:58 ` David Ahern
0 siblings, 2 replies; 5+ messages in thread
From: Ingo Molnar @ 2013-11-01 7:02 UTC (permalink / raw)
To: David Ahern; +Cc: Arnaldo Carvalho de Melo, LKML, Namhyung Kim, Jiri Olsa
* David Ahern <dsahern@gmail.com> wrote:
> When building out of tree:
>
> make perf-tar-src-pkg
What's the canonical way to build a perf tarball? I didn't find any
makefile target for that.
> tar -xf perf-<ver>.tar -C /tmp
> cd /tmp/perf<ver>
> make -C tools/perf
>
> you get the warning message:
> make[1]: *** No rule to make target `kernelversion'. Stop.
>
> which comes from tools/perf/util/PERF-VERSION-GEN,
>
> if test -z "$TAG"
> then
> TAG=$(MAKEFLAGS= make -sC ../.. kernelversion)
> fi
>
> There is no top level Makefile. perf is actually built, but has no
> version info:
>
> $ tools/perf/perf --version
> perf version
>
> I thought someone had proposed a way to fix that.
I think we should pack the PERF-VERSION-FILE with the tarball and
use that. This needs roughly 3 changes:
- make PERF-VERSION-FILE part of the tarball
- make sure it's not zapped on 'make clean'
- don't try to regenerate it if there's no git repository to get a version from
Thanks,
Ingo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: perf version not set when building out of tree
2013-11-01 7:02 ` Ingo Molnar
@ 2013-11-01 13:30 ` David Ahern
2013-11-01 15:41 ` Ingo Molnar
2013-11-05 23:58 ` David Ahern
1 sibling, 1 reply; 5+ messages in thread
From: David Ahern @ 2013-11-01 13:30 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Arnaldo Carvalho de Melo, LKML, Namhyung Kim, Jiri Olsa
On 11/1/13, 1:02 AM, Ingo Molnar wrote:
>
> * David Ahern <dsahern@gmail.com> wrote:
>
>> When building out of tree:
>>
>> make perf-tar-src-pkg
>
> What's the canonical way to build a perf tarball? I didn't find any
> makefile target for that.
Perhaps I misunderstand your question. From the top-level of a kernel tree:
$ make help | grep perf
perf-tar-src-pkg - Build perf-3.12.0-rc5.tar source tarball
perf-targz-src-pkg - Build perf-3.12.0-rc5.tar.gz source tarball
perf-tarbz2-src-pkg - Build perf-3.12.0-rc5.tar.bz2 source tarball
perf-tarxz-src-pkg - Build perf-3.12.0-rc5.tar.xz source tarball
David
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: perf version not set when building out of tree
2013-11-01 13:30 ` David Ahern
@ 2013-11-01 15:41 ` Ingo Molnar
0 siblings, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2013-11-01 15:41 UTC (permalink / raw)
To: David Ahern; +Cc: Arnaldo Carvalho de Melo, LKML, Namhyung Kim, Jiri Olsa
* David Ahern <dsahern@gmail.com> wrote:
> On 11/1/13, 1:02 AM, Ingo Molnar wrote:
> >
> >* David Ahern <dsahern@gmail.com> wrote:
> >
> >>When building out of tree:
> >>
> >>make perf-tar-src-pkg
> >
> >What's the canonical way to build a perf tarball? I didn't find any
> >makefile target for that.
>
> Perhaps I misunderstand your question. From the top-level of a kernel tree:
> $ make help | grep perf
>
> perf-tar-src-pkg - Build perf-3.12.0-rc5.tar source tarball
> perf-targz-src-pkg - Build perf-3.12.0-rc5.tar.gz source tarball
> perf-tarbz2-src-pkg - Build perf-3.12.0-rc5.tar.bz2 source tarball
> perf-tarxz-src-pkg - Build perf-3.12.0-rc5.tar.xz source tarball
Thx - I was trying to find that within the tools/perf/ Makefiles ;-)
Thanks,
Ingo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: perf version not set when building out of tree
2013-11-01 7:02 ` Ingo Molnar
2013-11-01 13:30 ` David Ahern
@ 2013-11-05 23:58 ` David Ahern
1 sibling, 0 replies; 5+ messages in thread
From: David Ahern @ 2013-11-05 23:58 UTC (permalink / raw)
To: Ingo Molnar, Arnaldo Carvalho de Melo; +Cc: LKML, Namhyung Kim, Jiri Olsa
On 11/1/13, 1:02 AM, Ingo Molnar wrote:
> I think we should pack the PERF-VERSION-FILE with the tarball and
> use that. This needs roughly 3 changes:
>
> - make PERF-VERSION-FILE part of the tarball
> - make sure it's not zapped on 'make clean'
> - don't try to regenerate it if there's no git repository to get a version from
Solution was actually kind of easy. The head commit is already saved to
HEAD file when the tar is generated:
diff --git a/perf/tools/perf/util/PERF-VERSION-GEN
b/perf/tools/perf/util/PERF-VERSION-GEN
index 15a77b7c0e36..2155882e7c1d 100755
--- a/perf/tools/perf/util/PERF-VERSION-GEN
+++ b/perf/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 ../../HEAD
+then
+ TAG=$(cat ../../HEAD)
fi
if test -z "$TAG"
then
David
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-11-05 23:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-31 23:31 perf version not set when building out of tree David Ahern
2013-11-01 7:02 ` Ingo Molnar
2013-11-01 13:30 ` David Ahern
2013-11-01 15:41 ` Ingo Molnar
2013-11-05 23:58 ` David Ahern
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).