Properly extract KERNEL_PATCHVER for linux 3.0
authorHauke Mehrtens <hauke@hauke-m.de>
Wed, 15 Jun 2011 21:10:33 +0000 (21:10 +0000)
committerHauke Mehrtens <hauke@hauke-m.de>
Wed, 15 Jun 2011 21:10:33 +0000 (21:10 +0000)
Signed-off-by: Jonas Gorski <jonas.gorski+openwrt@gmail.com>
SVN-Revision: 27183

include/kernel-version.mk

index 4ce67718379f5bd040201635ae3b7a8ba2e122ae..f47a3f31dfae9621fe88d8fbd23935e3161e8a2d 100644 (file)
@@ -37,5 +37,9 @@ split_version=$(subst ., ,$(1))
 merge_version=$(subst $(space),.,$(1))
 KERNEL_BASE=$(firstword $(subst -, ,$(LINUX_VERSION)))
 KERNEL=$(call merge_version,$(wordlist 1,2,$(call split_version,$(KERNEL_BASE))))
-KERNEL_PATCHVER=$(call merge_version,$(wordlist 1,3,$(call split_version,$(KERNEL_BASE))))
+ifeq ($(firstword $(call split_version,$(KERNEL_BASE))),2)
+  KERNEL_PATCHVER=$(call merge_version,$(wordlist 1,3,$(call split_version,$(KERNEL_BASE))))
+else
+  KERNEL_PATCHVER=$(KERNEL)
+endif