public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Cong Wang <amwang@redhat.com>
To: Brice Goglin <Brice.Goglin@inria.fr>
Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org,
	David Rientjes <rientjes@google.com>,
	Michal Marek <mmarek@suse.cz>
Subject: Re: [PATCH 2/2] Makefile: "make kernelrelease" should show the correct full kernel version
Date: Wed, 18 Aug 2010 17:20:07 +0800	[thread overview]
Message-ID: <4C6BA5C7.5010207@redhat.com> (raw)
In-Reply-To: <4C6B9F53.6040100@inria.fr>

[-- Attachment #1: Type: text/plain, Size: 1551 bytes --]

On 08/18/10 16:52, Brice Goglin wrote:
> Le 18/08/2010 10:57, Cong Wang a écrit :
>> On 08/18/10 16:38, Brice Goglin wrote:
>>> Le 18/08/2010 10:10, Cong Wang a écrit :
>>>> On 08/18/10 15:15, Brice Goglin wrote:
>>>>> This patch (actually 01ab17887 in 2.6.36-rc1) reveals what looks
>>>>> like a
>>>>> problem to me: make kernelrelease always regenerates
>>>>> include/config/kernel.release even if it's already more recent than
>>>>> include/config/auto.conf. Is this the expected behavior? Do we really
>>>>> need include/config/kernel.release to depend on FORCE?
>>>>>
>>>>
>>>> I think so, because "LOCALVERSION=" can be given from command line,
>>>> so we need to regenerate it.
>>>>
>>>> Or am I missing your point here?
>>>>
>>>
>>> Interesting. I assumed "make kernelrelease" was mainly here to display
>>> the release string (which means you would not need write access to the
>>> kernel build dir). And indeed make help says:
>>>     kernelrelease      - Output the release version string
>>> Right now, it looks like "update the version string and by the way
>>> display it too" (and you need write access).
>>>
>>
>> I believe you will also need write access even without this patch,
>> if you compile a fresh kernel. So your assumption is not correct.
>>
>
> If I revert 01ab17887f4, I don't need write access. Things always worked
> fine before 2.6.36 as far I remember.
>

Ah, I forgot Michal checked in a slightly different patch with mine. :)

Does the attached patch work for you?


---
Signed-off-by: WANG Cong <amwang@redhat.com>

[-- Attachment #2: makefile-not-regenerate-release.diff --]
[-- Type: text/x-patch, Size: 461 bytes --]

diff --git a/Makefile b/Makefile
index f3bdff8..25da252 100644
--- a/Makefile
+++ b/Makefile
@@ -1408,8 +1408,8 @@ checkstack:
 	$(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \
 	$(PERL) $(src)/scripts/checkstack.pl $(CHECKSTACK_ARCH)
 
-kernelrelease: include/config/kernel.release
-	@echo $(KERNELRELEASE)
+kernelrelease:
+	@echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))"
 
 kernelversion:
 	@echo $(KERNELVERSION)

  reply	other threads:[~2010-08-18  9:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-28  3:00 [PATCH 1/2] Makefile: fix missing dash when using make LOCALVERSION=xxx Amerigo Wang
2010-06-28  3:01 ` [PATCH 2/2] Makefile: "make kernelrelease" should show the correct full kernel version Amerigo Wang
2010-06-29 12:13   ` Michal Marek
2010-06-29 12:17     ` Michal Marek
2010-06-30 10:39     ` Cong Wang
2010-08-18  7:15   ` Brice Goglin
2010-08-18  8:10     ` Cong Wang
2010-08-18  8:38       ` Brice Goglin
2010-08-18  8:57         ` Cong Wang
2010-08-18  8:52           ` Brice Goglin
2010-08-18  9:20             ` Cong Wang [this message]
2010-08-18  9:17               ` Brice Goglin
2010-06-28  9:08 ` [PATCH 1/2] Makefile: fix missing dash when using make LOCALVERSION=xxx David Rientjes
2010-06-28  9:25   ` Cong Wang
2010-06-28 18:46     ` David Rientjes
2010-06-29  1:45       ` Cong Wang
2010-06-29 12:14       ` Michal Marek

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=4C6BA5C7.5010207@redhat.com \
    --to=amwang@redhat.com \
    --cc=Brice.Goglin@inria.fr \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    --cc=rientjes@google.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