Re: kbuild / KERNELRELEASE not rebuild correctly anymore

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jan 15, 2006 at 10:51:14AM +0100, Ren? Rebe wrote:
> Hi all,
> 
> with at least 2.6.15-mm{2,3,4} untaring the kernel and running make menuconfig
> (or most other favourite config tools) do not display a version anymore since
> .kernelrelease it not build as dependecy.
> 
> I only noticed this because my build scripts grab the version before the build for
> later file names on installations and leave this string empty after configuration of
> latest linux kernels.

It is correct that "make kernelrelease" does not display correct info
until you have done a proper build of the kernel or at least the prepare
step.

The issue here is that we shall avoid sideeffects when running "make
kernelrelease" so it does not trigger all sorts of commands when running
as root for instance.

So the real fix is to error out when .kernelrelease does not exists.
See attached patch.

	Sam

diff --git a/Makefile b/Makefile
index deedaf7..19a37a2 100644
--- a/Makefile
+++ b/Makefile
@@ -1301,7 +1301,8 @@ checkstack:
 	$(PERL) $(src)/scripts/checkstack.pl $(ARCH)
 
 kernelrelease:
-	@echo $(KERNELRELEASE)
+	$(if $(wildcard .kernelrelease), $(Q)echo $(KERNELRELEASE), \
+	$(error kernelrelease not valid - run 'make prepare' to update it))
 kernelversion:
 	@echo $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux