am 31d15b9f: Merge 48023786cf: \'Generate SDK Repository XML.\' Do not merge.
* commit '31d15b9f7616ac5605a895ad8fbc3117f0ff4475':
Merge 48023786cf: 'Generate SDK Repository XML.' Do not merge.
This commit is contained in:
@@ -2,13 +2,16 @@
|
|||||||
|
|
||||||
.PHONY: sdk_repo
|
.PHONY: sdk_repo
|
||||||
|
|
||||||
|
SDK_REPO_DEPS :=
|
||||||
|
SDK_REPO_XML_ARGS :=
|
||||||
|
|
||||||
# Define the name of a package zip file to generate
|
# Define the name of a package zip file to generate
|
||||||
# $1=OS (e.g. linux-x86, windows, etc)
|
# $1=OS (e.g. linux-x86, windows, etc)
|
||||||
# $2=sdk zip (e.g. out/host/linux.../android-eng-sdk.zip)
|
# $2=sdk zip (e.g. out/host/linux.../android-eng-sdk.zip)
|
||||||
# $3=package to create (e.g. tools, docs, etc.)
|
# $3=package to create (e.g. tools, docs, etc.)
|
||||||
#
|
#
|
||||||
define sdk-repo-pkg-zip
|
define sdk-repo-pkg-zip
|
||||||
$(dir $(2))/sdk-repo-$(1)-$(3).zip
|
$(dir $(2))/sdk-repo-$(1)-$(3)-$(FILE_NAME_TAG).zip
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# Defines the rule to build an SDK repository package by zipping all
|
# Defines the rule to build an SDK repository package by zipping all
|
||||||
@@ -25,10 +28,11 @@ endef
|
|||||||
define mk-sdk-repo-pkg-1
|
define mk-sdk-repo-pkg-1
|
||||||
$(call sdk-repo-pkg-zip,$(1),$(2),$(3)): $(2)
|
$(call sdk-repo-pkg-zip,$(1),$(2),$(3)): $(2)
|
||||||
@echo "Building SDK repository package $(3) from $(notdir $(2))"
|
@echo "Building SDK repository package $(3) from $(notdir $(2))"
|
||||||
$(hide) cd $(dir $(2)) && \
|
$(hide) cd $(basename $(2)) && \
|
||||||
zip -9rq ../$(notdir $(call sdk-repo-pkg-zip,$(1),$(2),$(3))) \
|
zip -9rq ../$(notdir $(call sdk-repo-pkg-zip,$(1),$(2),$(3))) $(3)/*
|
||||||
$(basename $(2))/*
|
|
||||||
$(call dist-for-goals, sdk_repo, $(call sdk-repo-pkg-zip,$(1),$(2),$(3)))
|
$(call dist-for-goals, sdk_repo, $(call sdk-repo-pkg-zip,$(1),$(2),$(3)))
|
||||||
|
SDK_REPO_XML_ARGS += $(3) $(1) \
|
||||||
|
$(call sdk-repo-pkg-zip,$(1),$(2),$(3)):$(notdir $(call sdk-repo-pkg-zip,$(1),$(2),$(3)))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# Defines the rule to build an SDK repository package when the
|
# Defines the rule to build an SDK repository package when the
|
||||||
@@ -45,15 +49,15 @@ endef
|
|||||||
define mk-sdk-repo-pkg-2
|
define mk-sdk-repo-pkg-2
|
||||||
$(call sdk-repo-pkg-zip,$(1),$(2),$(3)): $(2)
|
$(call sdk-repo-pkg-zip,$(1),$(2),$(3)): $(2)
|
||||||
@echo "Building SDK repository package $(3) from $(notdir $(2))"
|
@echo "Building SDK repository package $(3) from $(notdir $(2))"
|
||||||
$(hide) cd $(dir $(2))/$(3) && \
|
$(hide) cd $(basename $(2))/$(3) && \
|
||||||
zip -9rq ../../$(notdir $(call sdk-repo-pkg-zip,$(1),$(2),$(3))) \
|
zip -9rq ../../$(notdir $(call sdk-repo-pkg-zip,$(1),$(2),$(3))) *
|
||||||
$(basename $(2))/*
|
|
||||||
$(call dist-for-goals, sdk_repo, $(call sdk-repo-pkg-zip,$(1),$(2),$(3)))
|
$(call dist-for-goals, sdk_repo, $(call sdk-repo-pkg-zip,$(1),$(2),$(3)))
|
||||||
|
SDK_REPO_XML_ARGS += $(3) $(1) \
|
||||||
|
$(call sdk-repo-pkg-zip,$(1),$(2),$(3)):$(notdir $(call sdk-repo-pkg-zip,$(1),$(2),$(3)))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
||||||
SDK_REPO_DEPS :=
|
# -----------------------------------------------------------------
|
||||||
|
|
||||||
# Rules for win_sdk
|
# Rules for win_sdk
|
||||||
|
|
||||||
ifneq ($(WIN_SDK_ZIP),)
|
ifneq ($(WIN_SDK_ZIP),)
|
||||||
@@ -68,6 +72,7 @@ SDK_REPO_DEPS += \
|
|||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------
|
||||||
# Rules for main host sdk
|
# Rules for main host sdk
|
||||||
|
|
||||||
ifneq ($(filter sdk win_sdk,$(MAKECMDGOALS)),)
|
ifneq ($(filter sdk win_sdk,$(MAKECMDGOALS)),)
|
||||||
@@ -87,6 +92,7 @@ SDK_REPO_DEPS += \
|
|||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------
|
||||||
# Rules for sdk addon
|
# Rules for sdk addon
|
||||||
|
|
||||||
ifneq ($(ADDON_SDK_ZIP),)
|
ifneq ($(ADDON_SDK_ZIP),)
|
||||||
@@ -95,12 +101,56 @@ ifneq ($(ADDON_SDK_ZIP),)
|
|||||||
# already packaged correctly. All we have to do is dist it with
|
# already packaged correctly. All we have to do is dist it with
|
||||||
# a different destination name.
|
# a different destination name.
|
||||||
|
|
||||||
$(call dist-for-goals, sdk_repo, \
|
RENAMED_ADDON_ZIP := $(ADDON_SDK_ZIP):$(notdir $(call sdk-repo-pkg-zip,$(HOST_OS),$(ADDON_SDK_ZIP),addon))
|
||||||
$(ADDON_SDK_ZIP):$(notdir $(call sdk-repo-pkg-zip,$(HOST_OS),$(ADDON_SDK_ZIP),addon)))
|
|
||||||
|
$(call dist-for-goals, sdk_repo, $(RENAMED_ADDON_ZIP))
|
||||||
|
|
||||||
|
# Also generate the addon.xml using the latest schema and the renamed addon zip
|
||||||
|
|
||||||
|
SDK_ADDON_XML := $(dir $(ADDON_SDK_ZIP))/addon.xml
|
||||||
|
|
||||||
|
SDK_ADDON_XSD := \
|
||||||
|
$(lastword \
|
||||||
|
$(wildcard \
|
||||||
|
$(TOPDIR)sdk/sdkmanager/libs/sdklib/src/com/android/sdklib/repository/sdk-addon-*.xsd \
|
||||||
|
))
|
||||||
|
|
||||||
|
$(SDK_ADDON_XML): $(ADDON_SDK_ZIP)
|
||||||
|
$(hide) $(TOPDIR)development/build/tools/mk_sdk_repo_xml.sh \
|
||||||
|
$(SDK_ADDON_XML) $(SDK_ADDON_XSD) add-on $(HOST_OS) $(RENAMED_ADDON_ZIP)
|
||||||
|
|
||||||
|
$(call dist-for-goals, sdk_repo, $(SDK_ADDON_XML))
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------
|
||||||
|
# Rules for the SDK Repository XML
|
||||||
|
|
||||||
sdk_repo: $(SDK_REPO_DEPS)
|
SDK_REPO_XML := $(HOST_OUT)/sdk/repository.xml
|
||||||
|
|
||||||
|
ifneq ($(SDK_REPO_XML_ARGS),)
|
||||||
|
|
||||||
|
# Pickup the most recent xml schema
|
||||||
|
SDK_REPO_XSD := \
|
||||||
|
$(lastword \
|
||||||
|
$(wildcard \
|
||||||
|
$(TOPDIR)sdk/sdkmanager/libs/sdklib/src/com/android/sdklib/repository/sdk-repository-*.xsd \
|
||||||
|
))
|
||||||
|
|
||||||
|
$(SDK_REPO_XML): $(SDK_REPO_DEPS)
|
||||||
|
$(hide) $(TOPDIR)development/build/tools/mk_sdk_repo_xml.sh \
|
||||||
|
$(SDK_REPO_XML) $(SDK_REPO_XSD) $(SDK_REPO_XML_ARGS)
|
||||||
|
|
||||||
|
$(call dist-for-goals, sdk_repo, $(SDK_REPO_XML))
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
$(SDK_REPO_XML): ;
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------
|
||||||
|
|
||||||
|
sdk_repo: $(SDK_REPO_DEPS) $(SDK_REPO_XML)
|
||||||
@echo "Packing of SDK repository done"
|
@echo "Packing of SDK repository done"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user