diff --git a/Makefile b/Makefile index 5d267e04..a6fedcf0 100644 --- a/Makefile +++ b/Makefile @@ -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)" diff --git a/include/gluon.mk b/include/gluon.mk index 34168d7a..3d4ab384 100644 --- a/include/gluon.mk +++ b/include/gluon.mk @@ -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))))