Re: Stop the Linux kernel madness
From: Andreas Gruenbacher
Date: Sun Jun 20 2004 - 15:42:21 EST
On Sun, 2004-06-20 at 17:43, Jari Ruusu wrote:
> Lars Marowsky-Bree wrote:
> > On 2004-06-19T19:35:56,
> > Jari Ruusu <jariruusu@xxxxxxxxxxxxxxxxxxxxx> said:
> > > Last time I checked, SUSE kernels include " characters in EXTRAVERSION
> > > and KERNELRELEASE Makefile strings. Those " characters need to be
> > > filtered out before EXTRAVERSION and KERNELRELEASE strings can be
> > > used.
> > >
> > > Just another SUSE sillyness.
> > What kind of crap 've you been smokin'? Sue your dealer.
> First 6 lines of Kernel Makefile (SuSE 8 ES on AMD64 Opteron):
> VERSION = 2
> PATCHLEVEL = 4
> SUBLEVEL = 21
> EXTRAVERSION = -$(CONFIG_RELEASE)-$(CONFIG_CFGNAME)
Indeed, that was a bug. In our current tree we have this, which gets rid
of the superfluous quotes:
EXTRAVERSION = -$(shell echo $(CONFIG_RELEASE)-$(CONFIG_CFGNAME))
> Last 7 lines of .config (SuSE 8 ES on AMD64 Opteron):
> # Build options
> # CONFIG_SUSE_KERNEL is not set
> Those " characters around "smp" will not go away automatically.
> To see the difference try these lines in Makefile:
> echo $(KERNELRELEASE)
> echo '$(KERNELRELEASE)'
Well, it depends in which context you use the string, which is why we
didn't catch the bug for a long time. I agree that the quotes shouldn't
be there. Mistakes happen.
> Those " characters make quite difference in Makefile code like this:
> ifneq ($(KERNELRELEASE),$(shell uname -r))
> @echo You compiled this for wrong kernel
This test may often turn out not to be very useful: For example, we are
building modules for different kernels without booting into each of
those kernels. Cross-compiling is another case where the above test
Andreas Gruenbacher <agruen@xxxxxxx>
SUSE Labs, SUSE LINUX AG
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/