[PATCH] Fix running 'make kernelrelease' before builing

From: Rene Scharfe
Date: Tue Jan 10 2006 - 14:59:03 EST


Hi Sam,

after your latest Makefile changes 'make kernelrelease' displays an
empty line when it is run before building. I think it's more useful
to let it build the kernel version and display it.

The patch makes kernelrelease dependant on .kernelrelease. It also
moves one echo call to the single other place that depends on
.kernelrelease. Otherwise it would display its message there _and_
when called through 'make kernelrelease'.

Signed-off-by: Rene Scharfe <rene.scharfe@xxxxxxxxxxxxxx>

diff --git a/Makefile b/Makefile
index deedaf7..403eee0 100644
--- a/Makefile
+++ b/Makefile
@@ -788,7 +788,6 @@ kernelrelease = \
.kernelrelease: FORCE
$(Q)rm -f .kernelrelease
$(Q)echo $(kernelrelease) > .kernelrelease
- $(Q)echo " Building kernel $(kernelrelease)"


# Things we need to do before we recursively start building the kernel
@@ -808,6 +807,7 @@ kernelrelease = \
# 1) Check that make has not been executed in the kernel src $(srctree)
# 2) Create the include2 directory, used for the second asm symlink
prepare3: .kernelrelease
+ $(Q)echo " Building kernel $(KERNELRELEASE)"
ifneq ($(KBUILD_SRC),)
@echo ' Using $(srctree) as source for kernel'
$(Q)if [ -f $(srctree)/.config ]; then \
@@ -1300,7 +1300,7 @@ checkstack:
$(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \
$(PERL) $(src)/scripts/checkstack.pl $(ARCH)

-kernelrelease:
+kernelrelease: .kernelrelease
@echo $(KERNELRELEASE)
kernelversion:
@echo $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
-
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/