[LEDE-DEV] [PATCH 2/3] include: move VERSION_DIST_SANITIZED to version.mk
Alexander Couzens
lynxis at fe80.eu
Thu May 26 06:25:47 PDT 2016
Also move sanitize function to version.mk
Prepare use of VERSION_DIST_SANITIZED by target/imagebuilder
Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
---
include/image.mk | 3 ---
include/version.mk | 3 +++
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/image.mk b/include/image.mk
index 3955962..b2e2918 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -18,9 +18,6 @@ KDIR=$(KERNEL_BUILD_DIR)
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))
diff --git a/include/version.mk b/include/version.mk
index ef80240..88d6245 100644
--- a/include/version.mk
+++ b/include/version.mk
@@ -24,6 +24,8 @@ PKG_CONFIG_DEPENDS += \
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))
@@ -38,6 +40,7 @@ VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),http://downloads.lede-project
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)
--
2.8.3
More information about the Lede-dev
mailing list