diff options
author | Will Drewry <drewry@google.com> | 2015-11-04 18:51:35 -0800 |
---|---|---|
committer | Will Drewry <drewry@google.com> | 2015-11-04 18:51:35 -0800 |
commit | 00302c248da7a0200d52efbc9754f0b1c67f466a (patch) | |
tree | c12a765d0bcd3350b37571044770d8e6f37d50fa /brillo_config | |
parent | 8f383b86f28b62a78f27833404840132bd3707f2 (diff) | |
download | extras-00302c248da7a0200d52efbc9754f0b1c67f466a.tar.gz |
Populate BRILLO_PRODUCT_ID from the product config
Using cfgtree.mk, add support to load the brillo
product id directly from a file in the product tree
when configured.
BUG=25343470
Change-Id: Icf9777915612bf3b3630112cfe31b95bae23612f
Diffstat (limited to 'brillo_config')
-rw-r--r-- | brillo_config/Android.mk | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/brillo_config/Android.mk b/brillo_config/Android.mk index 09f6f7de..87ea7cb8 100644 --- a/brillo_config/Android.mk +++ b/brillo_config/Android.mk @@ -24,9 +24,12 @@ LOCAL_MODULE_CLASS := ETC LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/$(OSRELEASED_DIRECTORY) include $(BUILD_SYSTEM)/base_rules.mk +# Attempt to populate the product id from a file in the product path. +LOADED_BRILLO_PRODUCT_ID := $(call cfgtree-get-if-exists,brillo/product_id) + # We don't really have a default value for the product id as the backend # interaction will not work if this is not set correctly. -$(LOCAL_BUILT_MODULE): BRILLO_PRODUCT_ID ?= "" +$(LOCAL_BUILT_MODULE): BRILLO_PRODUCT_ID ?= "$(LOADED_BRILLO_PRODUCT_ID)" $(LOCAL_BUILT_MODULE): $(hide)mkdir -p $(dir $@) echo $(BRILLO_PRODUCT_ID) > $@ |