aboutsummaryrefslogtreecommitdiffstats
path: root/include/kernel-version.mk
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-03-03 13:54:29 +0000
committerFelix Fietkau <nbd@openwrt.org>2009-03-03 13:54:29 +0000
commit127296bc455beff15cdc3830e66fc6d2311e6057 (patch)
treeb2414746d5d9c91c3d8ab8fec287b5e23e1c518f /include/kernel-version.mk
parent2d1ed46c687f4ec831da97e9209513a8111a0b1a (diff)
downloadupstream-127296bc455beff15cdc3830e66fc6d2311e6057.tar.gz
upstream-127296bc455beff15cdc3830e66fc6d2311e6057.tar.bz2
upstream-127296bc455beff15cdc3830e66fc6d2311e6057.zip
speed up metadata scanning a lot by avoiding unnecessary shell commands and make recursions
SVN-Revision: 14734
Diffstat (limited to 'include/kernel-version.mk')
-rw-r--r--include/kernel-version.mk6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 45139a6a77..003fc085b3 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -38,6 +38,8 @@ endif
# disable the md5sum check for unknown kernel versions
LINUX_KERNEL_MD5SUM?=x
-KERNEL?=2.$(word 2,$(subst ., ,$(strip $(LINUX_VERSION))))
-KERNEL_PATCHVER=$(shell echo '$(LINUX_VERSION)' | cut -d. -f1,2,3 | cut -d- -f1)
+split_version=$(subst ., ,$(1))
+merge_version=$(subst $(space),.,$(1))
+KERNEL=$(call merge_version,$(wordlist 1,2,$(call split_version,$(LINUX_VERSION))))
+KERNEL_PATCHVER=$(call merge_version,$(wordlist 1,3,$(call split_version,$(LINUX_VERSION))))