aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-10-31 09:27:04 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-10-31 09:27:04 +0000
commit02a73de3e72c7a6be2a6b8a42342352d863f829a (patch)
tree41dc11635bcdbf81fea17b37d8d0103a3368fb0e /include
parent41232170f889f33f26807a951dcf58c667c962eb (diff)
downloadmaster-187ad058-02a73de3e72c7a6be2a6b8a42342352d863f829a.tar.gz
master-187ad058-02a73de3e72c7a6be2a6b8a42342352d863f829a.tar.bz2
master-187ad058-02a73de3e72c7a6be2a6b8a42342352d863f829a.zip
include/image.mk: Introduce sanitized profile variable
Making common code reusable as there's a lot of duplicate code in imx6, kirkwood and oxnas archs. Signed-off-by: Petr Štetiar <ynezz@true.cz> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47307 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include')
-rw-r--r--include/image.mk10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/image.mk b/include/image.mk
index 4e22fa59a0..3f6556874a 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -89,6 +89,16 @@ define toupper
$(shell echo $(1) | tr '[:lower:]' '[:upper:]')
endef
+define tolower
+$(shell echo $(1) | tr '[:upper:]' '[:lower:]')
+endef
+
+define sanitize
+$(shell echo $(call tolower,$(1)) | sed 's/_/-/g')
+endef
+
+PROFILE_SANITIZED := $(call sanitize,$(PROFILE))
+
define split_args
$(foreach data, \
$(subst |,$(space),\