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
This commit is contained in:
Raphael 2011-02-15 16:09:36 -08:00
parent 3a398e265b
commit c4d4731b4d
3 changed files with 25 additions and 13 deletions

View File

@ -1152,8 +1152,8 @@ $(INSTALLED_FILES_FILE): $(INSTALLED_SYSTEMIMAGE)
.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 @@ $(INTERNAL_SDK_TARGET): $(deps)
# 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 @@ $(INTERNAL_FINDBUGS_HTML_TARGET): $(INTERNAL_FINDBUGS_XML_TARGET)
# 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

View File

@ -209,13 +209,8 @@ endif
###
is_sdk_build :=
ifneq ($(filter sdk,$(MAKECMDGOALS)),)
is_sdk_build := true
endif
ifneq ($(filter win_sdk,$(MAKECMDGOALS)),)
is_sdk_build := true
endif
ifneq ($(filter sdk_addon,$(MAKECMDGOALS)),)
ifneq ($(filter sdk win_sdk sdk_addon,$(MAKECMDGOALS)),)
is_sdk_build := true
endif
@ -290,6 +285,11 @@ endif
## sdk ##
ifdef is_sdk_build
# Detect if we want to build a repository for the SDK
sdk_repo_goal := $(strip $(filter sdk_repo,$(MAKECMDGOALS)))
MAKECMDGOALS := $(strip $(filter-out sdk_repo,$(MAKECMDGOALS)))
ifneq ($(words $(filter-out $(INTERNAL_MODIFIER_TARGETS),$(MAKECMDGOALS))),1)
$(error The 'sdk' target may not be specified with any other targets)
endif
@ -828,8 +828,8 @@ docs: $(ALL_DOCS)
.PHONY: sdk
ALL_SDK_TARGETS := $(INTERNAL_SDK_TARGET)
sdk: $(ALL_SDK_TARGETS)
ifneq ($(filter sdk,$(MAKECMDGOALS)),)
$(call dist-for-goals,sdk, \
ifneq ($(filter sdk win_sdk,$(MAKECMDGOALS)),)
$(call dist-for-goals,sdk win_sdk, \
$(ALL_SDK_TARGETS) \
$(SYMBOLS_ZIP) \
)

View File

@ -94,6 +94,10 @@ $(full_target): $(sdk_addon_deps) | $(ACP)
.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.
ADDON_SDK_ZIP := $(full_target)
$(call dist-for-goals, sdk_addon, $(full_target))
else # addon_name