From 5f4e29b090bf0bd345738951176c2ff4da36a1f6 Mon Sep 17 00:00:00 2001 From: Logan Chien Date: Wed, 20 Feb 2019 16:47:56 +0800 Subject: [PATCH] Refine lsdump_paths.txt dependencies This commit moves $(LSDUMP_PATHS) from the prerequisite of lsdump_paths.txt to the prerequisite of findlsdumps. This change makes it possible to dump the list of lsdump files without actually building all lsdump files. Bug: 124829578 Test: make out/target/product/generic/lsdump_paths.txt # does not build the actual lsdump files Test: make findlsdumps # builds lsdump_paths.txt and all lsdump files Change-Id: I924f1c0c61391e958521c376a061651f2a301adb --- core/Makefile | 6 ------ core/main.mk | 9 ++++++++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/core/Makefile b/core/Makefile index a211f13a70..88ad48b2f4 100644 --- a/core/Makefile +++ b/core/Makefile @@ -4582,9 +4582,3 @@ include $(BUILD_SYSTEM)/product-graph.mk ifneq ($(sdk_repo_goal),) include $(TOPDIR)development/build/tools/sdk_repo.mk endif - -#------------------------------------------------------------------ -# Find lsdump paths -FIND_LSDUMPS_FILE := $(PRODUCT_OUT)/lsdump_paths.txt -$(FIND_LSDUMPS_FILE) : $(LSDUMP_PATHS) - $(hide) rm -rf $@ && echo "$^" | sed -e 's/ /\n/g' > $@ diff --git a/core/main.mk b/core/main.mk index 610ab28908..cbbafc536c 100644 --- a/core/main.mk +++ b/core/main.mk @@ -1581,8 +1581,15 @@ endif # samplecode in $(MAKECMDGOALS) .PHONY: findbugs findbugs: $(INTERNAL_FINDBUGS_HTML_TARGET) $(INTERNAL_FINDBUGS_XML_TARGET) +LSDUMP_PATHS_FILE := $(PRODUCT_OUT)/lsdump_paths.txt + .PHONY: findlsdumps -findlsdumps: $(FIND_LSDUMPS_FILE) +findlsdumps: $(LSDUMP_PATHS_FILE) $(LSDUMP_PATHS) + +$(LSDUMP_PATHS_FILE): PRIVATE_LSDUMP_PATHS := $(LSDUMP_PATHS) +$(LSDUMP_PATHS_FILE): + @echo "Generate $@" + @rm -rf $@ && echo "$(PRIVATE_LSDUMP_PATHS)" | sed -e 's/ /\n/g' > $@ .PHONY: check-elf-files check-elf-files: