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
commit87fcd635fe142f19c46a8ed15ac8bf468b1e2728 (patch)
tree25549d2e0786b41556505af3b5e9bb0520da1d15 /include/kernel-version.mk
parenta7d3754b11a13360c265717f510b0ce4b86abc97 (diff)
downloadupstream-87fcd635fe142f19c46a8ed15ac8bf468b1e2728.tar.gz
upstream-87fcd635fe142f19c46a8ed15ac8bf468b1e2728.tar.bz2
upstream-87fcd635fe142f19c46a8ed15ac8bf468b1e2728.zip
speed up metadata scanning a lot by avoiding unnecessary shell commands and make recursions
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14734 3c298f89-4303-0410-b956-a3cf2f4a3e73
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))))