Merge korg/donut into korg/master

Conflicts:

	core/apicheck_msg_current.txt
	core/combo/linux-arm.mk
	core/prelink-linux-arm.map
	tools/droiddoc/src/ClassInfo.java
This commit is contained in:
Jean-Baptiste Queru
2009-07-25 16:58:22 -07:00
68 changed files with 3580 additions and 1091 deletions

View File

@@ -62,9 +62,6 @@ endif
# Apps are always signed with test keys, and may be re-signed in a post-build
# step. If that happens, the "test-keys" tag will be removed by that step.
BUILD_VERSION_TAGS += test-keys
ifndef INCLUDE_TEST_OTA_KEYS
BUILD_VERSION_TAGS += ota-rel-keys
endif
BUILD_VERSION_TAGS := $(subst $(space),$(comma),$(sort $(BUILD_VERSION_TAGS)))
# A human-readable string that descibes this build in detail.
@@ -129,10 +126,12 @@ $(INSTALLED_BUILD_PROP_TARGET): $(BUILDINFO_SH) $(INTERNAL_BUILD_ID_MAKEFILE)
BUILD_NUMBER="$(BUILD_NUMBER)" \
PLATFORM_VERSION="$(PLATFORM_VERSION)" \
PLATFORM_SDK_VERSION="$(PLATFORM_SDK_VERSION)" \
PLATFORM_VERSION_CODENAME="$(PLATFORM_VERSION_CODENAME)" \
BUILD_VERSION_TAGS="$(BUILD_VERSION_TAGS)" \
TARGET_BOOTLOADER_BOARD_NAME="$(TARGET_BOOTLOADER_BOARD_NAME)" \
BUILD_FINGERPRINT="$(BUILD_FINGERPRINT)" \
TARGET_BOARD_PLATFORM="$(TARGET_BOARD_PLATFORM)" \
TARGET_CPU_ABI="$(TARGET_CPU_ABI)" \
bash $(BUILDINFO_SH) > $@
$(hide) if [ -f $(TARGET_DEVICE_DIR)/system.prop ]; then \
cat $(TARGET_DEVICE_DIR)/system.prop >> $@; \
@@ -227,6 +226,15 @@ ifdef CREATE_MODULE_INFO_FILE
"INSTALLED=\"$(strip $(ALL_MODULES.$(m).INSTALLED))\"" >> $(MODULE_INFO_FILE)))
endif
# -----------------------------------------------------------------
# The test key is used to sign this package, and as the key required
# for future OTA packages installed by this system. Actual product
# deliverables will be re-signed by hand. We expect this file to
# exist with the suffixes ".x509.pem" and ".pk8".
DEFAULT_KEY_CERT_PAIR := $(SRC_TARGET_DIR)/product/security/testkey
# Rules that need to be present for the simulator, even
# if they don't do anything.
.PHONY: systemimage
@@ -250,9 +258,9 @@ BUILT_RAMDISK_TARGET := $(PRODUCT_OUT)/ramdisk.img
# We just build this directly to the install location.
INSTALLED_RAMDISK_TARGET := $(BUILT_RAMDISK_TARGET)
$(INSTALLED_RAMDISK_TARGET): $(MKBOOTFS) $(INTERNAL_RAMDISK_FILES)
$(INSTALLED_RAMDISK_TARGET): $(MKBOOTFS) $(INTERNAL_RAMDISK_FILES) | $(MINIGZIP)
$(call pretty,"Target ram disk: $@")
$(hide) $(MKBOOTFS) $(TARGET_ROOT_OUT) | gzip > $@
$(hide) $(MKBOOTFS) $(TARGET_ROOT_OUT) | $(MINIGZIP) > $@
ifneq ($(strip $(TARGET_NO_KERNEL)),true)
@@ -271,6 +279,11 @@ ifdef BOARD_KERNEL_CMDLINE
INTERNAL_BOOTIMAGE_ARGS += --cmdline "$(BOARD_KERNEL_CMDLINE)"
endif
BOARD_KERNEL_BASE := $(strip $(BOARD_KERNEL_BASE))
ifdef BOARD_KERNEL_BASE
INTERNAL_BOOTIMAGE_ARGS += --base $(BOARD_KERNEL_BASE)
endif
INSTALLED_BOOTIMAGE_TARGET := $(PRODUCT_OUT)/boot.img
ifeq ($(TARGET_BOOTIMAGE_USE_EXT2),true)
@@ -434,12 +447,16 @@ $(eval $(call combine-notice-files, \
# the module processing has already been done -- in fact, we used the
# fact that all that has been done to get the list of modules that we
# need notice files for.
$(target_notice_file_html_gz): $(target_notice_file_html)
gzip -c $< > $@
$(target_notice_file_html_gz): $(target_notice_file_html) | $(MINIGZIP)
$(hide) $(MINIGZIP) -9 < $< > $@
installed_notice_html_gz := $(TARGET_OUT)/etc/NOTICE.html.gz
$(installed_notice_html_gz): $(target_notice_file_html_gz) | $(ACP)
$(copy-file-to-target)
# if we've been run my mm, mmm, etc, don't reinstall this every time
ifeq ($(ONE_SHOT_MAKEFILE),)
ALL_DEFAULT_INSTALLED_MODULES += $(installed_notice_html_gz)
endif
# The kernel isn't really a module, so to get its module file in there, we
# make the target NOTICE files depend on this particular file too, which will
@@ -452,6 +469,23 @@ $(kernel_notice_file): \
$(hide) $(ACP) $< $@
# -----------------------------------------------------------------
# Build a keystore with the authorized keys in it, used to verify the
# authenticity of downloaded OTA packages.
#
# This rule adds to ALL_DEFAULT_INSTALLED_MODULES, so it needs to come
# before the rules that use that variable to build the image.
ALL_DEFAULT_INSTALLED_MODULES += $(TARGET_OUT_ETC)/security/otacerts.zip
$(TARGET_OUT_ETC)/security/otacerts.zip: KEY_CERT_PAIR := $(DEFAULT_KEY_CERT_PAIR)
$(TARGET_OUT_ETC)/security/otacerts.zip: $(addsuffix .x509.pem,$(DEFAULT_KEY_CERT_PAIR))
$(hide) rm -f $@
$(hide) mkdir -p $(dir $@)
$(hide) zip -qj $@ $<
.PHONY: otacerts
otacerts: $(TARGET_OUT_ETC)/security/otacerts.zip
# #################################################################
# Targets for user images
# #################################################################
@@ -463,6 +497,95 @@ else
INTERNAL_MKUSERFS := $(MKYAFFS2)
endif
# -----------------------------------------------------------------
# Recovery image
# If neither TARGET_NO_KERNEL nor TARGET_NO_RECOVERY are true
ifeq (,$(filter true, $(TARGET_NO_KERNEL) $(TARGET_NO_RECOVERY)))
INSTALLED_RECOVERYIMAGE_TARGET := $(PRODUCT_OUT)/recovery.img
recovery_initrc := $(call include-path-for, recovery)/etc/init.rc
recovery_kernel := $(INSTALLED_KERNEL_TARGET) # same as a non-recovery system
recovery_ramdisk := $(PRODUCT_OUT)/ramdisk-recovery.img
recovery_build_prop := $(INSTALLED_BUILD_PROP_TARGET)
recovery_binary := $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery
recovery_resources_common := $(call include-path-for, recovery)/res
recovery_resources_private := $(strip $(wildcard $(TARGET_DEVICE_DIR)/recovery/res))
recovery_resource_deps := $(shell find $(recovery_resources_common) \
$(recovery_resources_private) -type f)
ifeq ($(recovery_resources_private),)
$(info No private recovery resources for TARGET_DEVICE $(TARGET_DEVICE))
endif
INTERNAL_RECOVERYIMAGE_ARGS := \
$(addprefix --second ,$(INSTALLED_2NDBOOTLOADER_TARGET)) \
--kernel $(recovery_kernel) \
--ramdisk $(recovery_ramdisk)
# Assumes this has already been stripped
ifdef BOARD_KERNEL_CMDLINE
INTERNAL_RECOVERYIMAGE_ARGS += --cmdline "$(BOARD_KERNEL_CMDLINE)"
endif
ifdef BOARD_KERNEL_BASE
INTERNAL_RECOVERYIMAGE_ARGS += --base $(BOARD_KERNEL_BASE)
endif
# Keys authorized to sign OTA packages this build will accept. The
# build always uses test-keys for this; release packaging tools will
# substitute other keys for this one.
OTA_PUBLIC_KEYS := $(SRC_TARGET_DIR)/product/security/testkey.x509.pem
# Generate a file containing the keys that will be read by the
# recovery binary.
RECOVERY_INSTALL_OTA_KEYS := \
$(call intermediates-dir-for,PACKAGING,ota_keys)/keys
DUMPKEY_JAR := $(HOST_OUT_JAVA_LIBRARIES)/dumpkey.jar
$(RECOVERY_INSTALL_OTA_KEYS): PRIVATE_OTA_PUBLIC_KEYS := $(OTA_PUBLIC_KEYS)
$(RECOVERY_INSTALL_OTA_KEYS): $(OTA_PUBLIC_KEYS) $(DUMPKEY_JAR)
@echo "DumpPublicKey: $@ <= $(PRIVATE_OTA_PUBLIC_KEYS)"
@rm -rf $@
@mkdir -p $(dir $@)
java -jar $(DUMPKEY_JAR) $(PRIVATE_OTA_PUBLIC_KEYS) > $@
$(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTFS) $(MKBOOTIMG) $(MINIGZIP) \
$(INSTALLED_RAMDISK_TARGET) \
$(INSTALLED_BOOTIMAGE_TARGET) \
$(recovery_binary) \
$(recovery_initrc) $(recovery_kernel) \
$(INSTALLED_2NDBOOTLOADER_TARGET) \
$(recovery_build_prop) $(recovery_resource_deps) \
$(RECOVERY_INSTALL_OTA_KEYS)
@echo ----- Making recovery image ------
rm -rf $(TARGET_RECOVERY_OUT)
mkdir -p $(TARGET_RECOVERY_OUT)
mkdir -p $(TARGET_RECOVERY_ROOT_OUT)
mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/etc
mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/tmp
echo Copying baseline ramdisk...
cp -R $(TARGET_ROOT_OUT) $(TARGET_RECOVERY_OUT)
echo Modifying ramdisk contents...
cp -f $(recovery_initrc) $(TARGET_RECOVERY_ROOT_OUT)/
cp -f $(recovery_binary) $(TARGET_RECOVERY_ROOT_OUT)/sbin/
cp -rf $(recovery_resources_common) $(TARGET_RECOVERY_ROOT_OUT)/
$(foreach item,$(recovery_resources_private), \
cp -rf $(item) $(TARGET_RECOVERY_ROOT_OUT)/)
cp $(RECOVERY_INSTALL_OTA_KEYS) $(TARGET_RECOVERY_ROOT_OUT)/res/keys
cat $(INSTALLED_DEFAULT_PROP_TARGET) $(recovery_build_prop) \
> $(TARGET_RECOVERY_ROOT_OUT)/default.prop
$(MKBOOTFS) $(TARGET_RECOVERY_ROOT_OUT) | $(MINIGZIP) > $(recovery_ramdisk)
$(MKBOOTIMG) $(INTERNAL_RECOVERYIMAGE_ARGS) --output $@
@echo ----- Made recovery image -------- $@
$(hide) $(call assert-max-file-size,$@,$(BOARD_RECOVERYIMAGE_MAX_SIZE))
else
INSTALLED_RECOVERYIMAGE_TARGET :=
endif
.PHONY: recoveryimage
recoveryimage: $(INSTALLED_RECOVERYIMAGE_TARGET)
# -----------------------------------------------------------------
# system yaffs image
#
@@ -518,10 +641,10 @@ else
SYSTEMIMAGE_SOURCE_DIR := $(TARGET_OUT)
endif
$(INSTALLED_SYSTEMIMAGE): $(BUILT_SYSTEMIMAGE) | $(ACP)
$(INSTALLED_SYSTEMIMAGE): $(BUILT_SYSTEMIMAGE) $(INSTALLED_RECOVERYIMAGE_TARGET) | $(ACP)
@echo "Install system fs image: $@"
$(copy-file-to-target)
$(hide) $(call assert-max-file-size,$@,$(BOARD_SYSTEMIMAGE_MAX_SIZE))
$(hide) $(call assert-max-file-size,$@ $(INSTALLED_RECOVERYIMAGE_TARGET),$(BOARD_SYSTEMIMAGE_MAX_SIZE))
systemimage: $(INSTALLED_SYSTEMIMAGE)
@@ -614,72 +737,6 @@ userdatatarball-nodeps: $(FS_GET_STATS)
$(build-userdatatarball-target)
# If neither TARGET_NO_KERNEL nor TARGET_NO_RECOVERY are true
ifeq (,$(filter true, $(TARGET_NO_KERNEL) $(TARGET_NO_RECOVERY)))
# -----------------------------------------------------------------
# Recovery image
INSTALLED_RECOVERYIMAGE_TARGET := $(PRODUCT_OUT)/recovery.img
recovery_initrc := $(call include-path-for, recovery)/etc/init.rc
recovery_kernel := $(INSTALLED_KERNEL_TARGET) # same as a non-recovery system
recovery_ramdisk := $(PRODUCT_OUT)/ramdisk-recovery.img
recovery_build_prop := $(INSTALLED_BUILD_PROP_TARGET)
recovery_binary := $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery
recovery_resources_common := $(call include-path-for, recovery)/res
recovery_resources_private := $(strip $(wildcard $(TARGET_DEVICE_DIR)/recovery/res))
recovery_resource_deps := $(shell find $(recovery_resources_common) \
$(recovery_resources_private) -type f)
ifeq ($(recovery_resources_private),)
$(info No private recovery resources for TARGET_DEVICE $(TARGET_DEVICE))
endif
INTERNAL_RECOVERYIMAGE_ARGS := \
$(addprefix --second ,$(INSTALLED_2NDBOOTLOADER_TARGET)) \
--kernel $(recovery_kernel) \
--ramdisk $(recovery_ramdisk)
# Assumes this has already been stripped
ifdef BOARD_KERNEL_CMDLINE
INTERNAL_RECOVERYIMAGE_ARGS += --cmdline "$(BOARD_KERNEL_CMDLINE)"
endif
$(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTFS) $(MKBOOTIMG) \
$(INSTALLED_RAMDISK_TARGET) \
$(INSTALLED_BOOTIMAGE_TARGET) \
$(recovery_binary) \
$(recovery_initrc) $(recovery_kernel) \
$(INSTALLED_2NDBOOTLOADER_TARGET) \
$(recovery_build_prop) $(recovery_resource_deps)
@echo ----- Making recovery image ------
rm -rf $(TARGET_RECOVERY_OUT)
mkdir -p $(TARGET_RECOVERY_OUT)
mkdir -p $(TARGET_RECOVERY_ROOT_OUT)
mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/etc
mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/tmp
echo Copying baseline ramdisk...
cp -R $(TARGET_ROOT_OUT) $(TARGET_RECOVERY_OUT)
echo Modifying ramdisk contents...
cp -f $(recovery_initrc) $(TARGET_RECOVERY_ROOT_OUT)/
cp -f $(recovery_binary) $(TARGET_RECOVERY_ROOT_OUT)/sbin/
cp -rf $(recovery_resources_common) $(TARGET_RECOVERY_ROOT_OUT)/
$(foreach item,$(recovery_resources_private), \
cp -rf $(item) $(TARGET_RECOVERY_ROOT_OUT)/)
cat $(INSTALLED_DEFAULT_PROP_TARGET) $(recovery_build_prop) \
> $(TARGET_RECOVERY_ROOT_OUT)/default.prop
$(MKBOOTFS) $(TARGET_RECOVERY_ROOT_OUT) | gzip > $(recovery_ramdisk)
$(MKBOOTIMG) $(INTERNAL_RECOVERYIMAGE_ARGS) --output $@
@echo ----- Made recovery image -------- $@
$(hide) $(call assert-max-file-size,$@,$(BOARD_RECOVERYIMAGE_MAX_SIZE))
else
INSTALLED_RECOVERYIMAGE_TARGET :=
endif
.PHONY: recoveryimage
recoveryimage: $(INSTALLED_RECOVERYIMAGE_TARGET)
# -----------------------------------------------------------------
# bring in the installer image generation defines if necessary
ifeq ($(TARGET_USE_DISKINSTALLER),true)
@@ -687,123 +744,20 @@ include bootable/diskinstaller/config.mk
endif
# -----------------------------------------------------------------
# OTA update package
name := $(TARGET_PRODUCT)
ifeq ($(TARGET_BUILD_TYPE),debug)
name := $(name)_debug
endif
name := $(name)-ota-$(FILE_NAME_TAG)
# host tools needed to build OTA packages
INTERNAL_OTA_PACKAGE_TARGET := $(PRODUCT_OUT)/$(name).zip
INTERNAL_OTA_INTERMEDIATES_DIR := $(call intermediates-dir-for,PACKAGING,ota)
# If neither TARGET_NO_KERNEL nor TARGET_NO_RECOVERY are true
ifeq (,$(filter true, $(TARGET_NO_KERNEL) $(TARGET_NO_RECOVERY)))
INTERNAL_OTA_RECOVERYIMAGE_TARGET := $(INTERNAL_OTA_INTERMEDIATES_DIR)/system/recovery.img
else
INTERNAL_OTA_RECOVERYIMAGE_TARGET :=
endif
INTERNAL_OTA_SCRIPT_TARGET := $(INTERNAL_OTA_INTERMEDIATES_DIR)/META-INF/com/google/android/update-script
# Sign OTA packages with the test key by default.
# Actual product deliverables will be re-signed by hand.
private_key := $(SRC_TARGET_DIR)/product/security/testkey.pk8
certificate := $(SRC_TARGET_DIR)/product/security/testkey.x509.pem
$(INTERNAL_OTA_PACKAGE_TARGET): $(private_key) $(certificate) $(SIGNAPK_JAR)
$(INTERNAL_OTA_PACKAGE_TARGET): PRIVATE_PRIVATE_KEY := $(private_key)
$(INTERNAL_OTA_PACKAGE_TARGET): PRIVATE_CERTIFICATE := $(certificate)
# Depending on INSTALLED_SYSTEMIMAGE guarantees that SYSTEMIMAGE_SOURCE_DIR
# is up-to-date. We use jar instead of zip so that we can use the -C
# switch to avoid cd-ing all over the place.
# TODO: Make our own jar-creation tool to avoid all these shenanigans.
$(INTERNAL_OTA_PACKAGE_TARGET): \
$(INTERNAL_OTA_SCRIPT_TARGET) \
$(INTERNAL_OTA_RECOVERYIMAGE_TARGET) \
$(INSTALLED_BOOTIMAGE_TARGET) \
$(INSTALLED_RADIOIMAGE_TARGET) \
$(INSTALLED_ANDROID_INFO_TXT_TARGET) \
$(INSTALLED_SYSTEMIMAGE)
@echo "Package OTA: $@"
$(hide) rm -rf $@
$(hide) jar cf $@ \
$(foreach item, \
$(INSTALLED_BOOTIMAGE_TARGET) \
$(INSTALLED_RADIOIMAGE_TARGET) \
$(INSTALLED_ANDROID_INFO_TXT_TARGET), \
-C $(dir $(item)) $(notdir $(item))) \
-C $(INTERNAL_OTA_INTERMEDIATES_DIR) .
$(hide) find $(SYSTEMIMAGE_SOURCE_DIR) -type f -print | \
sed 's|^$(dir $(SYSTEMIMAGE_SOURCE_DIR))|-C & |' | \
xargs jar uf $@
$(hide) if jar tf $@ | egrep '.{65}' >&2; then \
echo "Path too long (>64 chars) for OTA update" >&2; \
exit 1; \
fi
$(sign-package)
$(INTERNAL_OTA_SCRIPT_TARGET): \
$(HOST_OUT_EXECUTABLES)/make-update-script \
$(INSTALLED_ANDROID_INFO_TXT_TARGET) \
$(INSTALLED_SYSTEMIMAGE)
@mkdir -p $(dir $@)
@rm -rf $@
@echo "Update script: $@"
$(hide) TARGET_DEVICE=$(TARGET_DEVICE) \
$< $(SYSTEMIMAGE_SOURCE_DIR) \
$(INSTALLED_ANDROID_INFO_TXT_TARGET) \
> $@
ifneq (,$(INTERNAL_OTA_RECOVERYIMAGE_TARGET))
# This copy is so recovery.img can be in /system within the OTA package.
# That way it gets installed into the system image, which in turn installs it.
$(INTERNAL_OTA_RECOVERYIMAGE_TARGET): $(INSTALLED_RECOVERYIMAGE_TARGET) | $(ACP)
@mkdir -p $(dir $@)
$(hide) $(ACP) $< $@
endif
.PHONY: otapackage
otapackage: $(INTERNAL_OTA_PACKAGE_TARGET)
# Keys authorized to sign OTA packages this build will accept.
ifeq ($(INCLUDE_TEST_OTA_KEYS),true)
OTA_PUBLIC_KEYS := \
$(sort $(SRC_TARGET_DIR)/product/security/testkey.x509.pem $(OTA_PUBLIC_KEYS))
endif
ifeq ($(OTA_PUBLIC_KEYS),)
$(error No OTA_PUBLIC_KEYS defined)
endif
# Build a keystore with the authorized keys in it.
# java/android/android/server/checkin/UpdateVerifier.java uses this.
ALL_DEFAULT_INSTALLED_MODULES += $(TARGET_OUT_ETC)/security/otacerts.zip
$(TARGET_OUT_ETC)/security/otacerts.zip: $(OTA_PUBLIC_KEYS)
$(hide) rm -f $@
$(hide) mkdir -p $(dir $@)
zip -qj $@ $(OTA_PUBLIC_KEYS)
# The device does not support JKS.
# $(hide) for f in $(OTA_PUBLIC_KEYS); do \
# echo "keytool: $@ <= $$f" && \
# keytool -keystore $@ -storepass $(notdir $@) -noprompt \
# -import -file $$f -alias $(notdir $$f) || exit 1; \
# done
ifdef RECOVERY_INSTALL_OTA_KEYS_INC
# Generate a C-includable file containing the keys.
# RECOVERY_INSTALL_OTA_KEYS_INC is defined by recovery/Android.mk.
# *** THIS IS A TOTAL HACK; EXECUTABLES MUST NOT CHANGE BETWEEN DIFFERENT
# PRODUCTS/BUILD TYPES. ***
# TODO: make recovery read the keys from an external file.
DUMPKEY_JAR := $(HOST_OUT_JAVA_LIBRARIES)/dumpkey.jar
$(RECOVERY_INSTALL_OTA_KEYS_INC): PRIVATE_OTA_PUBLIC_KEYS := $(OTA_PUBLIC_KEYS)
$(RECOVERY_INSTALL_OTA_KEYS_INC): $(OTA_PUBLIC_KEYS) $(DUMPKEY_JAR)
@echo "DumpPublicKey: $@ <= $(PRIVATE_OTA_PUBLIC_KEYS)"
@rm -rf $@
@mkdir -p $(dir $@)
$(hide) java -jar $(DUMPKEY_JAR) $(PRIVATE_OTA_PUBLIC_KEYS) > $@
endif
.PHONY: otatools
otatools: $(HOST_OUT_EXECUTABLES)/minigzip \
$(HOST_OUT_EXECUTABLES)/mkbootfs \
$(HOST_OUT_EXECUTABLES)/mkbootimg \
$(HOST_OUT_EXECUTABLES)/fs_config \
$(HOST_OUT_EXECUTABLES)/mkyaffs2image \
$(HOST_OUT_EXECUTABLES)/zipalign \
$(HOST_OUT_EXECUTABLES)/aapt \
$(HOST_OUT_EXECUTABLES)/bsdiff \
$(HOST_OUT_EXECUTABLES)/imgdiff \
$(HOST_OUT_JAVA_LIBRARIES)/dumpkey.jar \
$(HOST_OUT_JAVA_LIBRARIES)/signapk.jar
# -----------------------------------------------------------------
# A zip of the directories that map to the target filesystem.
@@ -833,21 +787,22 @@ define package_files-copy-root
endef
built_ota_tools := \
$(call intermediates-dir-for,EXECUTABLES,applypatch)/applypatch \
$(call intermediates-dir-for,EXECUTABLES,check_prereq)/check_prereq
$(call intermediates-dir-for,EXECUTABLES,applypatch)/applypatch \
$(call intermediates-dir-for,EXECUTABLES,check_prereq)/check_prereq \
$(call intermediates-dir-for,EXECUTABLES,updater)/updater
$(BUILT_TARGET_FILES_PACKAGE): PRIVATE_OTA_TOOLS := $(built_ota_tools)
$(BUILT_TARGET_FILES_PACKAGE): PRIVATE_RECOVERY_API_VERSION := $(RECOVERY_API_VERSION)
# Depending on the various images guarantees that the underlying
# directories are up-to-date.
$(BUILT_TARGET_FILES_PACKAGE): \
$(INTERNAL_OTA_SCRIPT_TARGET) \
$(INSTALLED_BOOTIMAGE_TARGET) \
$(INSTALLED_RADIOIMAGE_TARGET) \
$(INSTALLED_RECOVERYIMAGE_TARGET) \
$(BUILT_SYSTEMIMAGE) \
$(INSTALLED_SYSTEMIMAGE) \
$(INSTALLED_USERDATAIMAGE_TARGET) \
$(INSTALLED_ANDROID_INFO_TXT_TARGET) \
$(INTERNAL_OTA_SCRIPT_TARGET) \
$(built_ota_tools) \
$(APKCERTS_FILE) \
| $(ACP)
@@ -895,19 +850,53 @@ endif
$(TARGET_OUT_DATA),$(zip_root)/DATA)
@# Extra contents of the OTA package
$(hide) mkdir -p $(zip_root)/OTA/bin
$(hide) $(call package_files-copy-root, \
$(INTERNAL_OTA_INTERMEDIATES_DIR),$(zip_root)/OTA)
$(hide) $(ACP) $(INSTALLED_ANDROID_INFO_TXT_TARGET) $(zip_root)/OTA/
$(hide) $(ACP) $(PRIVATE_OTA_TOOLS) $(zip_root)/OTA/bin/
@# Files that don't end up in any images, but are necessary to
@# Files that do not end up in any images, but are necessary to
@# build them.
$(hide) mkdir -p $(zip_root)/META
$(hide) $(ACP) $(APKCERTS_FILE) $(zip_root)/META/apkcerts.txt
$(hide) echo "$(PRODUCT_OTA_PUBLIC_KEYS)" > $(zip_root)/META/otakeys.txt
$(hide) echo "$(PRIVATE_RECOVERY_API_VERSION)" > $(zip_root)/META/recovery-api-version.txt
$(hide) echo "blocksize $(BOARD_FLASH_BLOCK_SIZE)" > $(zip_root)/META/imagesizes.txt
$(hide) echo "boot $(BOARD_BOOTIMAGE_MAX_SIZE)" >> $(zip_root)/META/imagesizes.txt
$(hide) echo "recovery $(BOARD_RECOVERYIMAGE_MAX_SIZE)" >> $(zip_root)/META/imagesizes.txt
$(hide) echo "system $(BOARD_SYSTEMIMAGE_MAX_SIZE)" >> $(zip_root)/META/imagesizes.txt
$(hide) echo "userdata $(BOARD_USERDATAIMAGE_MAX_SIZE)" >> $(zip_root)/META/imagesizes.txt
@# Zip everything up, preserving symlinks
$(hide) (cd $(zip_root) && zip -qry ../$(notdir $@) .)
target-files-package: $(BUILT_TARGET_FILES_PACKAGE)
# -----------------------------------------------------------------
# OTA update package
ifneq ($(TARGET_SIMULATOR),true)
ifneq ($(TARGET_PRODUCT),sdk)
name := $(TARGET_PRODUCT)
ifeq ($(TARGET_BUILD_TYPE),debug)
name := $(name)_debug
endif
name := $(name)-ota-$(FILE_NAME_TAG)
INTERNAL_OTA_PACKAGE_TARGET := $(PRODUCT_OUT)/$(name).zip
$(INTERNAL_OTA_PACKAGE_TARGET): KEY_CERT_PAIR := $(DEFAULT_KEY_CERT_PAIR)
$(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) otatools
@echo "Package OTA: $@"
$(hide) ./build/tools/releasetools/ota_from_target_files \
-p $(HOST_OUT) \
-k $(KEY_CERT_PAIR) \
$(BUILT_TARGET_FILES_PACKAGE) $@
.PHONY: otapackage
otapackage: $(INTERNAL_OTA_PACKAGE_TARGET)
endif # TARGET_PRODUCT != sdk
endif # TARGET_SIMULATOR != true
# -----------------------------------------------------------------
# installed file list
# Depending on $(INSTALLED_SYSTEMIMAGE) ensures that it
@@ -1009,14 +998,8 @@ dalvikfiles: $(INTERNAL_DALVIK_MODULES)
# -----------------------------------------------------------------
# The update package
INTERNAL_UPDATE_PACKAGE_FILES += \
$(INSTALLED_BOOTIMAGE_TARGET) \
$(INSTALLED_RECOVERYIMAGE_TARGET) \
$(INSTALLED_SYSTEMIMAGE) \
$(INSTALLED_USERDATAIMAGE_TARGET) \
$(INSTALLED_ANDROID_INFO_TXT_TARGET)
ifneq ($(strip $(INTERNAL_UPDATE_PACKAGE_FILES)),)
ifneq ($(TARGET_SIMULATOR),true)
ifneq ($(TARGET_PRODUCT),sdk)
name := $(TARGET_PRODUCT)
ifeq ($(TARGET_BUILD_TYPE),debug)
@@ -1026,13 +1009,17 @@ name := $(name)-img-$(FILE_NAME_TAG)
INTERNAL_UPDATE_PACKAGE_TARGET := $(PRODUCT_OUT)/$(name).zip
$(INTERNAL_UPDATE_PACKAGE_TARGET): $(INTERNAL_UPDATE_PACKAGE_FILES)
$(INTERNAL_UPDATE_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) otatools
@echo "Package: $@"
$(hide) zip -qj $@ $(INTERNAL_UPDATE_PACKAGE_FILES)
$(hide) ./build/tools/releasetools/img_from_target_files \
-p $(HOST_OUT) \
$(BUILT_TARGET_FILES_PACKAGE) $@
else
INTERNAL_UPDATE_PACKAGE_TARGET :=
endif
.PHONY: updatepackage
updatepackage: $(INTERNAL_UPDATE_PACKAGE_TARGET)
endif # TARGET_PRODUCT != sdk
endif # TARGET_SIMULATOR != true
# -----------------------------------------------------------------
# The emulator package
@@ -1116,7 +1103,9 @@ deps := \
$(target_notice_file_txt) \
$(tools_notice_file_txt) \
$(OUT_DOCS)/offline-sdk-timestamp \
$(INTERNAL_UPDATE_PACKAGE_TARGET) \
$(INSTALLED_SYSTEMIMAGE) \
$(INSTALLED_USERDATAIMAGE_TARGET) \
$(INSTALLED_RAMDISK_TARGET) \
$(INSTALLED_SDK_BUILD_PROP_TARGET) \
$(ATREE_FILES) \
$(atree_dir)/sdk.atree \

View File

@@ -267,7 +267,6 @@ full_static_java_libs := \
JAVA_LIBRARIES,$(lib),$(LOCAL_IS_HOST_MODULE))/javalib.jar)
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_INSTALL_DIR := $(dir $(LOCAL_INSTALLED_MODULE))
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_INTERMEDIATES_DIR := $(intermediates)
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CLASS_INTERMEDIATES_DIR := $(intermediates)/classes
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_SOURCE_INTERMEDIATES_DIR := $(intermediates)/src
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_JAVA_SOURCES := $(all_java_sources)
@@ -357,6 +356,8 @@ $(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_ALL_JAVA_LIBRARIES:= $(full_java_libs)
$(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_IS_HOST_MODULE := $(LOCAL_IS_HOST_MODULE)
$(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_HOST:= $(my_host)
$(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_INTERMEDIATES_DIR:= $(intermediates)
# Tell the module and all of its sub-modules who it is.
$(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_MODULE:= $(LOCAL_MODULE)

View File

@@ -47,11 +47,11 @@ LOCAL_ARM_MODE := $(strip $(LOCAL_ARM_MODE))
arm_objects_mode := $(if $(LOCAL_ARM_MODE),$(LOCAL_ARM_MODE),arm)
normal_objects_mode := $(if $(LOCAL_ARM_MODE),$(LOCAL_ARM_MODE),thumb)
# Read the values from something like TARGET_arm_release_CFLAGS or
# TARGET_thumb_debug_CFLAGS. HOST_(arm|thumb)_(release|debug)_CFLAGS
# values aren't actually used (although they are usually empty).
arm_objects_cflags := $($(my_prefix)$(arm_objects_mode)_$($(my_prefix)BUILD_TYPE)_CFLAGS)
normal_objects_cflags := $($(my_prefix)$(normal_objects_mode)_$($(my_prefix)BUILD_TYPE)_CFLAGS)
# Read the values from something like TARGET_arm_CFLAGS or
# TARGET_thumb_CFLAGS. HOST_(arm|thumb)_CFLAGS values aren't
# actually used (although they are usually empty).
arm_objects_cflags := $($(my_prefix)$(arm_objects_mode)_CFLAGS)
normal_objects_cflags := $($(my_prefix)$(normal_objects_mode)_CFLAGS)
###########################################################
## Define per-module debugging flags. Users can turn on
@@ -211,6 +211,19 @@ $(c_objects): $(intermediates)/%.o: $(TOPDIR)$(LOCAL_PATH)/%.c $(yacc_cpps) $(PR
-include $(c_objects:%.o=%.P)
endif
###########################################################
## ObjC: Compile .m files to .o
###########################################################
objc_sources := $(filter %.m,$(LOCAL_SRC_FILES))
objc_objects := $(addprefix $(intermediates)/,$(objc_sources:.m=.o))
ifneq ($(strip $(objc_objects)),)
$(objc_objects): $(intermediates)/%.o: $(TOPDIR)$(LOCAL_PATH)/%.m $(yacc_cpps) $(PRIVATE_ADDITIONAL_DEPENDENCIES)
$(transform-$(PRIVATE_HOST)m-to-o)
-include $(objc_objects:%.o=%.P)
endif
###########################################################
## AS: Compile .S files to .o.
###########################################################

View File

@@ -23,7 +23,7 @@
# (like "TC1-RC5"). It must be a single word, and is
# capitalized by convention.
#
BUILD_ID := CUPCAKE
BUILD_ID := Donut
# DISPLAY_BUILD_NUMBER should only be set for development branches,
# If set, the BUILD_NUMBER (cl) is appended to the BUILD_ID for

View File

@@ -73,40 +73,39 @@ $(combo_target)LD := $($(combo_target)TOOLS_PREFIX)ld$(HOST_EXECUTABLE_SUFFIX)
$(combo_target)NO_UNDEFINED_LDFLAGS := -Wl,--no-undefined
TARGET_arm_release_CFLAGS := -O2 \
-fomit-frame-pointer \
-fstrict-aliasing \
-funswitch-loops \
-finline-limit=300
TARGET_arm_CFLAGS := -O2 \
-fomit-frame-pointer \
-fstrict-aliasing \
-funswitch-loops \
-finline-limit=300
# Modules can choose to compile some source as thumb. As
# non-thumb enabled targets are supported, this is treated
# as a 'hint'. If thumb is not enabled, these files are just
# compiled as ARM.
ifeq ($(ARCH_ARM_HAVE_THUMB_SUPPORT),true)
TARGET_thumb_release_CFLAGS := -mthumb \
-Os \
-fomit-frame-pointer \
-fno-strict-aliasing \
-finline-limit=64
TARGET_thumb_CFLAGS := -mthumb \
-Os \
-fomit-frame-pointer \
-fno-strict-aliasing \
-finline-limit=64
else
TARGET_thumb_release_CFLAGS := $(TARGET_arm_release_CFLAGS)
TARGET_thumb_CFLAGS := $(TARGET_arm_CFLAGS)
endif
# When building for debug, compile everything as arm.
TARGET_arm_debug_CFLAGS := $(TARGET_arm_release_CFLAGS) -fno-omit-frame-pointer -fno-strict-aliasing
TARGET_thumb_debug_CFLAGS := $(TARGET_thumb_release_CFLAGS) -marm -fno-omit-frame-pointer
# NOTE: if you try to build a debug build with thumb, several
# Set FORCE_ARM_DEBUGGING to "true" in your buildspec.mk
# or in your environment to force a full arm build, even for
# files that are normally built as thumb; this can make
# gdb debugging easier. Don't forget to do a clean build.
#
# NOTE: if you try to build a -O0 build with thumb, several
# of the libraries (libpv, libwebcore, libkjs) need to be built
# with -mlong-calls. When built at -O0, those libraries are
# too big for a thumb "BL <label>" to go from one end to the other.
## As hopefully a temporary hack,
## use this to force a full ARM build (for easier debugging in gdb)
## (don't forget to do a clean build)
##TARGET_arm_release_CFLAGS := $(TARGET_arm_release_CFLAGS) -fno-omit-frame-pointer
##TARGET_thumb_release_CFLAGS := $(TARGET_thumb_release_CFLAGS) -marm -fno-omit-frame-pointer
ifeq ($(FORCE_ARM_DEBUGGING),true)
TARGET_arm_CFLAGS += -fno-omit-frame-pointer
TARGET_thumb_CFLAGS += -marm -fno-omit-frame-pointer
endif
android_config_h := $(call select-android-config-h,linux-arm)
arch_include_dir := $(dir $(android_config_h))

View File

@@ -7,7 +7,6 @@
# $(combo_target)OS -- standard name for this host (LINUX, DARWIN, etc.)
# $(combo_target)ARCH -- standard name for process architecture (powerpc, x86, etc.)
# $(combo_target)GLOBAL_CFLAGS -- C compiler flags to use for everything
# $(combo_target)DEBUG_CFLAGS -- additional C compiler flags for debug builds
# $(combo_target)RELEASE_CFLAGS -- additional C compiler flags for release builds
# $(combo_target)GLOBAL_ARFLAGS -- flags to use for static linking everything
# $(combo_target)SHLIB_SUFFIX -- suffix of shared libraries
@@ -39,7 +38,6 @@ $(combo_target)HAVE_KERNEL_MODULES := 0
# These flags might (will) be overridden by the target makefiles
$(combo_target)GLOBAL_CFLAGS := -fno-exceptions -Wno-multichar
$(combo_target)DEBUG_CFLAGS := -O0 -g
$(combo_target)RELEASE_CFLAGS := -O2 -g -fno-strict-aliasing
$(combo_target)GLOBAL_ARFLAGS := crs

View File

@@ -76,11 +76,9 @@ SHOW_COMMANDS:= $(filter showcommands,$(MAKECMDGOALS))
# These can be changed to modify both host and device modules.
COMMON_GLOBAL_CFLAGS:= -DANDROID -fmessage-length=0 -W -Wall -Wno-unused
COMMON_DEBUG_CFLAGS:=
COMMON_RELEASE_CFLAGS:= -DNDEBUG -UDEBUG
COMMON_GLOBAL_CPPFLAGS:=
COMMON_DEBUG_CPPFLAGS:=
COMMON_RELEASE_CPPFLAGS:=
# Set the extensions used for various packages
@@ -158,6 +156,7 @@ AIDL := $(HOST_OUT_EXECUTABLES)/aidl$(HOST_EXECUTABLE_SUFFIX)
ICUDATA := $(HOST_OUT_EXECUTABLES)/icudata$(HOST_EXECUTABLE_SUFFIX)
SIGNAPK_JAR := $(HOST_OUT_JAVA_LIBRARIES)/signapk$(COMMON_JAVA_PACKAGE_SUFFIX)
MKBOOTFS := $(HOST_OUT_EXECUTABLES)/mkbootfs$(HOST_EXECUTABLE_SUFFIX)
MINIGZIP := $(HOST_OUT_EXECUTABLES)/minigzip$(HOST_EXECUTABLE_SUFFIX)
MKBOOTIMG := $(HOST_OUT_EXECUTABLES)/mkbootimg$(HOST_EXECUTABLE_SUFFIX)
MKYAFFS2 := $(HOST_OUT_EXECUTABLES)/mkyaffs2image$(HOST_EXECUTABLE_SUFFIX)
APICHECK := $(HOST_OUT_EXECUTABLES)/apicheck$(HOST_EXECUTABLE_SUFFIX)
@@ -227,19 +226,15 @@ endif
# ###############################################################
HOST_GLOBAL_CFLAGS += $(COMMON_GLOBAL_CFLAGS)
HOST_DEBUG_CFLAGS += $(COMMON_DEBUG_CFLAGS)
HOST_RELEASE_CFLAGS += $(COMMON_RELEASE_CFLAGS)
HOST_GLOBAL_CPPFLAGS += $(COMMON_GLOBAL_CPPFLAGS)
HOST_DEBUG_CPPFLAGS += $(COMMON_DEBUG_CPPFLAGS)
HOST_RELEASE_CPPFLAGS += $(COMMON_RELEASE_CPPFLAGS)
TARGET_GLOBAL_CFLAGS += $(COMMON_GLOBAL_CFLAGS)
TARGET_DEBUG_CFLAGS += $(COMMON_DEBUG_CFLAGS)
TARGET_RELEASE_CFLAGS += $(COMMON_RELEASE_CFLAGS)
TARGET_GLOBAL_CPPFLAGS += $(COMMON_GLOBAL_CPPFLAGS)
TARGET_DEBUG_CPPFLAGS += $(COMMON_DEBUG_CPPFLAGS)
TARGET_RELEASE_CPPFLAGS += $(COMMON_RELEASE_CPPFLAGS)
HOST_GLOBAL_LD_DIRS += -L$(HOST_OUT_INTERMEDIATE_LIBRARIES)
@@ -250,7 +245,7 @@ TARGET_PROJECT_INCLUDES:= $(SRC_HEADERS) $(TARGET_OUT_HEADERS)
# Many host compilers don't support these flags, so we have to make
# sure to only specify them for the target compilers checked in to
# the source tree. The simulator uses the target flags but the
# the source tree. The simulator passes the target flags to the
# host compiler, so only set them for the target when the target
# is not the simulator.
ifneq ($(TARGET_SIMULATOR),true)
@@ -258,21 +253,11 @@ TARGET_GLOBAL_CFLAGS += $(TARGET_ERROR_FLAGS)
TARGET_GLOBAL_CPPFLAGS += $(TARGET_ERROR_FLAGS)
endif
ifeq ($(HOST_BUILD_TYPE),release)
HOST_GLOBAL_CFLAGS+= $(HOST_RELEASE_CFLAGS)
HOST_GLOBAL_CPPFLAGS+= $(HOST_RELEASE_CPPFLAGS)
else
HOST_GLOBAL_CFLAGS+= $(HOST_DEBUG_CFLAGS)
HOST_GLOBAL_CPPFLAGS+= $(HOST_DEBUG_CPPFLAGS)
endif
HOST_GLOBAL_CFLAGS += $(HOST_RELEASE_CFLAGS)
HOST_GLOBAL_CPPFLAGS += $(HOST_RELEASE_CPPFLAGS)
ifeq ($(TARGET_BUILD_TYPE),release)
TARGET_GLOBAL_CFLAGS+= $(TARGET_RELEASE_CFLAGS)
TARGET_GLOBAL_CPPFLAGS+= $(TARGET_RELEASE_CPPFLAGS)
else
TARGET_GLOBAL_CFLAGS+= $(TARGET_DEBUG_CFLAGS)
TARGET_GLOBAL_CPPFLAGS+= $(TARGET_DEBUG_CPPFLAGS)
endif
TARGET_GLOBAL_CFLAGS += $(TARGET_RELEASE_CFLAGS)
TARGET_GLOBAL_CPPFLAGS += $(TARGET_RELEASE_CPPFLAGS)
# TODO: do symbol compression
TARGET_COMPRESS_MODULE_SYMBOLS := false
@@ -290,7 +275,7 @@ PREBUILT_IS_PRESENT := $(if $(wildcard prebuilt/Android.mk),true)
# The 'current' version is whatever this source tree is. Once the apicheck
# tool can generate the stubs from the xml files, we'll use that to be
# able to build back-versions. In the meantime, 'current' is the only
# one supported.
# one supported.
#
# sgrax is the opposite of xargs. It takes the list of args and puts them
# on each line for sort to process.

View File

@@ -793,6 +793,22 @@ $(transform-s-to-o-no-deps)
$(hide) $(transform-d-to-p)
endef
###########################################################
## Commands for running gcc to compile an Objective-C file
## This should never happen for target builds but this
## will error at build time.
###########################################################
define transform-m-to-o-no-deps
@echo "target ObjC: $(PRIVATE_MODULE) <= $<"
$(call transform-c-or-s-to-o-no-deps)
endef
define transform-m-to-o
$(transform-m-to-o-no-deps)
$(hide) $(transform-d-to-p)
endef
###########################################################
## Commands for running gcc to compile a host C++ file
###########################################################
@@ -870,16 +886,46 @@ $(transform-host-s-to-o-no-deps)
$(transform-d-to-p)
endef
###########################################################
## Commands for running gcc to compile a host Objective-C file
###########################################################
define transform-host-m-to-o-no-deps
@echo "host ObjC: $(PRIVATE_MODULE) <= $<"
$(call transform-host-c-or-s-to-o-no-deps)
endef
define tranform-host-m-to-o
$(transform-host-m-to-o-no-deps)
$(transform-d-to-p)
endef
###########################################################
## Commands for running ar
###########################################################
define extract-and-include-whole-static-libs
$(foreach lib,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES), \
@echo "preparing StaticLib: $(PRIVATE_MODULE) [including $(lib)]"; \
ldir=$(PRIVATE_INTERMEDIATES_DIR)/WHOLE/$(basename $(notdir $(lib)))_objs;\
rm -rf $$ldir; \
mkdir -p $$ldir; \
filelist=; \
for f in `$(TARGET_AR) t $(lib)`; do \
$(TARGET_AR) p $(lib) $$f > $$ldir/$$f; \
filelist="$$filelist $$ldir/$$f"; \
done ; \
$(TARGET_AR) $(TARGET_GLOBAL_ARFLAGS) $(PRIVATE_ARFLAGS) $@ $$filelist;\
)
endef
# Explicitly delete the archive first so that ar doesn't
# try to add to an existing archive.
define transform-o-to-static-lib
@mkdir -p $(dir $@)
@echo "target StaticLib: $(PRIVATE_MODULE) ($@)"
@rm -f $@
$(extract-and-include-whole-static-libs)
@echo "target StaticLib: $(PRIVATE_MODULE) ($@)"
$(hide) $(TARGET_AR) $(TARGET_GLOBAL_ARFLAGS) $(PRIVATE_ARFLAGS) $@ $^
endef
@@ -1122,7 +1168,11 @@ $(hide) $(AAPT) package $(PRIVATE_AAPT_FLAGS) -m -z \
$(addprefix -P , $(PRIVATE_RESOURCE_PUBLICS_OUTPUT)) \
$(addprefix -S , $(PRIVATE_RESOURCE_DIR)) \
$(addprefix -A , $(PRIVATE_ASSET_DIR)) \
$(addprefix -I , $(PRIVATE_AAPT_INCLUDES))
$(addprefix -I , $(PRIVATE_AAPT_INCLUDES)) \
$(addprefix --min-sdk-version , $(DEFAULT_APP_TARGET_SDK)) \
$(addprefix --target-sdk-version , $(DEFAULT_APP_TARGET_SDK)) \
$(addprefix --version-code , $(PLATFORM_SDK_VERSION)) \
$(addprefix --version-name , $(PLATFORM_VERSION))
endef
ifeq ($(HOST_OS),windows)
@@ -1174,7 +1224,7 @@ define unzip-jar-files
echo Missing file $$f; \
exit 1; \
fi; \
unzip -q $$f -d $(2); \
unzip -qo $$f -d $(2); \
(cd $(2) && rm -rf META-INF); \
done
endef
@@ -1189,21 +1239,21 @@ $(hide) rm -rf $(PRIVATE_CLASS_INTERMEDIATES_DIR)
$(hide) mkdir -p $(PRIVATE_CLASS_INTERMEDIATES_DIR)
$(call unzip-jar-files,$(PRIVATE_STATIC_JAVA_LIBRARIES), \
$(PRIVATE_CLASS_INTERMEDIATES_DIR))
$(call dump-words-to-file,$(PRIVATE_JAVA_SOURCES),$(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list)
$(call dump-words-to-file,$(PRIVATE_JAVA_SOURCES),$(PRIVATE_INTERMEDIATES_DIR)/java-source-list)
$(hide) if [ -d "$(PRIVATE_SOURCE_INTERMEDIATES_DIR)" ]; then \
find $(PRIVATE_SOURCE_INTERMEDIATES_DIR) -name '*.java' >> $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list; \
find $(PRIVATE_SOURCE_INTERMEDIATES_DIR) -name '*.java' >> $(PRIVATE_INTERMEDIATES_DIR)/java-source-list; \
fi
$(hide) tr ' ' '\n' < $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list \
| sort -u > $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq
$(hide) tr ' ' '\n' < $(PRIVATE_INTERMEDIATES_DIR)/java-source-list \
| sort -u > $(PRIVATE_INTERMEDIATES_DIR)/java-source-list-uniq
$(hide) $(TARGET_JAVAC) -encoding ascii $(PRIVATE_BOOTCLASSPATH) \
$(addprefix -classpath ,$(strip \
$(call normalize-path-list,$(PRIVATE_ALL_JAVA_LIBRARIES)))) \
$(strip $(PRIVATE_JAVAC_DEBUG_FLAGS)) $(xlint_unchecked) \
-extdirs "" -d $(PRIVATE_CLASS_INTERMEDIATES_DIR) \
\@$(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq \
\@$(PRIVATE_INTERMEDIATES_DIR)/java-source-list-uniq \
|| ( rm -rf $(PRIVATE_CLASS_INTERMEDIATES_DIR) ; exit 41 )
$(hide) rm -f $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list
$(hide) rm -f $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq
$(hide) rm -f $(PRIVATE_INTERMEDIATES_DIR)/java-source-list
$(hide) rm -f $(PRIVATE_INTERMEDIATES_DIR)/java-source-list-uniq
$(hide) mkdir -p $(dir $@)
$(hide) jar $(if $(strip $(PRIVATE_JAR_MANIFEST)),-cfm,-cf) \
$@ $(PRIVATE_JAR_MANIFEST) -C $(PRIVATE_CLASS_INTERMEDIATES_DIR) .
@@ -1250,6 +1300,9 @@ endef
# A list of dynamic and static parameters; build layers for
# dynamic params that lay over the static ones.
#TODO: update the manifest to point to the package file
#Note that the version numbers are given to aapt as simple default
#values; applications can override these by explicitly stating
#them in their manifest.
define add-assets-to-package
$(hide) $(AAPT) package -z -u $(PRIVATE_AAPT_FLAGS) \
$(addprefix -c , $(PRODUCT_AAPT_CONFIG)) \
@@ -1257,6 +1310,10 @@ $(hide) $(AAPT) package -z -u $(PRIVATE_AAPT_FLAGS) \
$(addprefix -S , $(PRIVATE_RESOURCE_DIR)) \
$(addprefix -A , $(PRIVATE_ASSET_DIR)) \
$(addprefix -I , $(PRIVATE_AAPT_INCLUDES)) \
$(addprefix --min-sdk-version , $(DEFAULT_APP_TARGET_SDK)) \
$(addprefix --target-sdk-version , $(DEFAULT_APP_TARGET_SDK)) \
$(addprefix --version-code , $(PLATFORM_SDK_VERSION)) \
$(addprefix --version-name , $(PLATFORM_VERSION)) \
-F $@
endef
@@ -1328,14 +1385,16 @@ $(call unzip-jar-files,$(PRIVATE_STATIC_JAVA_LIBRARIES), \
$(PRIVATE_CLASS_INTERMEDIATES_DIR))
$(call dump-words-to-file,$(sort\
$(PRIVATE_JAVA_SOURCES)),\
$(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq)
$(PRIVATE_INTERMEDIATES_DIR)/java-source-list-uniq)
$(hide) $(HOST_JAVAC) -encoding ascii -g \
$(xlint_unchecked) \
$(addprefix -classpath ,$(strip \
$(call normalize-path-list,$(PRIVATE_ALL_JAVA_LIBRARIES)))) \
-extdirs "" -d $(PRIVATE_CLASS_INTERMEDIATES_DIR)\
\@$(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq || \
\@$(PRIVATE_INTERMEDIATES_DIR)/java-source-list-uniq || \
( rm -rf $(PRIVATE_CLASS_INTERMEDIATES_DIR) ; exit 41 )
$(hide) rm -f $(PRIVATE_INTERMEDIATES_DIR)/java-source-list
$(hide) rm -f $(PRIVATE_INTERMEDIATES_DIR)/java-source-list-uniq
$(hide) jar $(if $(strip $(PRIVATE_JAR_MANIFEST)),-cfm,-cf) \
$@ $(PRIVATE_JAR_MANIFEST) $(PRIVATE_EXTRA_JAR_ARGS) \
-C $(PRIVATE_CLASS_INTERMEDIATES_DIR) .
@@ -1481,8 +1540,16 @@ ifndef get-file-size
$(error HOST_OS must define get-file-size)
endif
# $(1): The file to check (often $@)
# $(2): The maximum size, in decimal bytes
# Convert a partition data size (eg, as reported in /proc/mtd) to the
# size of the image used to flash that partition (which includes a
# 64-byte spare area for each 2048-byte page).
# $(1): the partition data size
define image-size-from-data-size
$(shell echo $$(($(1) / 2048 * (2048+64))))
endef
# $(1): The file(s) to check (often $@)
# $(2): The maximum total image size, in decimal bytes
#
# If $(2) is empty, evaluates to "true"
#
@@ -1491,19 +1558,21 @@ endif
# next whole flash block size.
define assert-max-file-size
$(if $(2), \
fileSize=`$(call get-file-size,$(1))`; \
maxSize=$(2); \
onePct=`expr "(" $$maxSize + 99 ")" / 100`; \
onePct=`expr "(" "(" $$onePct + $(BOARD_FLASH_BLOCK_SIZE) - 1 ")" / \
$(BOARD_FLASH_BLOCK_SIZE) ")" "*" $(BOARD_FLASH_BLOCK_SIZE)`; \
reserve=`expr 2 "*" $(BOARD_FLASH_BLOCK_SIZE)`; \
if [ "$$onePct" -gt "$$reserve" ]; then \
reserve="$$onePct"; \
size=$$(for i in $(1); do $(call get-file-size,$$i); done); \
total=$$(( $$( echo "$$size" | tr '\n' + ; echo 0 ) )); \
printname=$$(echo -n "$(1)" | tr " " +); \
echo "$$printname total size is $$total"; \
img_blocksize=$(call image-size-from-data-size,$(BOARD_FLASH_BLOCK_SIZE)); \
twoblocks=$$((img_blocksize * 2)); \
onepct=$$((((($(2) / 100) - 1) / img_blocksize + 1) * img_blocksize)); \
reserve=$$((twoblocks > onepct ? twoblocks : onepct)); \
maxsize=$$(($(2) - reserve)); \
if [ "$$total" -gt "$$maxsize" ]; then \
echo "error: $$printname too large ($$total > [$(2) - $$reserve])"; \
false; \
fi; \
maxSize=`expr $$maxSize - $$reserve`; \
if [ "$$fileSize" -gt "$$maxSize" ]; then \
echo "error: $(1) too large ($$fileSize > [$(2) - $$reserve])"; \
false; \
if [ "$$total" -gt $$((maxsize - 32768)) ]; then \
echo "WARNING: $$printname approaching size limit ($$total now; limit $$maxsize)"; \
fi \
, \
true \

View File

@@ -7,6 +7,9 @@
# OUT_DIR is also set to "out" if it's not already set.
# this allows you to set it to somewhere else if you like
# Set up version information.
include $(BUILD_SYSTEM)/version_defaults.mk
# ---------------------------------------------------------------
# If you update the build system such that the environment setup
# or buildspec.mk need to be updated, increment this number, and
@@ -319,6 +322,8 @@ endif # CALLED_FROM_SETUP
ifneq ($(PRINT_BUILD_CONFIG),)
$(info ============================================)
$(info PLATFORM_VERSION_CODENAME=$(PLATFORM_VERSION_CODENAME))
$(info PLATFORM_VERSION=$(PLATFORM_VERSION))
$(info TARGET_PRODUCT=$(TARGET_PRODUCT))
$(info TARGET_BUILD_VARIANT=$(TARGET_BUILD_VARIANT))
$(info TARGET_SIMULATOR=$(TARGET_SIMULATOR))

View File

@@ -188,9 +188,8 @@ $(findbugs_html) : PRIVATE_XML_FILE := $(findbugs_xml)
$(LOCAL_MODULE)-findbugs : $(findbugs_html)
$(findbugs_html) : $(findbugs_xml)
@mkdir -p $(dir $@)
@echo UnionBugs: $@
$(hide) prebuilt/common/findbugs/bin/unionBugs $(PRIVATE_XML_FILE) \
| prebuilt/common/findbugs/bin/convertXmlToText -html:fancy.xsl \
@echo ConvertXmlToText: $@
$(hide) prebuilt/common/findbugs/bin/convertXmlToText -html:fancy.xsl $(PRIVATE_XML_FILE) \
> $@
$(LOCAL_MODULE)-findbugs : $(findbugs_html)

View File

@@ -85,8 +85,43 @@ $(warning ************************************************************)
$(error Directory names containing spaces not supported)
endif
# Set up version information.
include $(BUILD_SYSTEM)/version_defaults.mk
# The windows build server currently uses 1.6. This will be fixed.
ifneq ($(HOST_OS),windows)
# Check for the correct version of java
java_version := $(shell java -version 2>&1 | head -n 1 | grep '[ "]1\.5[\. "$$]')
ifeq ($(strip $(java_version)),)
$(info ************************************************************)
$(info You are attempting to build with the incorrect version)
$(info of java.)
$(info $(space))
$(info Your version is: $(shell java -version 2>&1 | head -n 1).)
$(info The correct version is: 1.5.)
$(info $(space))
$(info Please follow the machine setup instructions at)
$(info $(space)$(space)$(space)$(space)http://source.android.com/download)
$(info ************************************************************)
$(error stop)
endif
# Check for the correct version of javac
javac_version := $(shell javac -version 2>&1 | head -n 1 | grep '[ "]1\.5[\. "$$]')
ifeq ($(strip $(javac_version)),)
$(info ************************************************************)
$(info You are attempting to build with the incorrect version)
$(info of javac.)
$(info $(space))
$(info Your version is: $(shell javac -version 2>&1 | head -n 1).)
$(info The correct version is: 1.5.)
$(info $(space))
$(info Please follow the machine setup instructions at)
$(info $(space)$(space)$(space)$(space)http://source.android.com/download)
$(info ************************************************************)
$(error stop)
endif
endif # windows
# These are the modifier targets that don't do anything themselves, but
# change the behavior of the build.
@@ -309,7 +344,6 @@ subdirs := \
dalvik/tools/dmtracedump \
dalvik/tools/hprof-conv \
development/emulator/mksdcard \
development/tools/activitycreator \
development/tools/line_endings \
development/host \
external/expat \
@@ -336,6 +370,7 @@ subdirs += \
dalvik/dx \
dalvik/libcore \
development/apps \
development/tools/archquery \
development/tools/androidprefs \
development/tools/apkbuilder \
development/tools/jarutils \
@@ -418,6 +453,10 @@ board_config_mk :=
# Clean up/verify variables defined by the board config file.
TARGET_BOOTLOADER_BOARD_NAME := $(strip $(TARGET_BOOTLOADER_BOARD_NAME))
TARGET_CPU_ABI := $(strip $(TARGET_CPU_ABI))
ifeq ($(TARGET_CPU_ABI),)
$(error No TARGET_CPU_ABI defined by board config: $(board_config_mk))
endif
#
# Include all of the makefiles in the system

View File

@@ -83,6 +83,8 @@ FRAMEWORKS_BASE_SUBDIRS := \
sax \
telephony \
wifi \
vpn \
keystore \
)
#

View File

@@ -21,6 +21,7 @@ libz.so 0xAF900000
libevent.so 0xAF800000
libssl.so 0xAF700000
libcrypto.so 0xAF500000
libsysutils.so 0xAF400000
# bluetooth
liba2dp.so 0xAEE00000
@@ -104,6 +105,10 @@ libOmxH264Dec.so 0xA6F90000
libOmxVidEnc.so 0xA6F60000
libopencorehw.so 0xA6F50000
# pv libraries
libopencore_common.so 0xA6000000
libqcomm_omx.so 0xA5A00000
# libraries for specific apps or temporary libraries
libcam_ipl.so 0x9F000000
libwbxml.so 0x9E800000
@@ -128,3 +133,4 @@ libUAPI_jni.so 0x9A500000
librpc.so 0x9A400000
libtrace_test.so 0x9A300000
libsrec_jni.so 0x9A200000
libcerttool_jni.so 0x9A100000

View File

@@ -110,11 +110,11 @@ ifdef product_goals
TARGET_BUILD_VARIANT := $(word 2,$(product_goals))
# The build server wants to do make PRODUCT-dream-installclean
# which really means TARGET_PRODUCT=dream make installclean.
# which really means TARGET_PRODUCT=dream make installclean.
ifneq ($(filter-out $(INTERNAL_VALID_VARIANTS),$(TARGET_BUILD_VARIANT)),)
MAKECMDGOALS := $(MAKECMDGOALS) $(TARGET_BUILD_VARIANT)
TARGET_BUILD_VARIANT := eng
default_goal_substitution :=
default_goal_substitution :=
else
default_goal_substitution := $(DEFAULT_GOAL)
endif
@@ -135,7 +135,7 @@ ifdef product_goals
#
# Note that modifying this will not affect the goals that make will
# attempt to build, but it's important because we inspect this value
# in certain situations (like for "make sdk").
# in certain situations (like for "make sdk").
#
MAKECMDGOALS := $(patsubst $(goal_name),$(default_goal_substitution),$(MAKECMDGOALS))
@@ -185,7 +185,10 @@ PRODUCT_LOCALES := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_LOCALES))
# in PRODUCT_LOCALES, add them to PRODUCT_LOCALES.
extra_locales := $(filter-out $(PRODUCT_LOCALES),$(CUSTOM_LOCALES))
ifneq (,$(extra_locales))
$(info Adding CUSTOM_LOCALES [$(extra_locales)] to PRODUCT_LOCALES [$(PRODUCT_LOCALES)])
ifneq ($(CALLED_FROM_SETUP),true)
# Don't spam stdout, because envsetup.sh may be scraping values from it.
$(info Adding CUSTOM_LOCALES [$(extra_locales)] to PRODUCT_LOCALES [$(PRODUCT_LOCALES)])
endif
PRODUCT_LOCALES += $(extra_locales)
extra_locales :=
endif
@@ -202,7 +205,7 @@ PRODUCT_BRAND := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_BRAND))
PRODUCT_MODEL := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_MODEL))
ifndef PRODUCT_MODEL
PRODUCT_MODEL := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_NAME))
PRODUCT_MODEL := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_NAME))
endif
PRODUCT_MANUFACTURER := \
@@ -245,32 +248,19 @@ ADDITIONAL_BUILD_PROPERTIES := \
$(ADDITIONAL_BUILD_PROPERTIES) \
$(PRODUCT_PROPERTY_OVERRIDES)
# Get the list of OTA public keys for the product.
OTA_PUBLIC_KEYS := \
$(sort \
$(OTA_PUBLIC_KEYS) \
$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_OTA_PUBLIC_KEYS) \
)
# HACK: Not all products define OTA keys yet, and the -user build
# will fail if no keys are defined.
# TODO: Let a product opt out of needing OTA keys, and stop defaulting to
# the test key as soon as possible.
ifeq (,$(strip $(OTA_PUBLIC_KEYS)))
ifeq (,$(CALLED_FROM_SETUP))
$(warning WARNING: adding test OTA key)
endif
OTA_PUBLIC_KEYS := $(SRC_TARGET_DIR)/product/security/testkey.x509.pem
endif
# The OTA key(s) specified by the product config, if any. The names
# of these keys are stored in the target-files zip so that post-build
# signing tools can substitute them for the test key embedded by
# default.
PRODUCT_OTA_PUBLIC_KEYS := $(sort \
$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_OTA_PUBLIC_KEYS))
# ---------------------------------------------------------------
# Force the simulator to be the simulator, and make BUILD_TYPE
# default to debug.
# Simulator overrides
ifeq ($(TARGET_PRODUCT),sim)
# Tell the build system to turn on some special cases
# to deal with the simulator product.
TARGET_SIMULATOR := true
ifeq (,$(strip $(TARGET_BUILD_TYPE)))
TARGET_BUILD_TYPE := debug
endif
# dexpreopt doesn't work when building the simulator
DISABLE_DEXPREOPT := true
endif

