Re: [PATCH 2/2] Makefile: "make kernelrelease" should show thecorrect full kernel version

From: Michal Marek
Date: Tue Jun 29 2010 - 08:13:29 EST


On Sun, Jun 27, 2010 at 11:01:06PM -0400, Amerigo Wang wrote:
> From: Amerigo Wang <amwang@xxxxxxxxxx>
> Date: Mon, 28 Jun 2010 10:45:21 +0800
>
> After commit 85a256d8e0116c8f5ad276730830f5d4d473344d, 'make kernelrelease' doesn't
> show the correct full kernel version. This patch fixes it, 'make kernelrelease' will
> show the same version name with the one you finally get.
>
> Cc: David Rientjes <rientjes@xxxxxxxxxx>
> Cc: Michal Marek <mmarek@xxxxxxx>
> Signed-off-by: Amerigo Wang <amwang@xxxxxxxxxx>
> ---
> Makefile | 5 ++---
> 1 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 710f91c..2b517a1 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -414,7 +414,7 @@ endif
> no-dot-config-targets := clean mrproper distclean \
> cscope TAGS tags help %docs check% \
> include/linux/version.h headers_% \
> - kernelrelease kernelversion
> + kernelversion
>
> config-targets := 0
> mixed-targets := 0
> @@ -1468,8 +1468,7 @@ checkstack:
> $(PERL) $(src)/scripts/checkstack.pl $(CHECKSTACK_ARCH)
>
> kernelrelease:
> - $(if $(wildcard include/config/kernel.release), $(Q)echo $(KERNELRELEASE), \
> - $(error kernelrelease not valid - run 'make prepare' to update it))
> + @echo $(kernelrelease)
> kernelversion:
> @echo $(KERNELVERSION)

AFAICS it was broken even before 85a256d. Nevertheless, the patch is
correct, but conflicts with 0915512 in the kbuild tree. What about this
one?