diff options
author | Michal Marek <mmarek@suse.cz> | 2011-05-30 13:36:07 +0200 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2011-06-09 23:05:54 +0200 |
commit | cacd54ef49b75cb31d78bb7b8dd900690aac7bdf (patch) | |
tree | 59cad8ba1034e2ec830f5dbcfe5e52fc432f38fa | |
parent | 181e976327cf33095837c579608ebed42d2ad992 (diff) | |
download | linux-cacd54ef49b75cb31d78bb7b8dd900690aac7bdf.tar.gz linux-cacd54ef49b75cb31d78bb7b8dd900690aac7bdf.tar.bz2 linux-cacd54ef49b75cb31d78bb7b8dd900690aac7bdf.zip |
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>
-rw-r--r-- | Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |