Refine dump-files
Dump $(modules_to_install) instead of $(product_target_FILES) to get a
more complete list of target files.
Use `echo $(modules_to_install) | tr -s ' ' '\n'` instead of
`$(foreach m,$(modules_to_install),$(info $(m)))`.
This way only one `echo` command is emitted instead of emitting `echo`
command for each file. This speeds up the invocation speed tremendously.
Bug: 159195410
Test: m dump-files
Change-Id: I06549cecc64177f1eb5a01e31a55d5eed307fcfd
diff --git a/core/main.mk b/core/main.mk
index c2287bb..3aca8d9 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -1810,9 +1810,9 @@
.PHONY: dump-files
dump-files:
- $(info product_target_FILES for $(TARGET_DEVICE) ($(INTERNAL_PRODUCT)):)
- $(foreach p,$(sort $(product_target_FILES)),$(info : $(p)))
- @echo Successfully dumped product file list
+ @echo "Target files for $(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT) ($(INTERNAL_PRODUCT)):"
+ @echo $(sort $(patsubst $(PRODUCT_OUT)/%,%,$(filter $(PRODUCT_OUT)/%,$(modules_to_install)))) | tr -s ' ' '\n'
+ @echo Successfully dumped product target file list.
.PHONY: nothing
nothing: