From 561efbc1fbc68973743859fe329e67f1b94a4cc0 Mon Sep 17 00:00:00 2001 From: Yo Chiang Date: Mon, 13 Jul 2020 21:02:21 +0800 Subject: [PATCH] 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 --- core/main.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/main.mk b/core/main.mk index c2287bbcc..3aca8d94f 100644 --- a/core/main.mk +++ b/core/main.mk @@ -1810,9 +1810,9 @@ modules: .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: