makefile: not need to regenerate kernel.release file when make kernelrelease
authorAmerigo Wang <amwang@redhat.com>
Fri, 20 Aug 2010 09:36:06 +0000 (05:36 -0400)
committerMichal Marek <mmarek@suse.cz>
Fri, 20 Aug 2010 11:55:56 +0000 (13:55 +0200)
Brice reported that 'kernelrelease' has a dependence on include/config/kernel.release,
causes this file to be regenerated every time when invoke it. It doesn't have to.

Reported-by: Brice Goglin <Brice.Goglin@inria.fr>
Tested-by: Brice Goglin <Brice.Goglin@inria.fr>
Signed-off-by: WANG Cong <amwang@redhat.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Makefile

index f3bdff8c8d784c0045075da5ea690c8ed5445408..25da2521dd41127f7b7a278856142f1eb2b5d8e2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1408,8 +1408,8 @@ checkstack:
        $(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \
        $(PERL) $(src)/scripts/checkstack.pl $(CHECKSTACK_ARCH)
 
-kernelrelease: include/config/kernel.release
-       @echo $(KERNELRELEASE)
+kernelrelease:
+       @echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))"
 
 kernelversion:
        @echo $(KERNELVERSION)