include: fix detection of installed feeds
[openwrt-14.07/.git] / include / kernel-version.mk
1 # Use the default kernel version if the Makefile doesn't override it
2
3 LINUX_RELEASE?=1
4
5 ifeq ($(LINUX_VERSION),3.10.49)
6   LINUX_KERNEL_MD5SUM:=9774e12764e740d49c80eda77d0ef3eb
7 endif
8
9 # disable the md5sum check for unknown kernel versions
10 LINUX_KERNEL_MD5SUM?=x
11
12 split_version=$(subst ., ,$(1))
13 merge_version=$(subst $(space),.,$(1))
14 KERNEL_BASE=$(firstword $(subst -, ,$(LINUX_VERSION)))
15 KERNEL=$(call merge_version,$(wordlist 1,2,$(call split_version,$(KERNEL_BASE))))
16 ifeq ($(firstword $(call split_version,$(KERNEL_BASE))),2)
17   KERNEL_PATCHVER=$(call merge_version,$(wordlist 1,3,$(call split_version,$(KERNEL_BASE))))
18 else
19   KERNEL_PATCHVER=$(KERNEL)
20 endif
21