aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2011-05-30 13:36:07 +0200
committerMichal Marek <mmarek@suse.cz>2011-06-09 23:05:54 +0200
commitcacd54ef49b75cb31d78bb7b8dd900690aac7bdf (patch)
tree59cad8ba1034e2ec830f5dbcfe5e52fc432f38fa /Makefile
parent181e976327cf33095837c579608ebed42d2ad992 (diff)
downloadkernel_goldelico_gta04-cacd54ef49b75cb31d78bb7b8dd900690aac7bdf.zip
kernel_goldelico_gta04-cacd54ef49b75cb31d78bb7b8dd900690aac7bdf.tar.gz
kernel_goldelico_gta04-cacd54ef49b75cb31d78bb7b8dd900690aac7bdf.tar.bz2
kbuild: Fix KERNELVERSION for empty SUBLEVEL or PATCHLEVEL
Omit the second dot for releases without SUBLEVEL. If PATCHLEVEL is also empty, only display VERSION. Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index afb8e0d..4fe9075 100644
--- a/Makefile
+++ b/Makefile
@@ -378,7 +378,7 @@ 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)
-KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
+KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION
export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC