Dne 4.5.2011 22:44, Arun Sharma napsal(a): > On Wed, May 04, 2011 at 10:23:43PM +0200, Michal Marek wrote: >> Please don't do that. make rpm has to work with the version string >> set by the kernel, not the other way around. > > Right. Here's an alternative approach: > > Could we modify the version string provided by the kernel to include > the version string (which is derived from scripts/mkversion) > > --- a/Makefile > +++ b/Makefile > @@ -363,11 +363,14 @@ KBUILD_AFLAGS_MODULE := -DMODULE > KBUILD_CFLAGS_MODULE := -DMODULE > KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds > > -# Read KERNELRELEASE from include/config/kernel.release (if it exists) > -KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) > +# Read ___KERNELRELEASE from include/config/kernel.release (if it exists) > +___KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) > +# Append the release version only once. > +# Note: .version could change during the build. > +KERNELRELEASE ?= $(___KERNELRELEASE)-$(shell /bin/sh scripts/mkversion) > KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) Again, please don't do that. Most users don't give a damn about make rpm. If I build a pristine 2.6.39-rc6, I want uname -r report 2.6.39-rc6, not 2.6.39-rc6-1. not 2.6.39-rc6-2 or anything like that. If I wanted to decorate the release string, I would set CONFIG_LOCALVERSION, but please do not make that choice for me. make rpm is a simple tool to allow developers easily copy kernels from their build machine to another machine where they can test stuff. If you want something more advanced, use the spec file from your distro. Michal -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html