Start moving add_lunch_combo to Make

Start deprecating add_lunch_combo, preferring a list of common choices
in each AndroidProducts.mk file.

This list will be validated so that we don't have typos:

https://android-review.git.corp.google.com/c/device/generic/car/+/619533

Or targets that no longer exist.

Bug: 77599627
Test: lunch
Test: lunch 34
Test: lunch aosp_x86_64-eng
Test: lunch aosp_<tab>
Change-Id: Ie0ddaa94cbd6cee26584f56f1706a8ec1333f87e
This commit is contained in:
Dan Willemsen
2018-04-04 15:41:41 -07:00
parent 946b5c5e7f
commit af2e1f8487
4 changed files with 70 additions and 22 deletions

View File

@@ -195,18 +195,13 @@ all_named_products :=
current_product_makefile :=
all_product_makefiles :=
$(foreach f, $(all_product_configs),\
$(eval _cpm_words := $(subst :,$(space),$(f)))\
$(eval _cpm_words := $(call _decode-product-name,$(f)))\
$(eval _cpm_word1 := $(word 1,$(_cpm_words)))\
$(eval _cpm_word2 := $(word 2,$(_cpm_words)))\
$(if $(_cpm_word2),\
$(eval all_product_makefiles += $(_cpm_word2))\
$(eval all_named_products += $(_cpm_word1))\
$(if $(filter $(TARGET_PRODUCT),$(_cpm_word1)),\
$(eval current_product_makefile += $(_cpm_word2)),),\
$(eval all_product_makefiles += $(f))\
$(eval all_named_products += $(basename $(notdir $(f))))\
$(if $(filter $(TARGET_PRODUCT),$(basename $(notdir $(f)))),\
$(eval current_product_makefile += $(f)),)))
$(eval all_product_makefiles += $(_cpm_word2))\
$(eval all_named_products += $(_cpm_word1))\
$(if $(filter $(TARGET_PRODUCT),$(_cpm_word1)),\
$(eval current_product_makefile += $(_cpm_word2)),))
_cpm_words :=
_cpm_word1 :=
_cpm_word2 :=