From 5f14162375e4ad457c73a50f483c7d980b2f4eba Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Thu, 30 May 2024 15:41:07 -0700 Subject: [PATCH] Rename _all_release_configs so it's more accessible for list_releases command Bug: 340648588 Test: list_releases Change-Id: Id5397a0e06585897866b7497837e1a106ab0c28e --- core/release_config.mk | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/core/release_config.mk b/core/release_config.mk index 887c78b07d..1a57fcab08 100644 --- a/core/release_config.mk +++ b/core/release_config.mk @@ -139,7 +139,7 @@ ifneq (,$(_use_protobuf)) ifneq (,$(_final_product_config_pass)) # Save the final version of the config. $(shell if ! cmp --quiet $(_flags_varmk) $(_flags_file); then cp $(_flags_varmk) $(_flags_file); fi) - # This will also set _all_release_configs and _used_files for us. + # This will also set ALL_RELEASE_CONFIGS_FOR_PRODUCT and _used_files for us. $(eval include $(_flags_file)) $(KATI_extra_file_deps $(OUT_DIR)/release-config $(protobuf_map_files) $(_flags_file)) else @@ -214,9 +214,9 @@ define _declare-release-config $(error declare-release-config: config $(strip $(1)) must have release config files, override another release config, or both) \ ) $(if $(strip $(4)),$(eval _all_release_configs.$(strip $(1)).ALIAS := true)) - $(eval _all_release_configs := $(sort $(_all_release_configs) $(strip $(1)))) + $(eval ALL_RELEASE_CONFIGS_FOR_PRODUCT := $(sort $(ALL_RELEASE_CONFIGS_FOR_PRODUCT) $(strip $(1)))) $(if $(strip $(3)), \ - $(if $(filter $(_all_release_configs), $(strip $(3))), + $(if $(filter $(ALL_RELEASE_CONFIGS_FOR_PRODUCT), $(strip $(3))), $(if $(filter $(_all_release_configs.$(strip $(1)).OVERRIDES),$(strip $(3))),, $(eval _all_release_configs.$(strip $(1)).OVERRIDES := $(_all_release_configs.$(strip $(1)).OVERRIDES) $(strip $(3)))), \ $(error No release config $(strip $(3))) \ @@ -242,13 +242,13 @@ $(foreach f, $(config_map_files), \ FLAG_DECLARATION_FILES := # Verify that all inherited/overridden release configs are declared. -$(foreach config,$(_all_release_configs),\ +$(foreach config,$(ALL_RELEASE_CONFIGS_FOR_PRODUCT),\ $(foreach r,$(all_release_configs.$(r).OVERRIDES),\ $(if $(strip $(_all_release_configs.$(r).FILES)$(_all_release_configs.$(r).OVERRIDES)),,\ $(error Release config $(config) [declared in: $(_all_release_configs.$(r).DECLARED_IN)] inherits from non-existent $(r).)\ ))) # Verify that alias configs do not have config files. -$(foreach r,$(_all_release_configs),\ +$(foreach r,$(ALL_RELEASE_CONFIGS_FOR_PRODUCT),\ $(if $(_all_release_configs.$(r).ALIAS),$(if $(_all_release_configs.$(r).FILES),\ $(error Alias release config "$(r)" may not specify release config files $(_all_release_configs.$(r).FILES))\ ))) @@ -263,7 +263,7 @@ ifeq ($(TARGET_RELEASE),) # if the variable was completely unset. TARGET_RELEASE ?= was_unset ifeq ($(TARGET_RELEASE),was_unset) - $(error No release config set for target; please set TARGET_RELEASE, or if building on the command line use 'lunch --', where release is one of: $(_all_release_configs)) + $(error No release config set for target; please set TARGET_RELEASE, or if building on the command line use 'lunch --', where release is one of: $(ALL_RELEASE_CONFIGS_FOR_PRODUCT)) endif # Instead of leaving this string empty, we want to default to a valid # setting. Full builds coming through this path is a bug, but in case @@ -274,8 +274,8 @@ endif # During pass 1 of product config, using a non-existent release config is not an error. # We can safely assume that we are doing pass 1 if DUMP_MANY_VARS=="PRODUCT_RELEASE_CONFIG_MAPS". ifneq (,$(_final_product_config_pass)) - ifeq ($(filter $(_all_release_configs), $(TARGET_RELEASE)),) - $(error No release config found for TARGET_RELEASE: $(TARGET_RELEASE). Available releases are: $(_all_release_configs)) + ifeq ($(filter $(ALL_RELEASE_CONFIGS_FOR_PRODUCT), $(TARGET_RELEASE)),) + $(error No release config found for TARGET_RELEASE: $(TARGET_RELEASE). Available releases are: $(ALL_RELEASE_CONFIGS_FOR_PRODUCT)) endif endif @@ -324,14 +324,13 @@ endif .KATI_READONLY := TARGET_RELEASE ifeq (,$(_use_protobuf)) -$(foreach config, $(_all_release_configs), \ +$(foreach config, $(ALL_RELEASE_CONFIGS_FOR_PRODUCT), \ $(eval _all_release_configs.$(config).DECLARED_IN:= ) \ $(eval _all_release_configs.$(config).FILES:= ) \ ) applied_releases:= # use makefiles endif -_all_release_configs:= config_map_files:= protobuf_map_files:= @@ -378,3 +377,4 @@ endif _can_protobuf := _must_protobuf := _use_protobuf := +