Exclude deprecated variables from dump-variables-rbc

This is to not show a warning when running the RBC product
config.

Bug: 226622262
Test: Manually
Change-Id: I69265c9d0dd475ada670e26295bdf27dfa407706
This commit is contained in:
Cole Faust 2022-03-24 12:21:55 -07:00
parent d3a9957616
commit 0a746001b8

View file

@ -325,9 +325,17 @@ endif
# instead of the raw variable values, because mk2rbc can't read the
# raw ones.
define dump-variables-rbc
$(file >$(OUT_DIR)/dump-variables-rbc-temp.txt,$(subst $(space),$(newline),$(.VARIABLES)))\
$(eval _dump_variables_rbc_excluded := \
LOCAL_PATH \
TOPDIR \
TRACE_BEGIN_SOONG \
BOARD_PLAT_PUBLIC_SEPOLICY_DIR \
BOARD_PLAT_PRIVATE_SEPOLICY_DIR \
USER \
SOONG_% \
PRODUCT_COPY_OUT_%)\
$(file >$(1),\
$(foreach v, $(shell grep -he "^[A-Z][A-Z0-9_]*$$" $(OUT_DIR)/dump-variables-rbc-temp.txt | grep -vhE "^(SOONG_.*|LOCAL_PATH|TOPDIR|PRODUCT_COPY_OUT_.*|TRACE_BEGIN_SOONG)$$"),\
$(foreach v, $(shell echo $(filter-out $(_dump_variables_rbc_excluded),$(.VARIABLES)) | tr ' ' '\n' | grep -he "^[A-Z][A-Z0-9_]*$$"),\
$(v) := $(strip $($(v)))$(newline))\
$(foreach ns,$(SOONG_CONFIG_NAMESPACES),\
$(foreach v,$(SOONG_CONFIG_$(ns)),\