aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2016-01-03 14:44:48 +0000
committerFelix Fietkau <nbd@openwrt.org>2016-01-03 14:44:48 +0000
commite2ee3db32f0e12356000a07cf7b3eeb9dfed9a7d (patch)
tree277efdfe4135059e79f0f3c3c83384e0608f946c /include
parent8751abca488228b17cd655d488314e08e95a84a9 (diff)
downloadmaster-187ad058-e2ee3db32f0e12356000a07cf7b3eeb9dfed9a7d.tar.gz
master-187ad058-e2ee3db32f0e12356000a07cf7b3eeb9dfed9a7d.tar.bz2
master-187ad058-e2ee3db32f0e12356000a07cf7b3eeb9dfed9a7d.zip
images: use configured distribution name for output image names
We allow to configure the version distribution name; let's also use it for the final image filenames. Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48082 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include')
-rw-r--r--include/image.mk28
1 files changed, 15 insertions, 13 deletions
diff --git a/include/image.mk b/include/image.mk
index 1522dd72c8..4ffad28bd6 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -18,7 +18,21 @@ KDIR=$(KERNEL_BUILD_DIR)
KDIR_TMP=$(KDIR)/tmp
DTS_DIR:=$(LINUX_DIR)/arch/$(LINUX_KARCH)/boot/dts
-IMG_PREFIX:=openwrt-$(if $(CONFIG_VERSION_FILENAMES),$(VERSION_NUMBER)-)$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))
+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
+
+DIST_SANITIZED:=$(call sanitize,$(VERSION_DIST))
+
+IMG_PREFIX:=$(DIST_SANITIZED)-$(if $(CONFIG_VERSION_FILENAMES),$(VERSION_NUMBER)-)$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))
MKFS_DEVTABLE_OPT := -D $(INCLUDE_DIR)/device_table.txt
@@ -85,18 +99,6 @@ define add_jffs2_mark
echo -ne '\xde\xad\xc0\xde' >> $(1)
endef
-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