Move SDK system-image source.prop_templates in their own folder. DO NOT MERGE.

This allows to have a different rule to generate the source.properties
based on the templates and place them in a directory that depends on
the current target CPU ABI. In turn this prevents the build from
mixing different source.props when building different targets.

Change-Id: I4a1d9f47426c94f376947ddae8be9f5549331616

Conflicts:
	build/sdk-android-arm64-v8a.atree
	build/sdk-android-x86.atree
	build/sdk-android-x86_64.atree
	sys-img/images_arm64-v8a_source.prop_template
	sys-img/images_x86_64_source.prop_template
This commit is contained in:
Raphael Moll
2014-06-03 10:44:56 -07:00
committed by Raphael Moll
parent 71ad7c8f4e
commit 3f3f34dc0e
10 changed files with 25 additions and 9 deletions

View File

@@ -8,14 +8,21 @@ ALL_SDK_FILES += $(patsubst \
$(patsubst \
$(TOPDIR)development/samples/%_source.prop_template, \
$(HOST_OUT)/development/samples/%_source.properties, \
$(wildcard $(TOPDIR)development/samples/*_source.prop_template))
$(wildcard $(TOPDIR)development/samples/*_source.prop_template)) \
$(patsubst \
$(TOPDIR)development/sys-img/%_source.prop_template, \
$(HOST_OUT)/development/sys-img-$(TARGET_CPU_ABI)/%_source.properties, \
$(wildcard $(TOPDIR)development/sys-img/*_source.prop_template))
# Rule to convert a source.prop template into the desired source.property
# This needs to vary based on the CPU ABI for the system-image files.
# Rewritten variables:
# - ${PLATFORM_VERSION} e.g. "1.0"
# - ${PLATFORM_SDK_VERSION} e.g. "3", aka the API level
# - ${PLATFORM_VERSION_CODENAME} e.g. "REL" (transformed into "") or "Cupcake"
$(HOST_OUT)/development/sdk/%_source.properties : $(TOPDIR)development/sdk/%_source.prop_template
# - ${TARGET_ARCH} e.g. "arm", "x86", "mips" and their 64-bit variants.
# - ${TARGET_CPU_ABI} e.g. "armeabi", "x86", "mips" and their 64-bit variants.
$(HOST_OUT)/development/sys-img-$(TARGET_CPU_ABI)/%_source.properties : $(TOPDIR)development/sys-img/%_source.prop_template
@echo Generate $@
$(hide) mkdir -p $(dir $@)
$(hide) sed -e 's/$${PLATFORM_VERSION}/$(PLATFORM_VERSION)/' \
@@ -23,6 +30,15 @@ $(HOST_OUT)/development/sdk/%_source.properties : $(TOPDIR)development/sdk/%_sou
-e 's/$${PLATFORM_VERSION_CODENAME}/$(subst REL,,$(PLATFORM_VERSION_CODENAME))/' \
$< > $@ && sed -i -e '/^AndroidVersion.CodeName=\s*$$/d' $@
$(HOST_OUT)/development/sdk/%_source.properties : $(TOPDIR)development/sdk/%_source.prop_template
@echo Generate $@
$(hide) mkdir -p $(dir $@)
$(hide) sed \
-e 's/$${PLATFORM_VERSION}/$(PLATFORM_VERSION)/' \
-e 's/$${PLATFORM_SDK_VERSION}/$(PLATFORM_SDK_VERSION)/' \
-e 's/$${PLATFORM_VERSION_CODENAME}/$(subst REL,,$(PLATFORM_VERSION_CODENAME))/' \
$< > $@ && sed -i -e '/^AndroidVersion.CodeName=\s*$$/d' $@
$(HOST_OUT)/development/samples/%_source.properties : $(TOPDIR)development/samples/%_source.prop_template
@echo Generate $@
$(hide) mkdir -p $(dir $@)

View File

@@ -18,4 +18,4 @@
prebuilts/qemu-kernel/${TARGET_ARCH}/kernel-qemu-armv7 system-images/${PLATFORM_NAME}/${TARGET_CPU_ABI}/kernel-qemu
# version files for the SDK updater, from development.git
${HOST_OUT}/development/sdk/images_armeabi-v7a_source.properties system-images/${PLATFORM_NAME}/${TARGET_CPU_ABI}/source.properties
${HOST_OUT}/development/sys-img-${TARGET_CPU_ABI}/images_armeabi-v7a_source.properties system-images/${PLATFORM_NAME}/${TARGET_CPU_ABI}/source.properties

View File

@@ -17,4 +17,4 @@
prebuilts/qemu-kernel/${TARGET_ARCH}/kernel-qemu system-images/${PLATFORM_NAME}/${TARGET_CPU_ABI}/kernel-qemu
# version files for the SDK updater, from development.git
${HOST_OUT}/development/sdk/images_armeabi_source.properties system-images/${PLATFORM_NAME}/${TARGET_CPU_ABI}/source.properties
${HOST_OUT}/development/sys-img-${TARGET_CPU_ABI}/images_armeabi_source.properties system-images/${PLATFORM_NAME}/${TARGET_CPU_ABI}/source.properties

View File

@@ -18,4 +18,4 @@
prebuilts/qemu-kernel/${TARGET_ARCH}/kernel-qemu system-images/${PLATFORM_NAME}/${TARGET_CPU_ABI}/kernel-qemu
# version files for the SDK updater, from development.git
development/sdk/images_mips_source.properties system-images/${PLATFORM_NAME}/${TARGET_CPU_ABI}/source.properties
development/sys-img-${TARGET_CPU_ABI}/images_mips_source.properties system-images/${PLATFORM_NAME}/${TARGET_CPU_ABI}/source.properties

View File

@@ -17,4 +17,4 @@
prebuilts/qemu-kernel/${TARGET_ARCH}/kernel-qemu system-images/${PLATFORM_NAME}/${TARGET_CPU_ABI}/kernel-qemu
# version files for the SDK updater, from development.git
${HOST_OUT}/development/sdk/images_x86_source.properties system-images/${PLATFORM_NAME}/${TARGET_CPU_ABI}/source.properties
${HOST_OUT}/development/sys-img-${TARGET_CPU_ABI}/images_${TARGET_ARCH}_source.properties system-images/${PLATFORM_NAME}/${TARGET_CPU_ABI}/source.properties

View File

@@ -208,9 +208,9 @@ endif
# -----------------------------------------------------------------
# Rules for the SDK Repository XML
SDK_REPO_XML := $(HOST_OUT)/sdk/repository.xml
SDK_EXTRAS_XML := $(HOST_OUT)/sdk/repo-extras.xml
SDK_SYSIMG_XML := $(HOST_OUT)/sdk/repo-sys-img.xml
SDK_REPO_XML := $(MAIN_SDK_DIR)/repository.xml
SDK_EXTRAS_XML := $(MAIN_SDK_DIR)/repo-extras.xml
SDK_SYSIMG_XML := $(MAIN_SDK_DIR)/repo-sys-img.xml
ifneq ($(SDK_REPO_XML_ARGS),)