diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-10-31 09:27:04 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-10-31 09:27:04 +0000 |
commit | 86136e2bc348835bc88fb3c7e3e9eddbe4aa3743 (patch) | |
tree | 5bf104aa442ec47fa092ef5b67a478a1cf4f2842 /include/image.mk | |
parent | b100027a8373c959f10b5fad4a71e06077a1bfd3 (diff) | |
download | upstream-86136e2bc348835bc88fb3c7e3e9eddbe4aa3743.tar.gz upstream-86136e2bc348835bc88fb3c7e3e9eddbe4aa3743.tar.bz2 upstream-86136e2bc348835bc88fb3c7e3e9eddbe4aa3743.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>
SVN-Revision: 47307
Diffstat (limited to 'include/image.mk')
-rw-r--r-- | include/image.mk | 10 |
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),\ |