From 3b6f6fe8aad172b8a2dd5bb5bcf9b8b6adc0a72d Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Mon, 14 Jan 2019 21:46:31 -0800 Subject: [PATCH] Stop using the `files` target for droidcore This way if a BoardConfig.mk configures a specific image to exist (so it doesn't end up as a folder on /system), but does not configure for it to be created (like the device targets on AOSP that use a prebuilt), we won't unnecessarily trigger the build system to build the contents. Test: `m` before and after, comparing file lists Test: check treehugger builds before/after Change-Id: If0e4b958b3dfaa02771a5da70f970379635f904e --- core/main.mk | 5 +++-- core/tasks/module-info.mk | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/main.mk b/core/main.mk index 282821cdbf..c84cbe0676 100644 --- a/core/main.mk +++ b/core/main.mk @@ -1305,8 +1305,8 @@ auxiliary: $(INSTALLED_AUX_TARGETS) # Build files and then package it into the rom formats .PHONY: droidcore -droidcore: files \ - systemimage \ +droidcore: $(filter $(HOST_OUT_ROOT)/%,$(modules_to_install)) \ + $(INSTALLED_SYSTEMIMAGE_TARGET) \ $(INSTALLED_RAMDISK_TARGET) \ $(INSTALLED_BOOTIMAGE_TARGET) \ $(INSTALLED_RECOVERYIMAGE_TARGET) \ @@ -1337,6 +1337,7 @@ droidcore: files \ $(INSTALLED_FILES_JSON_ROOT) \ $(INSTALLED_FILES_FILE_RECOVERY) \ $(INSTALLED_FILES_JSON_RECOVERY) \ + $(INSTALLED_ANDROID_INFO_TXT_TARGET) \ soong_docs # dist_files only for putting your library into the dist directory with a full build. diff --git a/core/tasks/module-info.mk b/core/tasks/module-info.mk index 9eb3ab3299..2c56162d54 100644 --- a/core/tasks/module-info.mk +++ b/core/tasks/module-info.mk @@ -25,7 +25,7 @@ $(MODULE_INFO_JSON): # If ONE_SHOT_MAKEFILE is set, our view of the world is smaller, so don't # rewrite the file in that came. ifndef ONE_SHOT_MAKEFILE -files: $(MODULE_INFO_JSON) +droidcore: $(MODULE_INFO_JSON) endif $(call dist-for-goals, general-tests, $(MODULE_INFO_JSON))