From: Sam Ravnborg <sam@ravnborg.org>
To: Ren? Rebe <rene@exactcode.de>
Cc: linux-kernel@vger.kernel.org, Linus Torvalds <torvalds@osdl.org>,
Roman Zippel <zippel@linux-m68k.org>,
akpm@osdl.org
Subject: Re: kbuild / KERNELRELEASE not rebuild correctly anymore
Date: Sun, 15 Jan 2006 12:19:22 +0100 [thread overview]
Message-ID: <20060115111922.GA13673@mars.ravnborg.org> (raw)
In-Reply-To: <200601151141.30876.rene@exactcode.de>
On Sun, Jan 15, 2006 at 11:41:30AM +0100, Ren? Rebe wrote:
> >
> > So the real fix is to error out when .kernelrelease does not exists.
> > See attached patch.
>
> You expect us to run make prepare before make menuconfig or simillar?
> That sounds a bit odd ...
The kernelrelease depends on the actual configuration.
So without having completed the make *config step kbuild cannot tell the
correct kernelrelease.
Now with the patch attached to last mail kbuild will now error out in
case there is no valid kernelrelease. Thats obviously only a hack, since
we need to error out when .config has been updated and the new
kernelrelease has not been created.
Maybe the better approach would be always to create the .kernelrelease
file as part of the configuration - based on the principle of least
suprise.
See attached patch.
Sam
diff --git a/Makefile b/Makefile
index deedaf7..4ab0141 100644
--- a/Makefile
+++ b/Makefile
@@ -433,6 +433,7 @@ export KBUILD_DEFCONFIG
config %config: scripts_basic outputmakefile FORCE
$(Q)mkdir -p include/linux
$(Q)$(MAKE) $(build)=scripts/kconfig $@
+ $(Q)$(MAKE) .kernelrelease
else
# ===========================================================================
@@ -783,12 +784,13 @@ endif
localver-full = $(localver)$(localver-auto)
# Store (new) KERNELRELASE string in .kernelrelease
+quiet_cmd_kernelrelease = GEN $@
+ cmd_kernelrelease = rm -f $@; echo $(kernelrelease) > $@
+
kernelrelease = \
$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)$(localver-full)
.kernelrelease: FORCE
- $(Q)rm -f .kernelrelease
- $(Q)echo $(kernelrelease) > .kernelrelease
- $(Q)echo " Building kernel $(kernelrelease)"
+ $(call cmd,kernelrelease)
# Things we need to do before we recursively start building the kernel
@@ -808,6 +810,7 @@ kernelrelease = \
# 1) Check that make has not been executed in the kernel src $(srctree)
# 2) Create the include2 directory, used for the second asm symlink
prepare3: .kernelrelease
+ $(Q)echo " Building kernel $(kernelrelease)"
ifneq ($(KBUILD_SRC),)
@echo ' Using $(srctree) as source for kernel'
$(Q)if [ -f $(srctree)/.config ]; then \
@@ -1301,7 +1304,8 @@ checkstack:
$(PERL) $(src)/scripts/checkstack.pl $(ARCH)
kernelrelease:
- @echo $(KERNELRELEASE)
+ $(if $(wildcard .kernelrelease), $(Q)echo $(KERNELRELEASE), \
+ $(error kernelrelease not valid - run 'make *config' to update it))
kernelversion:
@echo $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
next prev parent reply other threads:[~2006-01-15 11:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-15 9:51 René Rebe
2006-01-15 10:05 ` Sam Ravnborg
2006-01-15 10:41 ` René Rebe
2006-01-15 11:19 ` Sam Ravnborg [this message]
2006-01-15 12:12 ` René Rebe
2006-01-15 12:31 ` Sam Ravnborg
2006-01-15 14:26 ` René Rebe
2006-01-15 23:29 ` Kyle Moffett
2006-01-16 11:15 ` [PATCH] kbuild: create .kernelrelease at *config step Sam Ravnborg
2006-01-15 10:13 ` kbuild / KERNELRELEASE not rebuild correctly anymore Grant Coady
2006-01-15 10:42 ` René Rebe
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=20060115111922.GA13673@mars.ravnborg.org \
--to=sam@ravnborg.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rene@exactcode.de \
--cc=torvalds@osdl.org \
--cc=zippel@linux-m68k.org \
/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
Powered by JetHome