View File

@@ -25,5 +25,6 @@ $(all_objects) : TARGET_GLOBAL_CFLAGS :=
$(all_objects) : TARGET_GLOBAL_CPPFLAGS :=
endif
$(LOCAL_BUILT_MODULE): $(built_whole_libraries)
$(LOCAL_BUILT_MODULE): $(all_objects)
$(transform-o-to-static-lib)

View File

@@ -17,21 +17,22 @@ cts_tools_src_dir := cts/tools
cts_name := android-cts
CTS_EXECUTABLE := cts
CTS_EXECUTABLE := startcts
ifeq ($(HOST_OS),windows)
CTS_EXECUTABLE_PATH := $(cts_tools_src_dir)/host/etc/cts.bat
else
CTS_EXECUTABLE_PATH := $(HOST_OUT_EXECUTABLES)/$(CTS_EXECUTABLE)
CTS_EXECUTABLE_PATH := $(cts_tools_src_dir)/utils/$(CTS_EXECUTABLE)
endif
CTS_HOST_JAR := $(HOST_OUT_JAVA_LIBRARIES)/cts.jar
junit_host_jar := $(HOST_OUT_JAVA_LIBRARIES)/junit.jar
CTS_CORE_CASE_LIST := android.core.tests.annotation \
android.core.tests.archive \
android.core.tests.concurrent \
android.core.tests.crypto \
android.core.tests.dom \
android.core.tests.logging \
android.core.tests.luni \
android.core.tests.luni.io \
android.core.tests.luni.lang \
android.core.tests.luni.net \
@@ -45,7 +46,8 @@ CTS_CORE_CASE_LIST := android.core.tests.annotation \
android.core.tests.sql \
android.core.tests.text \
android.core.tests.xml \
android.core.tests.xnet
android.core.tests.xnet \
android.core.tests.runner
CTS_CASE_LIST := \
DeviceInfoCollector \
@@ -65,11 +67,20 @@ CTS_CASE_LIST := \
CtsWidgetTestCases \
CtsNetTestCases \
SignatureTest \
CtsPerformanceTestCases \
CtsPerformance2TestCases \
CtsPerformance3TestCases \
CtsPerformance4TestCases \
CtsPerformance5TestCases \
ApiDemos \
ApiDemosReferenceTest \
$(CTS_CORE_CASE_LIST)
DEFAULT_TEST_PLAN := $(PRIVATE_DIR)/resource/plans
$(cts_dir)/all_cts_files_stamp: $(CTS_CASE_LIST) | $(ACP)
$(cts_dir)/all_cts_files_stamp: PRIVATE_JUNIT_HOST_JAR := $(junit_host_jar)
$(cts_dir)/all_cts_files_stamp: $(CTS_CASE_LIST) $(junit_host_jar) $(ACP)
# Make necessary directory for CTS
@rm -rf $(PRIVATE_CTS_DIR)
@mkdir -p $(TMP_DIR)
@@ -80,13 +91,14 @@ $(cts_dir)/all_cts_files_stamp: $(CTS_CASE_LIST) | $(ACP)
# Copy executable to CTS directory
$(hide) $(ACP) -fp $(CTS_HOST_JAR) $(PRIVATE_DIR)/tools
$(hide) $(ACP) -fp $(CTS_EXECUTABLE_PATH) $(PRIVATE_DIR)/tools
# Copy junit jar
$(hide) $(ACP) -fp $(PRIVATE_JUNIT_HOST_JAR) $(PRIVATE_DIR)/tools
# Change mode of the executables
$(hide) chmod ug+rwX $(PRIVATE_DIR)/tools/$(notdir $(CTS_EXECUTABLE_PATH))
$(foreach apk,$(CTS_CASE_LIST), \
$(call copy-testcase-apk,$(apk)))
# Copy CTS host config and start script to CTS directory
# Copy CTS host config to CTS directory
$(hide) $(ACP) -fp $(cts_tools_src_dir)/utils/host_config.xml $(PRIVATE_DIR)/repository/
$(hide) $(ACP) -fp $(cts_tools_src_dir)/utils/startcts $(PRIVATE_DIR)/tools/
$(hide) touch $@
# Generate the test descriptions for the core-tests
@@ -112,7 +124,7 @@ $(cts_dir)/all_cts_core_files_stamp: PRIVATE_PARAMS+=-Dcts.useEnhancedJunit=true
# build system requires that dependencies use javalib.jar. If
# javalib.jar is up-to-date, then classes.jar is as well. Depending
# on classes.jar will build the files incorrectly.
$(cts_dir)/all_cts_core_files_stamp: $(CTS_CORE_CASE_LIST) $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar $(CORE_INTERMEDIATES)/javalib.jar $(TESTS_INTERMEDIATES)/javalib.jar | $(ACP)
$(cts_dir)/all_cts_core_files_stamp: $(CTS_CORE_CASE_LIST) $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar $(CORE_INTERMEDIATES)/javalib.jar $(TESTS_INTERMEDIATES)/javalib.jar $(cts_dir)/all_cts_files_stamp | $(ACP)
$(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.annotation,\
cts/tests/core/annotation/AndroidManifest.xml,\
tests.annotation.AllTests)
@@ -131,9 +143,6 @@ $(cts_dir)/all_cts_core_files_stamp: $(CTS_CORE_CASE_LIST) $(HOST_OUT_JAVA_LIBRA
$(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.logging,\
cts/tests/core/logging/AndroidManifest.xml,\
tests.logging.AllTests)
$(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.luni,\
cts/tests/core/luni/AndroidManifest.xml,\
tests.luni.AllTests)
$(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.luni.io,\
cts/tests/core/luni-io/AndroidManifest.xml,\
tests.luni.AllTestsIo)

View File

@@ -1,47 +0,0 @@
# Copyright (C) 2008 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Rules for building the xlb files for export for translation.
#
# Gather all of the resource files for the default locale -- that is,
# all resources in directories called values or values-something, where
# one of the - separated segments is not two characters long -- those are the
# language directories, and we don't want those.
all_resource_files := $(foreach pkg, \
$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES), \
$(PACKAGES.$(pkg).RESOURCE_FILES))
values_resource_files := $(shell echo $(all_resource_files) | \
tr -s / | \
tr " " "\n" | \
grep -E "\/values[^/]*/(strings.xml|arrays.xml)$$" | \
grep -v -E -e "-[a-zA-Z]{2}[/\-]")
xlb_target := $(PRODUCT_OUT)/strings.xlb
$(xlb_target): $(values_resource_files) | $(LOCALIZE)
@echo XLB: $@
$(hide) mkdir -p $(dir $@)
$(hide) rm -f $@
$(hide) $(LOCALIZE) xlb $@ $^
# Add a phony target so typing make xlb is convenient
.PHONY: xlb
xlb: $(xlb_target)
# We want this on the build-server builds, but no reason to inflict it on
# everyone
$(call dist-for-goals, droid, $(xlb_target))

