Use site code and release number for image version strings

This commit is contained in:
Matthias Schiffer 2014-01-20 02:19:59 +01:00
parent 6942303486
commit 7779c57c34
2 changed files with 8 additions and 2 deletions

View File

@ -195,7 +195,7 @@ prepare: FORCE
+$(GLUONMAKE) packages
+$(GLUONMAKE) prepare-image
touch $(gluon_prepared_stamp)
echo "$(GLUON_RELEASE)" > $(gluon_prepared_stamp)
$(gluon_prepared_stamp):
+$(GLUONMAKE) prepare
@ -261,7 +261,7 @@ image: FORCE
+$(GLUONMAKE) package_install
$(call Image/mkfs/prepare)
$(_SINGLE)$(NO_TRACE_MAKE) -C $(TOPDIR)/target/linux/$(BOARD)/image install TARGET_BUILD=1 IB=1 IMG_PREFIX="gluon-$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))" \
$(_SINGLE)$(NO_TRACE_MAKE) -C $(TOPDIR)/target/linux/$(BOARD)/image install TARGET_BUILD=1 IB=1 IMG_PREFIX="gluon-$(GLUON_SITE_CODE)-$$(cat $(gluon_prepared_stamp))-$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))" \
PROFILE="$(PROFILE)" KDIR="$(PROFILE_KDIR)" TARGET_DIR="$(TARGET_DIR)" BIN_DIR="$(BIN_DIR)" TMP_DIR="$(TMP_DIR)"

View File

@ -25,6 +25,12 @@ $(GLUON_SITEDIR)/site.mk:
GLUON_CONFIG_VERSION := $(shell cd $(GLUON_SITEDIR) && git describe --always --dirty=.$$(stat -c %Y $(GLUON_SITEDIR)/site.conf) 2>/dev/null || stat -c %Y site.conf)
export GLUON_CONFIG_VERSION
GLUON_SITE_CODE := $(shell $(GLUONDIR)/scripts/site.sh site_code)
export GLUON_SITE_CODE
GLUON_RELEASE ?= $(shell $(GLUONDIR)/scripts/site.sh release)
export GLUON_RELEASE
define merge-lists
$(1) :=
$(foreach var,$(2),$(1) := $$(sort $$(filter-out -% $$(patsubst -%,%,$$(filter -%,$$($(var)))),$$($(1)) $$($(var))))