From 3507de14aa37b8d4e85908cdb39caba4dafa50db Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 25 Jan 2015 03:31:37 +0100 Subject: [PATCH] Add support for image types that are neither factory nor sysupgrade --- Makefile | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 3c9f7d0f..3bbe2398 100644 --- a/Makefile +++ b/Makefile @@ -60,6 +60,12 @@ endef define GluonProfileFactorySuffix endef +define GluonProfileSysupgradeSuffix +endef + +define GluonProfileExtraSuffix +endef + define GluonModel endef @@ -131,6 +137,8 @@ PROFILES += $(1) PROFILE_PACKAGES += $(filter-out -%,$(2) $(GLUON_$(1)_SITE_PACKAGES)) GLUON_$(1)_DEFAULT_PACKAGES := $(2) GLUON_$(1)_FACTORY_SUFFIX := .bin +GLUON_$(1)_SYSUPGRADE_SUFFIX := .bin +GLUON_$(1)_EXTRA_SUFFIX := GLUON_$(1)_MODELS := endef @@ -138,6 +146,14 @@ define GluonProfileFactorySuffix GLUON_$(1)_FACTORY_SUFFIX := $(2) endef +define GluonProfileSysupgradeSuffix +GLUON_$(1)_SYSUPGRADE_SUFFIX := $(2) +endef + +define GluonProfileExtraSuffix +GLUON_$(1)_EXTRA_SUFFIX := $(2) +endef + define GluonModel GLUON_$(1)_MODELS += $(3) GLUON_$(1)_MODEL_$(3) := $(2) @@ -347,13 +363,18 @@ image: FORCE PROFILE="$(PROFILE)" KDIR="$(PROFILE_KDIR)" TARGET_DIR="$(TARGET_DIR)" BIN_DIR="$(BIN_DIR)" TMP_DIR="$(TMP_DIR)" $(foreach model,$(GLUON_$(PROFILE)_MODELS), \ - rm -f $(GLUON_IMAGEDIR)/sysupgrade/gluon-*-$(model)-sysupgrade.bin && \ - cp $(BIN_DIR)/gluon-$(GLUON_$(PROFILE)_MODEL_$(model))-sysupgrade.bin $(GLUON_IMAGEDIR)/sysupgrade/$(IMAGE_PREFIX)-$(model)-sysupgrade.bin && \ - \ + $(if $(GLUON_$(PROFILE)_SYSUPGRADE_SUFFIX), \ + rm -f $(GLUON_IMAGEDIR)/sysupgrade/gluon-*-$(model)-sysupgrade$(GLUON_$(PROFILE)_SYSUPGRADE_SUFFIX) && \ + cp $(BIN_DIR)/gluon-$(GLUON_$(PROFILE)_MODEL_$(model))-sysupgrade$(GLUON_$(PROFILE)_SYSUPGRADE_SUFFIX) $(GLUON_IMAGEDIR)/sysupgrade/$(IMAGE_PREFIX)-$(model)-sysupgrade$(GLUON_$(PROFILE)_SYSUPGRADE_SUFFIX) && \ + ) \ $(if $(GLUON_$(PROFILE)_FACTORY_SUFFIX), \ rm -f $(GLUON_IMAGEDIR)/factory/gluon-*-$(model)$(GLUON_$(PROFILE)_FACTORY_SUFFIX) && \ cp $(BIN_DIR)/gluon-$(GLUON_$(PROFILE)_MODEL_$(model))-factory$(GLUON_$(PROFILE)_FACTORY_SUFFIX) $(GLUON_IMAGEDIR)/factory/$(IMAGE_PREFIX)-$(model)$(GLUON_$(PROFILE)_FACTORY_SUFFIX) && \ ) \ + $(if $(GLUON_$(PROFILE)_EXTRA_SUFFIX), \ + rm -f $(GLUON_IMAGEDIR)/gluon-*-$(model)$(GLUON_$(PROFILE)_EXTRA_SUFFIX) && \ + cp $(BIN_DIR)/gluon-$(GLUON_$(PROFILE)_MODEL_$(model))$(GLUON_$(PROFILE)_EXTRA_SUFFIX) $(GLUON_IMAGEDIR)/$(IMAGE_PREFIX)-$(model)$(GLUON_$(PROFILE)_EXTRA_SUFFIX) && \ + ) \ ) : image/%: $(gluon_prepared_stamp)