I'm trying to build an AOSP rom. How can I display all variables in PRODUCT_PACKAGES in my target .mk file? Here is my code so far:
define dump-product-package
$(warning ==== $(1) ====)
$(warning $($(1).$(PRODUCT_PACKAGES))))
endef
$(warning **** dump product packages ****)
$(foreach p,$(PRODUCT_PACKAGES),$(call dump-product-package,$(p)))
The result is:
device/google/taimen/aosp_taimen.mk:58: warning: **** dump product packages ****
device/google/taimen/aosp_taimen.mk:59: warning: ==== @inherit:build/target/product/core_64_bit.mk ====
device/google/taimen/aosp_taimen.mk:59: warning:
device/google/taimen/aosp_taimen.mk:59: warning: ==== @inherit:build/target/product/aosp_base_telephony.mk ====
device/google/taimen/aosp_taimen.mk:59: warning:
device/google/taimen/aosp_taimen.mk:59: warning: ==== @inherit:device/google/taimen/device.mk ====
device/google/taimen/aosp_taimen.mk:59: warning:
device/google/taimen/aosp_taimen.mk:59: warning: ==== @inherit:vendor/google_devices/taimen/proprietary/device-vendor.mk ====
device/google/taimen/aosp_taimen.mk:59: warning:
device/google/taimen/aosp_taimen.mk:59: warning: ==== Dialer ====
device/google/taimen/aosp_taimen.mk:59: warning:
device/google/taimen/aosp_taimen.mk:59: warning: ==== Launcher3QuickStep ====
device/google/taimen/aosp_taimen.mk:59: warning:
device/google/taimen/aosp_taimen.mk:59: warning: ==== WallpaperPicker ====
device/google/taimen/aosp_taimen.mk:59: warning:
device/google/taimen/aosp_taimen.mk:59: warning: ==== netutils-wrapper-1.0 ====
device/google/taimen/aosp_taimen.mk:59: warning:
device/google/taimen/aosp_taimen.mk:59: warning: ==== vndk_package ====
device/google/taimen/aosp_taimen.mk:59: warning:
device/google/taimen/aosp_taimen.mk:59: error: missing separator.
19:17:19 dumpvars failed with: exit status 1
how do I display the PRODUCT_PACKAGES values from the inherited file? I know I need a recursive loop in the dump-product-package, I don't know what data type is for parameter $(1) or how to access it. Thanks.
question from:
https://stackoverflow.com/questions/65854852/aosp-build-display-all-product-packages-variable-in-mk-file 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…