KDIR_TMP=$(KDIR)/tmp
DTS_DIR:=$(LINUX_DIR)/arch/$(LINUX_KARCH)/boot/dts
-sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1))))
-
-VERSION_DIST_SANITIZED:=$(call sanitize,$(VERSION_DIST))
EXTRA_NAME_SANITIZED=$(call sanitize,$(EXTRA_IMAGE_NAME))
IMG_PREFIX:=$(VERSION_DIST_SANITIZED)-$(if $(CONFIG_VERSION_FILENAMES),$(VERSION_NUMBER)-)$(if $(EXTRA_NAME_SANITIZED),$(EXTRA_NAME_SANITIZED)-)$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))
qstrip_escape=$(subst ','\'',$(call qstrip,$(1)))
#'
+sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1))))
+
VERSION_NUMBER:=$(call qstrip_escape,$(CONFIG_VERSION_NUMBER))
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),$(REVISION))
VERSION_DIST:=$(call qstrip_escape,$(CONFIG_VERSION_DIST))
VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),LEDE)
+VERSION_DIST_SANITIZED:=$(call sanitize,$(VERSION_DIST))
VERSION_MANUFACTURER:=$(call qstrip_escape,$(CONFIG_VERSION_MANUFACTURER))
VERSION_MANUFACTURER:=$(if $(VERSION_MANUFACTURER),$(VERSION_MANUFACTURER),LEDE)