linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Marek <mmarek@suse.cz>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	David Rientjes <rientjes@google.com>,
	Greg Thelen <gthelen@google.com>,
	Nico Schottelius <nico-linuxsetlocalversion@schottelius.org>
Subject: Re: [PATCH] kbuild: Clean up and speed up the localversion logic
Date: Wed, 30 Jun 2010 16:51:34 +0200	[thread overview]
Message-ID: <20100630145134.GA14739@sepie.suse.cz> (raw)
In-Reply-To: <20100629215421.GA24113@core.coreip.homeip.net>

On Tue, Jun 29, 2010 at 02:54:21PM -0700, Dmitry Torokhov wrote:
> On Thu, Jun 17, 2010 at 10:55:12PM -0700, Dmitry Torokhov wrote:
> > On Thu, Jun 17, 2010 at 03:40:38PM +0200, Michal Marek wrote:
> > > Now that we run scripts/setlocalversion during every build, it makes
> > > sense to move all the localversion logic there. This cleans up the
> > > toplevel Makefile and also makes sure that the script is called only
> > > once in 'make prepare' (previously, it would be called every time due to
> > > a variable expansion in an ifneq statement). No user-visible change is
> > > intended, unless one runs the setlocalversion script directly.
> > > 
> > > Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > > Cc: David Rientjes <rientjes@google.com>
> > > Cc: Greg Thelen <gthelen@google.com>
> > > Cc: Nico Schottelius <nico-linuxsetlocalversion@schottelius.org>
> > > Signed-off-by: Michal Marek <mmarek@suse.cz>
> > > ---
> > > 
> > > I tried to test this in various scenarios, but if anyone of you could give
> > > it a try, that would be great. The patch is against 2.6.35-rc3.
> > > 
> > 
> > Seems to be working for me, I do not need to go and fetch coffee while
> > installig newly compiled kernel anymore.
> > 
> 
> Michal,
> 
> Any chance this could be merged in 2.6.35? Without the patch installing
> over the network is not really an option anymore.

I now found that my patch breaks 'make LOCALVERSION=... '. The following
patch should fix it.

Michal


commit 0a564b2645c8766a669c55bde1f1ef5b0518caec
Author: Michal Marek <mmarek@suse.cz>
Date:   Wed Jun 30 16:41:23 2010 +0200

    kbuild: Propagate LOCALVERSION= down to scripts/setlocalversion
    
    Variables given on the make commandline are not exported to $(shell
    ...) commands, so run the setlocalversion script in the make rule
    directly.
    
    Signed-off-by: Michal Marek <mmarek@suse.cz>

diff --git a/Makefile b/Makefile
index a86ac8c..12ab175 100644
--- a/Makefile
+++ b/Makefile
@@ -884,11 +884,9 @@ $(vmlinux-dirs): prepare scripts
 	$(Q)$(MAKE) $(build)=$@
 
 # Store (new) KERNELRELASE string in include/config/kernel.release
-localversion = $(shell $(CONFIG_SHELL) \
-	       $(srctree)/scripts/setlocalversion $(srctree))
 include/config/kernel.release: include/config/auto.conf FORCE
 	$(Q)rm -f $@
-	$(Q)echo $(KERNELVERSION)$(localversion) > $@
+	$(Q)echo "$(KERNELVERSION)$$($(CONFIG_SHELL) scripts/setlocalversion $(srctree))" > $@
 
 
 # Things we need to do before we recursively start building the kernel

  reply	other threads:[~2010-07-02 11:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-07  6:53 Running make install over sshfs is painful now Dmitry Torokhov
2010-06-15 11:32 ` Michal Marek
2010-06-17 13:40   ` [PATCH] kbuild: Clean up and speed up the localversion logic Michal Marek
2010-06-17 23:05     ` David Rientjes
2010-06-18  5:25       ` Dmitry Torokhov
2010-06-18  5:55     ` Dmitry Torokhov
2010-06-29 21:54       ` Dmitry Torokhov
2010-06-30 14:51         ` Michal Marek [this message]
2010-06-22 10:44     ` Nico Schottelius
2010-06-22 11:13       ` Michal Marek
2010-06-22 11:25         ` Nico Schottelius

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=20100630145134.GA14739@sepie.suse.cz \
    --to=mmarek@suse.cz \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gthelen@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nico-linuxsetlocalversion@schottelius.org \
    --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;
as well as URLs for NNTP newsgroup(s).