Messages in this thread | | | Subject | Re: Stop the Linux kernel madness | From | Andreas Gruenbacher <> | Date | Sun, 20 Jun 2004 22:44:51 +0200 |
| |
On Sun, 2004-06-20 at 17:43, Jari Ruusu wrote: > Lars Marowsky-Bree wrote: > > On 2004-06-19T19:35:56, > > Jari Ruusu <jariruusu@users.sourceforge.net> 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))
> KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) > > > Last 7 lines of .config (SuSE 8 ES on AMD64 Opteron): > > # > # Build options > # > # CONFIG_SUSE_KERNEL is not set > CONFIG_UNITEDLINUX_KERNEL=y > CONFIG_CFGNAME="smp" > CONFIG_RELEASE=207 > > > 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 > endif
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 doesn't work.
Regards, -- Andreas Gruenbacher <agruen@suse.de> SUSE Labs, SUSE LINUX AG
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |