Dist only if the goal is to be built
Change-Id: I1b794f36a6dc39ce68cc990b967d2d55118c92ca
http://b/issue?id=2635603
diff --git a/core/Makefile b/core/Makefile
index 78d1c32..c2cd3ff 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -986,8 +986,12 @@
.PHONY: installed-file-list
installed-file-list: $(INSTALLED_FILES_FILE)
+ifneq ($(filter sdk,$(MAKECMDGOALS)),)
$(call dist-for-goals, sdk, $(INSTALLED_FILES_FILE))
+endif
+ifneq ($(filter sdk_addon,$(MAKECMDGOALS)),)
$(call dist-for-goals, sdk_addon, $(INSTALLED_FILES_FILE))
+endif
# -----------------------------------------------------------------
# A zip of the tests that are built when running "make tests".