diff options
author | Steve Kondik <shade@chemlab.org> | 2013-10-26 12:58:57 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2013-10-26 20:06:23 +0000 |
commit | 7cf0b6c0398d0419998050f2b48247d8c39f47c2 (patch) | |
tree | 4464af56d724cd0004cf75485332985323bb96f3 | |
parent | a62735900fba03d777cdd45fd1eee138b34be778 (diff) | |
download | replicant_build-7cf0b6c0398d0419998050f2b48247d8c39f47c2.zip replicant_build-7cf0b6c0398d0419998050f2b48247d8c39f47c2.tar.gz replicant_build-7cf0b6c0398d0419998050f2b48247d8c39f47c2.tar.bz2 |
build: Add support for vendor product and device name
* CM's build system assumes some convention-over-configuration which
we might need to override in order to conform to vendor requirements.
* Allow overriding of target and product names using these new
variables. This allows for CM conventions to work, while generating
the correct fingerprint dynamically without post processing the
strings.
Change-Id: Ic5913e587400dd38c04aa05de3a7becced77a59e
-rw-r--r-- | core/Makefile | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/core/Makefile b/core/Makefile index 3ad500e..4fe2bd0 100644 --- a/core/Makefile +++ b/core/Makefile @@ -113,13 +113,23 @@ BUILD_VERSION_TAGS += dev-keys endif BUILD_VERSION_TAGS := $(subst $(space),$(comma),$(sort $(BUILD_VERSION_TAGS))) +# If the final fingerprint should be different than what was used by the build system, +# we can allow that too. +ifeq ($(TARGET_VENDOR_PRODUCT_NAME),) +TARGET_VENDOR_PRODUCT_NAME := $(TARGET_PRODUCT) +endif + +ifeq ($(TARGET_VENDOR_DEVICE_NAME),) +TARGET_VENDOR_DEVICE_NAME := $(TARGET_DEVICE) +endif + # A human-readable string that descibes this build in detail. -build_desc := $(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT) $(PLATFORM_VERSION) $(BUILD_ID) $(BUILD_NUMBER) $(BUILD_VERSION_TAGS) +build_desc := $(TARGET_VENDOR_PRODUCT_NAME)-$(TARGET_BUILD_VARIANT) $(PLATFORM_VERSION) $(BUILD_ID) $(BUILD_NUMBER) $(BUILD_VERSION_TAGS) $(INSTALLED_BUILD_PROP_TARGET): PRIVATE_BUILD_DESC := $(build_desc) # The string used to uniquely identify this build; used by the OTA server. ifeq (,$(strip $(BUILD_FINGERPRINT))) - BUILD_FINGERPRINT := $(PRODUCT_BRAND)/$(TARGET_PRODUCT)/$(TARGET_DEVICE):$(PLATFORM_VERSION)/$(BUILD_ID)/$(BUILD_NUMBER):$(TARGET_BUILD_VARIANT)/$(BUILD_VERSION_TAGS) + BUILD_FINGERPRINT := $(PRODUCT_BRAND)/$(TARGET_VENDOR_PRODUCT_NAME)/$(TARGET_VENDOR_DEVICE_NAME):$(PLATFORM_VERSION)/$(BUILD_ID)/$(BUILD_NUMBER):$(TARGET_BUILD_VARIANT)/$(BUILD_VERSION_TAGS) endif ifneq ($(words $(BUILD_FINGERPRINT)),1) $(error BUILD_FINGERPRINT cannot contain spaces: "$(BUILD_FINGERPRINT)") @@ -178,9 +188,9 @@ $(INSTALLED_BUILD_PROP_TARGET): $(BUILDINFO_SH) $(INTERNAL_BUILD_ID_MAKEFILE) $( @echo Target buildinfo: $@ @mkdir -p $(dir $@) $(hide) TARGET_BUILD_TYPE="$(TARGET_BUILD_VARIANT)" \ - TARGET_DEVICE="$(TARGET_DEVICE)" \ + TARGET_DEVICE="$(TARGET_VENDOR_DEVICE_NAME)" \ CM_DEVICE="$(TARGET_DEVICE)" \ - PRODUCT_NAME="$(TARGET_PRODUCT)" \ + PRODUCT_NAME="$(TARGET_VENDOR_PRODUCT_NAME)" \ PRODUCT_BRAND="$(PRODUCT_BRAND)" \ PRODUCT_DEFAULT_LANGUAGE="$(call default-locale-language,$(PRODUCT_LOCALES))" \ PRODUCT_DEFAULT_REGION="$(call default-locale-region,$(PRODUCT_LOCALES))" \ |