image.mk: use new pure make functions for sanitizing image filenames
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 3 Jan 2016 20:58:02 +0000 (20:58 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 3 Jan 2016 20:58:02 +0000 (20:58 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48106 3c298f89-4303-0410-b956-a3cf2f4a3e73

include/image.mk

index cebe42e..5ef8002 100644 (file)
@@ -18,17 +18,7 @@ KDIR=$(KERNEL_BUILD_DIR)
 KDIR_TMP=$(KDIR)/tmp
 DTS_DIR:=$(LINUX_DIR)/arch/$(LINUX_KARCH)/boot/dts
 
-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
+sanitize = $(call tolower,$(subst _,-,$(1)))
 
 DIST_SANITIZED:=$(call sanitize,$(VERSION_DIST))
 EXTRA_NAME_SANITIZED=$(call sanitize,$(EXTRA_IMAGE_NAME))