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
This commit is contained in:
Yo Chiang 2020-07-13 21:02:21 +08:00
parent 4a2e443ec2
commit 561efbc1fb

View file

@ -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: