public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Thavidu Ranatunga <tharan@au1.ibm.com>
Cc: linux-kernel@vger.kernel.org, Ian Munsie <imunsie@au1.ibm.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@elte.hu>,
	Christoph Hellwig <hch@infradead.org>
Subject: Re: [PATCH 2/2] perf: Version String fix, for fallback if not from git
Date: Thu, 8 Jul 2010 17:57:54 -0300	[thread overview]
Message-ID: <20100708205754.GH25306@ghostprotocols.net> (raw)
In-Reply-To: <1278316815-6099-2-git-send-email-tharan@au1.ibm.com>

Em Mon, Jul 05, 2010 at 06:00:15PM +1000, Thavidu Ranatunga escreveu:
> This gets rid of the default version fallback for Perf and changes it so that it
> returns the version of the kernel from it's Makefile (if sources were not from
> git, ie. if it was downloaded from a tarball)
> 
> Signed-off-by: Thavidu Ranatunga <tharan@au1.ibm.com>
> Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>

>  	VN=$(git describe --abbrev=4 HEAD 2>/dev/null) &&
>  	case "$VN" in
>  	*$LF*) (exit 1) ;;
> @@ -27,7 +23,12 @@ elif test -d ../../.git -o -f ../../.git &&
>  then
>  	VN=$(echo "$VN" | sed -e 's/-/./g');
>  else
> -	VN="$DEF_VER"
> +	eval `grep '^VERSION\s*=' ../../Makefile|tr -d ' '`
> +	eval `grep '^PATCHLEVEL\s*=' ../../Makefile|tr -d ' '`
> +	eval `grep '^SUBLEVEL\s*=' ../../Makefile|tr -d ' '`
> +	eval `grep '^EXTRAVERSION\s*=' ../../Makefile|tr -d ' '`
> +
> +	VN="${VERSION}.${PATCHLEVEL}.${SUBLEVEL}${EXTRAVERSION}"

This makes 'make perf-tarbz2-src-pkg':

[acme@emilia linux-2.6-tip]$ make perf-tarbz2-src-pkg
  TAR
[acme@emilia linux-2.6-tip]$ mv perf-2.6.35-rc4.tar.bz2 /tmp
[acme@emilia linux-2.6-tip]$ cd /tmp
[acme@emilia tmp]$ tar xf perf-2.6.35-rc4.tar.bz2
[acme@emilia tmp]$ cd perf-2.6.35-rc4/tools/perf
[acme@emilia perf]$ make
grep: ../../Makefile: No such file or directory
grep: ../../Makefile: No such file or directory

- Arnaldo

  parent reply	other threads:[~2010-07-08 20:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-05  8:00 [PATCH 2/2] perf: Version String fix, for fallback if not from git Thavidu Ranatunga
2010-07-05  8:45 ` [tip:perf/urgent] " tip-bot for Thavidu Ranatunga
2010-07-08 20:57 ` Arnaldo Carvalho de Melo [this message]
2010-07-08 21:02   ` [PATCH 2/2] " Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100708205754.GH25306@ghostprotocols.net \
    --to=acme@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=hch@infradead.org \
    --cc=imunsie@au1.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=tharan@au1.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox