Fix for SDK repository.
Change-Id: Ia1245226c451ed4539a0a0cd51022a3325f4b33b
diff --git a/core/tasks/sdk-addon.mk b/core/tasks/sdk-addon.mk
index e21fedc..afcda23 100644
--- a/core/tasks/sdk-addon.mk
+++ b/core/tasks/sdk-addon.mk
@@ -94,11 +94,16 @@
.PHONY: sdk_addon
sdk_addon: $(full_target)
-# Keep the name of the addon final zip around for sdk_repo.
-# This is used by development/build/tools/sdk_repo.mk.
+ifneq ($(sdk_repo_goal),)
+# If we're building the sdk_repo, keep the name of the addon zip
+# around so that development/build/tools/sdk_repo.mk can dist it
+# at the appropriate location.
ADDON_SDK_ZIP := $(full_target)
-
+else
+# When not building an sdk_repo, just dist the addon zip file
+# as-is.
$(call dist-for-goals, sdk_addon, $(full_target))
+endif
else # addon_name
ifneq ($(filter sdk_addon,$(MAKECMDGOALS)),)