From: Michal Marek Date: Mon, 30 May 2011 11:36:07 +0000 (+0200) Subject: kbuild: Fix KERNELVERSION for empty SUBLEVEL or PATCHLEVEL X-Git-Tag: firefly_0821_release~7613^2~923^2~4 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cacd54ef49b75cb31d78bb7b8dd900690aac7bdf;p=firefly-linux-kernel-4.4.55.git 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 --- diff --git a/Makefile b/Makefile index afb8e0d26f2c..4fe907510d79 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