View File

@@ -20,6 +20,8 @@
# Guarantees that the following are defined:
# PLATFORM_VERSION
# PLATFORM_SDK_VERSION
# PLATFORM_VERSION_CODENAME
# DEFAULT_APP_TARGET_SDK
# BUILD_ID
# BUILD_NUMBER
#
@@ -39,17 +41,40 @@ ifeq "" "$(PLATFORM_VERSION)"
# which is the version that we reveal to the end user.
# Update this value when the platform version changes (rather
# than overriding it somewhere else). Can be an arbitrary string.
PLATFORM_VERSION := 1.5
PLATFORM_VERSION := Donut
endif
ifeq "" "$(PLATFORM_SDK_VERSION)"
# This is the canonical definition of the SDK version, which defines
# the set of APIs and functionality available in the platform. This is
# a single integer, that increases monotonically as updates to the SDK
# are released.
# the set of APIs and functionality available in the platform. It
# is a single integer that increases monotonically as updates to
# the SDK are released. It should only be incremented when the APIs for
# the new release are frozen (so that developers don't write apps against
# intermediate builds). During development, this number remains at the
# SDK version the branch is based on and PLATFORM_VERSION_CODENAME holds
# the code-name of the new development work.
PLATFORM_SDK_VERSION := 3
endif
ifeq "" "$(PLATFORM_VERSION_CODENAME)"
# If the build is not a final release build, then this is the current
# development code-name. If this is a final release build, it is simply "REL".
PLATFORM_VERSION_CODENAME := Donut
endif
ifeq "" "$(DEFAULT_APP_TARGET_SDK)"
# This is the default minSdkVersion and targetSdkVersion to use for
# all .apks created by the build system. It can be overridden by explicitly
# setting these in the .apk's AndroidManifest.xml. It is either the code
# name of the development build or, if this is a release build, the official
# SDK version of this release.
ifeq "REL" "$(PLATFORM_VERSION_CODENAME)"
DEFAULT_APP_TARGET_SDK := $(PLATFORM_SDK_VERSION)
else
DEFAULT_APP_TARGET_SDK := $(PLATFORM_VERSION_CODENAME)
endif
endif
ifeq "" "$(BUILD_ID)"
# Used to signify special builds. E.g., branches and/or releases,
# like "M5-RC7". Can be an arbitrary string, but must be a single