diff options
author | Michal Marek <mmarek@suse.cz> | 2011-05-30 07:36:07 -0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2011-06-09 17:05:54 -0400 |
commit | cacd54ef49b75cb31d78bb7b8dd900690aac7bdf (patch) | |
tree | 59cad8ba1034e2ec830f5dbcfe5e52fc432f38fa | |
parent | 181e976327cf33095837c579608ebed42d2ad992 (diff) |
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 | |||
378 | 378 | ||
379 | # Read KERNELRELEASE from include/config/kernel.release (if it exists) | 379 | # Read KERNELRELEASE from include/config/kernel.release (if it exists) |
380 | KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) | 380 | KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) |
381 | KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) | 381 | KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION) |
382 | 382 | ||
383 | export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION | 383 | export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION |
384 | export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC | 384 | export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC |