Break dependency from droid_targets to blueprint_tools
But only for a TARGET_BUILD_UNBUNDLED_IMAGE build. Since
the unbundled image build attempts to remove as many
framework sources as possible, we'd like to remove the
sources and dependencies of some blueprint_tools as
well.
Test: m nothing dist
Test: Verify graph is unchanged
Test: m nothing dist TARGET_BUILD_UNBUNDLED_IMAGE=true
Test: Verify that graph no longer includes blueprint_tools
Bug: 192629969
Change-Id: Ibfb52b841379e20855d0a935a13ad047af2fe58d
diff --git a/core/main.mk b/core/main.mk
index 0393bee..70c7dd2 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -547,7 +547,12 @@
$(foreach mk,$(subdir_makefiles),$(info [$(call inc_and_print,subdir_makefiles_inc)/$(subdir_makefiles_total)] including $(mk) ...)$(eval include $(mk)))
+# For an unbundled image, we can skip blueprint_tools because unbundled image
+# aims to remove a large number framework projects from the manifest, the
+# sources or dependencies for these tools may be missing from the tree.
+ifeq (,$(TARGET_BUILD_UNBUNDLED_IMAGE))
droid_targets : blueprint_tools
+endif
endif # dont_bother