Build SDK repository
When the build is invoked with the fake target "sdk_repo" and
a main target of sdk, win_sdk or sdk_addon, we now create
packages in DIST_DIR that can directly be used to populate the
SDK Repository.
This is quite close to how we actually distribute the SDK.
Change-Id: Ie7e0f789bafd73d5ee2461349155a6e562e2edd9
diff --git a/core/Makefile b/core/Makefile
index 35773bf..9ac50c0 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -1152,8 +1152,8 @@
.PHONY: installed-file-list
installed-file-list: $(INSTALLED_FILES_FILE)
-ifneq ($(filter sdk,$(MAKECMDGOALS)),)
-$(call dist-for-goals, sdk, $(INSTALLED_FILES_FILE))
+ifneq ($(filter sdk win_sdk,$(MAKECMDGOALS)),)
+$(call dist-for-goals, sdk win_sdk, $(INSTALLED_FILES_FILE))
endif
ifneq ($(filter sdk_addon,$(MAKECMDGOALS)),)
$(call dist-for-goals, sdk_addon, $(INSTALLED_FILES_FILE))
@@ -1412,9 +1412,10 @@
# Is a Windows SDK requested? If so, we need some definitions from here
# in order to find the Linux SDK used to create the Windows one.
+MAIN_SDK_NAME := $(sdk_name)
+MAIN_SDK_DIR := $(sdk_dir)
+MAIN_SDK_ZIP := $(INTERNAL_SDK_TARGET)
ifneq ($(filter win_sdk,$(MAKECMDGOALS)),)
-LINUX_SDK_NAME := $(sdk_name)
-LINUX_SDK_DIR := $(sdk_dir)
include $(TOPDIR)development/build/tools/windows_sdk.mk
endif
@@ -1440,3 +1441,10 @@
# These are some additional build tasks that need to be run.
include $(sort $(wildcard $(BUILD_SYSTEM)/tasks/*.mk))
-include $(sort $(wildcard vendor/*/build/tasks/*.mk))
+
+# -----------------------------------------------------------------
+# Create SDK repository packages. Must be done after tasks/* since
+# we need the addon rules defined.
+ifneq ($(sdk_repo_goal),)
+include $(TOPDIR)development/build/tools/sdk_repo.mk
+endif