diff options
author | Jo-Philipp Wich <jo@mein.io> | 2016-12-05 16:44:13 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2016-12-09 17:16:43 +0100 |
commit | 9791fb2ac25fca2fb64a2d1ccbb5e7721a9165ec (patch) | |
tree | e52d46f77ab04cf252a6a6cc1d1eba733a6355df /include | |
parent | ee5a6c10410b25adc6d400780953388035135fed (diff) | |
download | mtk-20170518-9791fb2ac25fca2fb64a2d1ccbb5e7721a9165ec.zip mtk-20170518-9791fb2ac25fca2fb64a2d1ccbb5e7721a9165ec.tar.gz mtk-20170518-9791fb2ac25fca2fb64a2d1ccbb5e7721a9165ec.tar.bz2 |
build: support adding version code to file names (FS#323)
Now that the VERSION_NUMBER variable holds the human friendly name and not
the commit ID anymore, we need to support adding the revision ID as well.
Introduce a new config variable CONFIG_VERSION_CODE_FILENAMES which, if set,
causes the resulting file names to contain a commit ID designation as printed
by scripts/getver.sh.
Also sanitize the input variables to ensure that the resulting strings are
lowercased and no not contain spaces.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'include')
-rw-r--r-- | include/image.mk | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/image.mk b/include/image.mk index d1dcdd6..93c3bbd 100644 --- a/include/image.mk +++ b/include/image.mk @@ -40,9 +40,11 @@ KDIR=$(KERNEL_BUILD_DIR) KDIR_TMP=$(KDIR)/tmp DTS_DIR:=$(LINUX_DIR)/arch/$(LINUX_KARCH)/boot/dts -EXTRA_NAME_SANITIZED=$(call sanitize,$(EXTRA_IMAGE_NAME)) +IMG_PREFIX_EXTRA:=$(if $(EXTRA_IMAGE_NAME),$(call sanitize,$(EXTRA_IMAGE_NAME))-) +IMG_PREFIX_VERNUM:=$(if $(CONFIG_VERSION_FILENAMES),$(call sanitize,$(VERSION_NUMBER))-) +IMG_PREFIX_VERCODE:=$(if $(CONFIG_VERSION_CODE_FILENAMES),$(call sanitize,$(VERSION_CODE))-) -IMG_PREFIX:=$(VERSION_DIST_SANITIZED)-$(if $(CONFIG_VERSION_FILENAMES),$(VERSION_NUMBER)-)$(if $(EXTRA_NAME_SANITIZED),$(EXTRA_NAME_SANITIZED)-)$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET)) +IMG_PREFIX:=$(VERSION_DIST_SANITIZED)-$(IMG_PREFIX_VERNUM)$(IMG_PREFIX_VERCODE)$(IMG_PREFIX_EXTRA)$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET)) MKFS_DEVTABLE_OPT := -D $(INCLUDE_DIR)/device_table.txt |