summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/Makefile3
-rw-r--r--core/base_rules.mk10
-rw-r--r--core/clear_vars.mk3
-rw-r--r--core/combo/HOST_darwin-x86.mk6
-rw-r--r--core/combo/TARGET_linux-x86.mk75
-rw-r--r--core/combo/arch/x86/x86-atom.mk18
-rw-r--r--core/combo/arch/x86/x86.mk35
-rw-r--r--core/definitions.mk22
-rw-r--r--core/dumpvar.mk11
-rw-r--r--core/envsetup.mk6
-rw-r--r--core/host_java_library.mk2
-rw-r--r--core/java.mk11
-rw-r--r--core/java_library.mk2
-rw-r--r--core/main.mk13
-rw-r--r--core/product.mk2
-rw-r--r--core/static_java_library.mk78
-rw-r--r--core/tasks/collect_gpl_sources.mk30
-rw-r--r--core/tasks/cts.mk42
-rw-r--r--core/tasks/factory_ramdisk.mk73
-rw-r--r--core/tasks/module_owner_check.mk60
-rw-r--r--target/board/generic/BoardConfig.mk5
-rw-r--r--target/board/generic/device.mk3
-rw-r--r--target/board/generic_armv5/BoardConfig.mk1
-rw-r--r--target/board/generic_x86/device.mk3
-rw-r--r--target/board/vbox_x86/device.mk3
-rw-r--r--target/product/core.mk1
-rw-r--r--tools/droiddoc/templates-sdk/assets/android-developer-docs.css4
-rw-r--r--tools/droiddoc/templates-sdk/assets/android-developer-docs.js2
-rwxr-xr-xtools/java-event-log-tags.py5
29 files changed, 470 insertions, 59 deletions
diff --git a/core/Makefile b/core/Makefile
index bff9ec0..452b2c9 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -26,7 +26,8 @@ $(foreach cf,$(PRODUCT_COPY_FILES), \
$(eval _src := $(call word-colon,1,$(cf))) \
$(eval _dest := $(call word-colon,2,$(cf))) \
$(call check-product-copy-files,$(cf)) \
- $(if $(filter $(unique_product_copy_files_destinations),$(_dest)),, \
+ $(if $(filter $(unique_product_copy_files_destinations),$(_dest)), \
+ $(info PRODUCT_COPY_FILES $(cf) ignored.), \
$(eval _fulldest := $(call append-path,$(PRODUCT_OUT),$(_dest))) \
$(eval $(call copy-one-file,$(_src),$(_fulldest))) \
$(eval ALL_DEFAULT_INSTALLED_MODULES += $(_fulldest)) \
diff --git a/core/base_rules.mk b/core/base_rules.mk
index 242b53d..38c2c10 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -110,8 +110,10 @@ endif
# find files like MODULE_LICENSE_GPL_AND_AFL but exclude files like
# MODULE_LICENSE_LGPL.
#
-ifneq ($(call find-parent-file,$(LOCAL_PATH),MODULE_LICENSE*_GPL* MODULE_LICENSE*_MPL*),)
+gpl_license_file := $(call find-parent-file,$(LOCAL_PATH),MODULE_LICENSE*_GPL* MODULE_LICENSE*_MPL*)
+ifneq ($(gpl_license_file),)
LOCAL_MODULE_TAGS += gnu
+ ALL_GPL_MODULE_LICENSE_FILES := $(sort $(ALL_GPL_MODULE_LICENSE_FILES) $(gpl_license_file))
endif
#
@@ -381,7 +383,7 @@ endif # java_resource_file_groups
## PRIVATE java vars ######################################
-ifneq ($(strip $(all_java_sources)$(all_res_assets)),)
+ifneq ($(strip $(all_java_sources)$(all_res_assets))$(LOCAL_STATIC_JAVA_LIBRARIES),)
full_static_java_libs := \
$(foreach lib,$(LOCAL_STATIC_JAVA_LIBRARIES), \
@@ -587,6 +589,10 @@ ALL_MODULES.$(LOCAL_MODULE).EVENT_LOG_TAGS := \
$(ALL_MODULES.$(LOCAL_MODULE).EVENT_LOG_TAGS) $(event_log_tags)
ALL_MODULES.$(LOCAL_MODULE).INTERMEDIATE_SOURCE_DIR := \
$(ALL_MODULES.$(LOCAL_MODULE).INTERMEDIATE_SOURCE_DIR) $(LOCAL_INTERMEDIATE_SOURCE_DIR)
+ifdef LOCAL_MODULE_OWNER
+ALL_MODULES.$(LOCAL_MODULE).OWNER := \
+ $(strip $(ALL_MODULES.$(LOCAL_MODULE).OWNER) $(LOCAL_MODULE_OWNER))
+endif
INSTALLABLE_FILES.$(LOCAL_INSTALLED_MODULE).MODULE := $(LOCAL_MODULE)
diff --git a/core/clear_vars.mk b/core/clear_vars.mk
index d9f3372..ae4bd38 100644
--- a/core/clear_vars.mk
+++ b/core/clear_vars.mk
@@ -107,6 +107,7 @@ LOCAL_MANIFEST_FILE:=
LOCAL_RENDERSCRIPT_INCLUDES:=
LOCAL_RENDERSCRIPT_INCLUDES_OVERRIDE:=
LOCAL_RENDERSCRIPT_CC:=
+LOCAL_RENDERSCRIPT_FLAGS:=
LOCAL_RENDERSCRIPT_TARGET_API:=
LOCAL_BUILD_HOST_DEX:=
LOCAL_DEX_PREOPT:= # '',true,false,nostripping
@@ -114,6 +115,8 @@ LOCAL_PROTOC_OPTIMIZE_TYPE:= # lite(default),micro,full
LOCAL_PROTOC_FLAGS:=
LOCAL_NO_CRT:=
LOCAL_PROPRIETARY_MODULE:=
+LOCAL_MODULE_OWNER:=
+LOCAL_CTS_TEST_PACKAGE:=
# Trim MAKEFILE_LIST so that $(call my-dir) doesn't need to
# iterate over thousands of entries every time.
diff --git a/core/combo/HOST_darwin-x86.mk b/core/combo/HOST_darwin-x86.mk
index 544a29e..3682766 100644
--- a/core/combo/HOST_darwin-x86.mk
+++ b/core/combo/HOST_darwin-x86.mk
@@ -53,7 +53,11 @@ HOST_JNILIB_SUFFIX := .jnilib
HOST_GLOBAL_CFLAGS += \
-include $(call select-android-config-h,darwin-x86)
-HOST_RUN_RANLIB_AFTER_COPYING := true
+ifneq ($(filter 10.7.%, $(build_mac_version)),)
+ HOST_RUN_RANLIB_AFTER_COPYING := false
+else
+ HOST_RUN_RANLIB_AFTER_COPYING := true
+endif
HOST_GLOBAL_ARFLAGS := cqs
HOST_CUSTOM_LD_COMMAND := true
diff --git a/core/combo/TARGET_linux-x86.mk b/core/combo/TARGET_linux-x86.mk
index f38c3d3..6efc6a4 100644
--- a/core/combo/TARGET_linux-x86.mk
+++ b/core/combo/TARGET_linux-x86.mk
@@ -22,6 +22,18 @@ ifeq ($(strip $(TARGET_ARCH_VARIANT)),)
TARGET_ARCH_VARIANT := x86
endif
+# Include the arch-variant-specific configuration file.
+# Its role is to define various ARCH_X86_HAVE_XXX feature macros,
+# plus initial values for TARGET_GLOBAL_CFLAGS
+#
+TARGET_ARCH_SPECIFIC_MAKEFILE := $(BUILD_COMBOS)/arch/$(TARGET_ARCH)/$(TARGET_ARCH_VARIANT).mk
+ifeq ($(strip $(wildcard $(TARGET_ARCH_SPECIFIC_MAKEFILE))),)
+$(error Unknown $(TARGET_ARCH) architecture version: $(TARGET_ARCH_VARIANT))
+endif
+
+include $(TARGET_ARCH_SPECIFIC_MAKEFILE)
+
+
# You can set TARGET_TOOLS_PREFIX to get gcc from somewhere else
ifeq ($(strip $(TARGET_TOOLS_PREFIX)),)
TARGET_TOOLS_PREFIX := \
@@ -84,27 +96,48 @@ TARGET_GLOBAL_CFLAGS += \
-funwind-tables \
-include $(call select-android-config-h,target_linux-x86)
-# Needs to be fixed later
-#TARGET_GLOBAL_CFLAGS += \
-# -fstack-protector
-
-# Needs to be added for RELEASE
-#TARGET_GLOBAL_CFLAGS += \
-# -DNDEBUG
-
+# XXX: Not sure this is still needed. Must check with our toolchains.
TARGET_GLOBAL_CPPFLAGS += \
-fno-use-cxa-atexit
-ifeq ($(TARGET_ARCH_VARIANT),x86-atom)
- TARGET_GLOBAL_CFLAGS += -march=atom -mstackrealign -DUSE_SSSE3 -DUSE_SSE2 -mfpmath=sse
-else
- TARGET_GLOBAL_CFLAGS += -march=i686
+# XXX: Our toolchain is normally configured to always set these flags by default
+# however, there have been reports that this is sometimes not the case. So make
+# them explicit here unless we have the time to carefully check it
+#
+TARGET_GLOBAL_CFLAGS += -mstackrealign -msse3 -mfpmath=sse
+
+# XXX: These flags should not be defined here anymore. Instead, the Android.mk
+# of the modules that depend on these features should instead check the
+# corresponding macros (e.g. ARCH_X86_HAVE_SSE2 and ARCH_X86_HAVE_SSSE3)
+# Keep them here until this is all cleared up.
+#
+ifeq ($(ARCH_X86_HAVE_SSE2),true)
+TARGET_GLOBAL_CFLAGS += -DUSE_SSE2
endif
+ifeq ($(ARCH_X86_HAVE_SSSE3),true) # yes, really SSSE3, not SSE3!
+TARGET_GLOBAL_CFLAGS += -DUSE_SSSE3
+endif
+
+# XXX: This flag is probably redundant. I believe our toolchain always sets
+# it by default. Consider for removal.
+#
TARGET_GLOBAL_CFLAGS += -mbionic
+
+# XXX: This flag is probably redundant. The macro should be defined by our
+# toolchain binaries automatically (as a compiler built-in).
+# Check with: $BINPREFIX-gcc -dM -E < /dev/null
+#
+# Consider for removal.
+#
TARGET_GLOBAL_CFLAGS += -D__ANDROID__
+# XXX: This flag is probably redundant since our toolchain binaries already
+# generate 32-bit machine code. It probably dates back to the old days
+# where we were using the host toolchain on Linux to build the platform
+# images. Consider it for removal.
TARGET_GLOBAL_LDFLAGS += -m32
+
TARGET_GLOBAL_LDFLAGS += -Wl,-z,noexecstack
TARGET_GLOBAL_LDFLAGS += -Wl,--gc-sections
@@ -188,3 +221,21 @@ $(hide) $(PRIVATE_CXX) \
-Wl,--end-group \
$(if $(filter true,$(PRIVATE_NO_CRT)),,$(TARGET_CRTEND_O))
endef
+
+# Special check for x86 NDK ABI compatibility.
+# The TARGET_CPU_ABI variable should be defined in BoardConfig.mk to 'x86'
+# *only* if the platform image is compatible with the NDK x86 ABI.
+#
+# We perform a small check here to ensure that nothing bad can happen.
+#
+ifeq ($(TARGET_CPU_ABI),x86)
+ ifneq (true-true-true-true,$(ARCH_X86_HAVE_MMX)-$(ARCH_X86_HAVE_SSE)-$(ARCH_X86_HAVE_SSE2)-$(ARCH_X86_HAVE_SSE3))
+ $(info ERROR: Your x86 platform image is not compatible with the NDK x86 ABI)
+ $(info As such, you should *not* define TARGET_CPU_ABI to 'x86' in your BoardConfig.mk)
+ $(info to ensure that your device will not be mistakenly listed as compatible by
+ $(info the Android Market. Also, it is likely that the image will fail the CTS tests)
+ $(info Please undefine TARGET_CPU_ABI in your BoardConfig.mk, or select the value 'none')
+ $(info The corresponding image will still be able to run Dalvik-based Android applications)
+ $(error Aborting build! Please fix your BoardConfig.mk)
+ endif
+endif
diff --git a/core/combo/arch/x86/x86-atom.mk b/core/combo/arch/x86/x86-atom.mk
new file mode 100644
index 0000000..85998e7
--- /dev/null
+++ b/core/combo/arch/x86/x86-atom.mk
@@ -0,0 +1,18 @@
+# This file contains feature macro definitions specific to the
+# 'x86-atom' arch variant. This is an extension of the 'x86' base variant
+# that adds Atom-specific features.
+#
+# See build/core/combo/arch/x86/x86.mk for differences.
+#
+ARCH_X86_HAVE_MMX := true
+ARCH_X86_HAVE_SSE := true
+ARCH_X86_HAVE_SSE2 := true
+ARCH_X86_HAVE_SSE3 := true
+
+ARCH_X86_HAVE_SSSE3 := true
+ARCH_X86_HAVE_MOVBE := true
+ARCH_X86_HAVE_POPCNT := false # popcnt is not supported by current Atom CPUs
+
+# This flag is used to enabled Atom-specific optimizations with our toolchain
+#
+TARGET_GLOBAL_CFLAGS += -march=atom
diff --git a/core/combo/arch/x86/x86.mk b/core/combo/arch/x86/x86.mk
new file mode 100644
index 0000000..476da45
--- /dev/null
+++ b/core/combo/arch/x86/x86.mk
@@ -0,0 +1,35 @@
+# This file contains feature macro definitions specific to the
+# base 'x86' platform ABI. This one must *strictly* match the NDK x86 ABI
+# which mandates specific CPU extensions to be available.
+#
+# It is also used to build full_x86-eng / sdk_x86-eng platform images that
+# are run in the emulator under KVM emulation (i.e. running directly on
+# the host development machine's CPU).
+#
+
+# If your target device doesn't support the four following features, then
+# it cannot be compatible with the NDK x86 ABI. You should define a new
+# target arch variant (e.g. "x86-mydevice") and a corresponding file
+# under build/core/combo/arch/x86/
+#
+ARCH_X86_HAVE_MMX := true
+ARCH_X86_HAVE_SSE := true
+ARCH_X86_HAVE_SSE2 := true
+ARCH_X86_HAVE_SSE3 := true
+
+# These features are optional and shall not be included in the base platform
+# Otherwise, they sdk_x86-eng system images might fail to run on some
+# developer machines.
+#
+
+ARCH_X86_HAVE_SSSE3 := false
+ARCH_X86_HAVE_MOVBE := false
+ARCH_X86_HAVE_POPCNT := false
+
+
+# XXX: This flag is probably redundant, because it should be set by default
+# by our toolchain binaries. However, there have been reports that this may
+# not always work as intended, so keep it unless we have the time to check
+# everything properly.
+
+TARGET_GLOBAL_CFLAGS += -march=i686
diff --git a/core/definitions.mk b/core/definitions.mk
index 53f22c7..9ae940d 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -78,6 +78,9 @@ INTERNAL_DALVIK_MODULES:=
# All findbugs xml files
ALL_FINDBUGS_FILES:=
+# GPL module license files
+ALL_GPL_MODULE_LICENSE_FILES:=
+
###########################################################
## Debugging; prints a variable list to stdout
###########################################################
@@ -802,6 +805,7 @@ $(hide) $(PRIVATE_RS_CC) \
-d $(PRIVATE_RS_OUTPUT_DIR) \
-a $@ -MD \
$(addprefix -target-api , $(PRIVATE_RS_TARGET_API)) \
+ $(PRIVATE_RS_FLAGS) \
$(foreach inc,$(PRIVATE_RS_INCLUDES),$(addprefix -I , $(inc))) \
$(PRIVATE_RS_SOURCE_FILES)
#$(hide) $(LLVM_RS_LINK) \
@@ -890,7 +894,7 @@ $(hide) $(PRIVATE_CXX) \
$(PRIVATE_CFLAGS) \
$(PRIVATE_CPPFLAGS) \
$(PRIVATE_DEBUG_CFLAGS) \
- -MD -o $@ $<
+ -MD -MF $(patsubst %.o,%.d,$@) -o $@ $<
$(transform-d-to-p)
endef
@@ -917,7 +921,7 @@ $(hide) $(PRIVATE_CC) \
$(PRIVATE_CFLAGS) \
$(1) \
$(PRIVATE_DEBUG_CFLAGS) \
- -MD -o $@ $<
+ -MD -MF $(patsubst %.o,%.d,$@) -o $@ $<
endef
define transform-c-to-o-no-deps
@@ -978,7 +982,7 @@ $(hide) $(PRIVATE_CXX) \
$(PRIVATE_CFLAGS) \
$(PRIVATE_CPPFLAGS) \
$(PRIVATE_DEBUG_CFLAGS) \
- -MD -o $@ $<
+ -MD -MF $(patsubst %.o,%.d,$@) -o $@ $<
$(transform-d-to-p)
endef
@@ -1004,7 +1008,7 @@ $(hide) $(PRIVATE_CC) \
$(PRIVATE_CFLAGS) \
$(1) \
$(PRIVATE_DEBUG_CFLAGS) \
- -MD -o $@ $<
+ -MD -MF $(patsubst %.o,%.d,$@) -o $@ $<
endef
define transform-host-c-to-o-no-deps
@@ -1444,7 +1448,8 @@ $(hide) if [ -d "$(PRIVATE_SOURCE_INTERMEDIATES_DIR)" ]; then \
fi
$(hide) tr ' ' '\n' < $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list \
| sort -u > $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq
-$(hide) $(1) -encoding UTF-8 \
+$(hide) if [ -s $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq ] ; then \
+ $(1) -encoding UTF-8 \
$(strip $(PRIVATE_JAVAC_DEBUG_FLAGS)) \
$(if $(findstring true,$(LOCAL_WARNINGS_ENABLE)),$(xlint_unchecked),) \
$(2) \
@@ -1454,9 +1459,14 @@ $(hide) $(1) -encoding UTF-8 \
-extdirs "" -d $(PRIVATE_CLASS_INTERMEDIATES_DIR) \
$(PRIVATE_JAVACFLAGS) \
\@$(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq \
- || ( rm -rf $(PRIVATE_CLASS_INTERMEDIATES_DIR) ; exit 41 )
+ || ( rm -rf $(PRIVATE_CLASS_INTERMEDIATES_DIR) ; exit 41 ) \
+fi
$(hide) rm -f $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list
$(hide) rm -f $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq
+$(if $(PRIVATE_JAR_EXCLUDE_FILES), $(hide) find $(PRIVATE_CLASS_INTERMEDIATES_DIR) \
+ -name $(word 1, $(PRIVATE_JAR_EXCLUDE_FILES)) \
+ $(addprefix -o -name , $(wordlist 2, 999, $(PRIVATE_JAR_EXCLUDE_FILES))) \
+ | xargs rm -rf)
$(hide) jar $(if $(strip $(PRIVATE_JAR_MANIFEST)),-cfm,-cf) \
$@ $(PRIVATE_JAR_MANIFEST) -C $(PRIVATE_CLASS_INTERMEDIATES_DIR) .
endef
diff --git a/core/dumpvar.mk b/core/dumpvar.mk
index c3fb5b4..f91c08a 100644
--- a/core/dumpvar.mk
+++ b/core/dumpvar.mk
@@ -3,7 +3,11 @@
# what to add to the path given the config we have chosen.
ifeq ($(CALLED_FROM_SETUP),true)
+ifneq ($(filter /%,$(HOST_OUT_EXECUTABLES)),)
+ABP:=$(HOST_OUT_EXECUTABLES)
+else
ABP:=$(PWD)/$(HOST_OUT_EXECUTABLES)
+endif
# Add the ARM toolchain bin dir if it actually exists
ifneq ($(wildcard $(PWD)/prebuilt/$(HOST_PREBUILT_TAG)/toolchain/arm-linux-androideabi-4.4.x/bin),)
@@ -44,7 +48,11 @@ ifdef dumpvar_goals
absolute_dumpvar := $(strip $(filter abs-%,$(dumpvar_goals)))
ifdef absolute_dumpvar
dumpvar_goals := $(patsubst abs-%,%,$(dumpvar_goals))
- DUMPVAR_VALUE := $(PWD)/$($(dumpvar_goals))
+ ifneq ($(filter /%,$($(dumpvar_goals))),)
+ DUMPVAR_VALUE := $($(dumpvar_goals))
+ else
+ DUMPVAR_VALUE := $(PWD)/$($(dumpvar_goals))
+ endif
dumpvar_target := dumpvar-abs-$(dumpvar_goals)
else
DUMPVAR_VALUE := $($(dumpvar_goals))
@@ -78,5 +86,6 @@ $(info HOST_ARCH=$(HOST_ARCH))
$(info HOST_OS=$(HOST_OS))
$(info HOST_BUILD_TYPE=$(HOST_BUILD_TYPE))
$(info BUILD_ID=$(BUILD_ID))
+$(info OUT_DIR=$(OUT_DIR))
$(info ============================================)
endif
diff --git a/core/envsetup.mk b/core/envsetup.mk
index 8457880..74e9100 100644
--- a/core/envsetup.mk
+++ b/core/envsetup.mk
@@ -141,7 +141,11 @@ endif
# figure out the output directories
ifeq (,$(strip $(OUT_DIR)))
+ifeq (,$(strip $(OUT_DIR_COMMON_BASE)))
OUT_DIR := $(TOPDIR)out
+else
+OUT_DIR := $(OUT_DIR_COMMON_BASE)/$(notdir $(PWD))
+endif
endif
DEBUG_OUT_DIR := $(OUT_DIR)/debug
@@ -249,6 +253,8 @@ TARGET_INSTALLER_DATA_OUT := $(TARGET_INSTALLER_OUT)/data
TARGET_INSTALLER_ROOT_OUT := $(TARGET_INSTALLER_OUT)/root
TARGET_INSTALLER_SYSTEM_OUT := $(TARGET_INSTALLER_OUT)/root/system
+TARGET_FACTORY_RAMDISK_OUT := $(PRODUCT_OUT)/factory_ramdisk
+
COMMON_MODULE_CLASSES := TARGET-NOTICE_FILES HOST-NOTICE_FILES HOST-JAVA_LIBRARIES
ifeq (,$(strip $(DIST_DIR)))
diff --git a/core/host_java_library.mk b/core/host_java_library.mk
index 322d10f..6cc0b1f 100644
--- a/core/host_java_library.mk
+++ b/core/host_java_library.mk
@@ -52,6 +52,7 @@ $(LOCAL_INTERMEDIATE_TARGETS): \
$(cleantarget): PRIVATE_CLEAN_FILES += $(intermediates.COMMON)
$(full_classes_compiled_jar): PRIVATE_JAVACFLAGS := $(LOCAL_JAVACFLAGS)
+$(full_classes_compiled_jar): PRIVATE_JAR_EXCLUDE_FILES :=
$(full_classes_compiled_jar): $(java_sources) $(java_resource_sources) $(full_java_lib_deps) $(jar_manifest_file)
$(transform-host-java-to-package)
@@ -87,6 +88,7 @@ endif
else
$(LOCAL_BUILT_MODULE): PRIVATE_JAVACFLAGS := $(LOCAL_JAVACFLAGS)
+$(LOCAL_BUILT_MODULE): PRIVATE_JAR_EXCLUDE_FILES :=
$(LOCAL_BUILT_MODULE): $(java_sources) $(java_resource_sources) $(full_java_lib_deps) $(jar_manifest_file)
$(transform-host-java-to-package)
endif # LOCAL_BUILD_HOST_DEX
diff --git a/core/java.mk b/core/java.mk
index 1cde62b..e726bb0 100644
--- a/core/java.mk
+++ b/core/java.mk
@@ -5,7 +5,7 @@
# Make sure there's something to build.
# It's possible to build a package that doesn't contain any classes.
-ifeq (,$(strip $(LOCAL_SRC_FILES)$(all_res_assets)))
+ifeq (,$(strip $(LOCAL_SRC_FILES)$(all_res_assets)$(LOCAL_STATIC_JAVA_LIBRARIES)))
$(error $(LOCAL_PATH): Target java module does not define any source or resource files)
endif
@@ -152,6 +152,11 @@ ifeq ($(LOCAL_RENDERSCRIPT_CC),)
LOCAL_RENDERSCRIPT_CC := $(LLVM_RS_CC)
endif
+# Turn on all warnings and warnings as errors for RS compiles.
+# This can be disabled with LOCAL_RENDERSCRIPT_FLAGS := -Wno-error
+renderscript_flags := -Wall -Werror
+renderscript_flags += $(LOCAL_RENDERSCRIPT_FLAGS)
+
# prepend the RenderScript system include path
ifneq ($(filter-out current,$(LOCAL_SDK_VERSION)),)
LOCAL_RENDERSCRIPT_INCLUDES := \
@@ -171,6 +176,7 @@ endif
$(RenderScript_file_stamp): PRIVATE_RS_INCLUDES := $(LOCAL_RENDERSCRIPT_INCLUDES)
$(RenderScript_file_stamp): PRIVATE_RS_CC := $(LOCAL_RENDERSCRIPT_CC)
+$(RenderScript_file_stamp): PRIVATE_RS_FLAGS := $(renderscript_flags)
$(RenderScript_file_stamp): PRIVATE_RS_SOURCE_FILES := $(renderscript_sources_fullpath)
# By putting the generated java files into $(LOCAL_INTERMEDIATE_SOURCE_DIR), they will be
# automatically found by the java compiling function transform-java-to-classes.jar.
@@ -214,7 +220,7 @@ $(cleantarget): PRIVATE_CLEAN_FILES += $(intermediates.COMMON)
# If the module includes java code (i.e., it's not framework-res), compile it.
full_classes_jar :=
built_dex :=
-ifneq (,$(strip $(all_java_sources)))
+ifneq (,$(strip $(all_java_sources)$(full_static_java_libs)))
# If LOCAL_BUILT_MODULE_STEM wasn't overridden by our caller,
# full_classes_jar will be the same module as LOCAL_BUILT_MODULE.
@@ -243,6 +249,7 @@ ALL_MODULES.$(LOCAL_MODULE).STUBS := $(full_classes_stubs_jar)
# Deps for generated source files must be handled separately,
# via deps on the target that generates the sources.
$(full_classes_compiled_jar): PRIVATE_JAVACFLAGS := $(LOCAL_JAVACFLAGS)
+$(full_classes_compiled_jar): PRIVATE_JAR_EXCLUDE_FILES := $(LOCAL_JAR_EXCLUDE_FILES)
$(full_classes_compiled_jar): $(java_sources) $(java_resource_sources) $(full_java_lib_deps) $(jar_manifest_file) \
$(RenderScript_file_stamp) $(proto_java_sources_file_stamp)
$(transform-java-to-classes.jar)
diff --git a/core/java_library.mk b/core/java_library.mk
index fa40c0e..904ef5f 100644
--- a/core/java_library.mk
+++ b/core/java_library.mk
@@ -14,9 +14,11 @@ ifneq (,$(LOCAL_ASSET_DIR))
$(error $(LOCAL_PATH): Target java libraries may not set LOCAL_ASSET_DIR)
endif
+ifneq (true,$(LOCAL_IS_STATIC_JAVA_LIBRARY))
ifneq (,$(LOCAL_RESOURCE_DIR))
$(error $(LOCAL_PATH): Target java libraries may not set LOCAL_RESOURCE_DIR)
endif
+endif
#xxx base_rules.mk looks at this
all_res_assets :=
diff --git a/core/main.mk b/core/main.mk
index 97d3d7e..cfca47d 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -37,7 +37,9 @@ endif
#TOPDIR := $(TOP)/
#endif
-# check for broken versions of make
+# Check for broken versions of make.
+# (Allow any version under Cygwin since we don't actually build the platform there.)
+ifeq (,$(findstring CYGWIN,$(shell uname -sm)))
ifeq (0,$(shell expr $$(echo $(MAKE_VERSION) | sed "s/[^0-9\.].*//") = 3.81))
$(warning ********************************************************************************)
$(warning * You are using version $(MAKE_VERSION) of make.)
@@ -46,6 +48,7 @@ $(warning * see http://source.android.com/source/download.html)
$(warning ********************************************************************************)
$(error stopping)
endif
+endif
TOP := .
TOPDIR :=
@@ -271,11 +274,13 @@ endif # !enable_target_debugging
ifeq ($(TARGET_BUILD_VARIANT),eng)
tags_to_install := user debug eng
+ifneq ($(filter ro.setupwizard.mode=ENABLED, $(call collapse-pairs, $(ADDITIONAL_BUILD_PROPERTIES))),)
# Don't require the setup wizard on eng builds
ADDITIONAL_BUILD_PROPERTIES := $(filter-out ro.setupwizard.mode=%,\
$(call collapse-pairs, $(ADDITIONAL_BUILD_PROPERTIES))) \
ro.setupwizard.mode=OPTIONAL
endif
+endif
## tests ##
@@ -395,6 +400,7 @@ ifeq ($(SDK_ONLY),true)
subdirs := \
prebuilt \
+ prebuilts \
build/libs/host \
build/tools/zipalign \
dalvik/dexdump \
@@ -441,6 +447,7 @@ subdirs += \
sdk/ide_common \
sdk/jarutils \
sdk/layoutlib_api \
+ sdk/manifmerger \
sdk/ninepatch \
sdk/rule_api \
sdk/lint \
@@ -727,6 +734,9 @@ checkbuild: $(modules_to_check)
.PHONY: ramdisk
ramdisk: $(INSTALLED_RAMDISK_TARGET)
+.PHONY: factory_ramdisk
+factory_ramdisk: $(INSTALLED_FACTORY_RAMDISK_TARGET)
+
.PHONY: systemtarball
systemtarball: $(INSTALLED_SYSTEMTARBALL_TARGET)
@@ -807,6 +817,7 @@ else # TARGET_BUILD_APPS
$(BUILT_TARGET_FILES_PACKAGE) \
$(INSTALLED_ANDROID_INFO_TXT_TARGET) \
$(INSTALLED_RAMDISK_TARGET) \
+ $(INSTALLED_FACTORY_RAMDISK_TARGET) \
)
# Building a full system-- the default is to build droidcore
diff --git a/core/product.mk b/core/product.mk
index f7c772f..23dc375 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -84,6 +84,8 @@ _product_var_list := \
PRODUCT_SDK_ADDON_DOC_MODULES \
PRODUCT_DEFAULT_WIFI_CHANNELS \
PRODUCT_DEFAULT_DEV_CERTIFICATE \
+ PRODUCT_RESTRICT_VENDOR_FILES \
+ PRODUCT_FACTORY_RAMDISK_MODULES \
define dump-product
diff --git a/core/static_java_library.mk b/core/static_java_library.mk
index 93d770a..d317691 100644
--- a/core/static_java_library.mk
+++ b/core/static_java_library.mk
@@ -21,5 +21,83 @@
LOCAL_UNINSTALLABLE_MODULE := true
LOCAL_IS_STATIC_JAVA_LIBRARY := true
+
+# Hack to build static Java library with Android resource
+# See bug 5714516
+all_resources :=
+ifdef LOCAL_RESOURCE_DIR
+all_resources := $(strip \
+ $(foreach dir, $(LOCAL_RESOURCE_DIR), \
+ $(addprefix $(dir)/, \
+ $(patsubst res/%,%, \
+ $(call find-subdir-assets,$(dir)) \
+ ) \
+ ) \
+ ))
+
+ifneq (,$(all_resources))
+# Those files will be excluded from the built jar.
+# The R/Manifest classes should be re-generated in the app Module instead.
+# Use '' and $ escape because they will be passed to bash.
+LOCAL_JAR_EXCLUDE_FILES := 'R.class' 'R$$*.class' 'Manifest.class' 'Manifest$$*.class'
+endif
+endif
+
include $(BUILD_SYSTEM)/java_library.mk
+
+ifneq (,$(all_resources))
+R_file_stamp := $(LOCAL_INTERMEDIATE_SOURCE_DIR)/R.stamp
+
+ifeq ($(strip $(LOCAL_MANIFEST_FILE)),)
+LOCAL_MANIFEST_FILE := AndroidManifest.xml
+endif
+full_android_manifest := $(LOCAL_PATH)/$(LOCAL_MANIFEST_FILE)
+
+framework_res_package_export :=
+framework_res_package_export_deps :=
+# Please refer to package.mk
+ifneq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
+ifneq ($(filter-out current,$(LOCAL_SDK_RES_VERSION)),)
+framework_res_package_export := \
+ $(HISTORICAL_SDK_VERSIONS_ROOT)/$(LOCAL_SDK_RES_VERSION)/android.jar
+framework_res_package_export_deps := $(framework_res_package_export)
+else
+framework_res_package_export := \
+ $(call intermediates-dir-for,APPS,framework-res,,COMMON)/package-export.apk
+framework_res_package_export_deps := \
+ $(dir $(framework_res_package_export))src/R.stamp
+endif
+endif
+
+$(R_file_stamp): PRIVATE_MODULE := $(LOCAL_MODULE)
+# add --non-constant-id to prevent inlining constants.
+$(R_file_stamp): PRIVATE_AAPT_FLAGS := $(LOCAL_AAPT_FLAGS) --non-constant-id
+$(R_file_stamp): PRIVATE_SOURCE_INTERMEDIATES_DIR := $(LOCAL_INTERMEDIATE_SOURCE_DIR)
+$(R_file_stamp): PRIVATE_ANDROID_MANIFEST := $(full_android_manifest)
+$(R_file_stamp): PRIVATE_RESOURCE_PUBLICS_OUTPUT := $(intermediates.COMMON)/public_resources.xml
+$(R_file_stamp): PRIVATE_RESOURCE_DIR := $(LOCAL_RESOURCE_DIR)
+$(R_file_stamp): PRIVATE_AAPT_INCLUDES := $(framework_res_package_export)
+ifneq (,$(filter-out current, $(LOCAL_SDK_VERSION)))
+$(R_file_stamp): PRIVATE_DEFAULT_APP_TARGET_SDK := $(LOCAL_SDK_VERSION)
+else
+$(R_file_stamp): PRIVATE_DEFAULT_APP_TARGET_SDK := $(DEFAULT_APP_TARGET_SDK)
+endif
+$(R_file_stamp): PRIVATE_ASSET_DIR :=
+$(R_file_stamp): PRIVATE_PROGUARD_OPTIONS_FILE :=
+$(R_file_stamp): PRIVATE_MANIFEST_PACKAGE_NAME :=
+$(R_file_stamp): PRIVATE_MANIFEST_INSTRUMENTATION_FOR :=
+
+$(R_file_stamp) : $(all_resources) $(full_android_manifest) $(AAPT) $(framework_res_package_export_deps)
+ @echo "target R.java/Manifest.java: $(PRIVATE_MODULE) ($@)"
+ $(create-resource-java-files)
+ $(hide) find $(PRIVATE_SOURCE_INTERMEDIATES_DIR) -name R.java | xargs cat > $@
+
+$(LOCAL_BUILT_MODULE): $(R_file_stamp)
+ifneq ($(full_classes_jar),)
+$(full_classes_compiled_jar): $(R_file_stamp)
+endif
+
+endif # $(all_resources) not empty
+
LOCAL_IS_STATIC_JAVA_LIBRARY :=
+LOCAL_JAR_EXCLUDE_FILES :=
diff --git a/core/tasks/collect_gpl_sources.mk b/core/tasks/collect_gpl_sources.mk
new file mode 100644
index 0000000..3c7afcc
--- /dev/null
+++ b/core/tasks/collect_gpl_sources.mk
@@ -0,0 +1,30 @@
+# Copyright (C) 2011 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.
+
+gpl_source_tgz := $(call intermediates-dir-for,PACKAGING,gpl_source,HOST,COMMON)/gpl_source.tgz
+
+$(gpl_source_tgz): PRIVATE_PATHS := $(sort $(patsubst %/, %, $(dir $(ALL_GPL_MODULE_LICENSE_FILES))))
+$(gpl_source_tgz) : $(ALL_GPL_MODULE_LICENSE_FILES)
+ @echo Package gpl sources: $@
+ @rm -rf $(dir $@) && mkdir -p $(dir $@)
+ $(hide) tar cfz $@ --exclude ".git*" $(PRIVATE_PATHS)
+
+
+.PHONY: gpl_source_tgz
+gpl_source_tgz : $(gpl_source_tgz)
+
+# Dist the tgz only if we are doing a full build
+ifeq (,$(TARGET_BUILD_APPS))
+$(call dist-for-goals, droidcore, $(gpl_source_tgz))
+endif
diff --git a/core/tasks/cts.mk b/core/tasks/cts.mk
index fcdd987..c6b26a4 100644
--- a/core/tasks/cts.mk
+++ b/core/tasks/cts.mk
@@ -42,7 +42,7 @@ DEFAULT_TEST_PLAN := $(cts_dir)/$(cts_name)/resource/plans
$(cts_dir)/all_cts_files_stamp: PRIVATE_JUNIT_HOST_JAR := $(junit_host_jar)
-include cts/CtsHostLibraryList.mk
-$(cts_dir)/all_cts_files_stamp: $(CTS_CASE_LIST) $(junit_host_jar) $(HOSTTESTLIB_JAR) $(CTS_HOST_LIBRARY_JARS) $(TF_JAR) $(CTS_TF_JAR) $(CTS_TF_EXEC_PATH) $(CTS_TF_README_PATH) $(ACP)
+$(cts_dir)/all_cts_files_stamp: $(CTS_CASE_LIST) $(CTS_TEST_CASES) $(junit_host_jar) $(HOSTTESTLIB_JAR) $(CTS_HOST_LIBRARY_JARS) $(TF_JAR) $(CTS_TF_JAR) $(CTS_TF_EXEC_PATH) $(CTS_TF_README_PATH) $(ACP)
# Make necessary directory for CTS
$(hide) rm -rf $(PRIVATE_CTS_DIR)
$(hide) mkdir -p $(TMP_DIR)
@@ -53,8 +53,8 @@ $(cts_dir)/all_cts_files_stamp: $(CTS_CASE_LIST) $(junit_host_jar) $(HOSTTESTLIB
# Copy executable and JARs to CTS directory
$(hide) $(ACP) -fp $(DDMLIB_JAR) $(PRIVATE_JUNIT_HOST_JAR) $(HOSTTESTLIB_JAR) $(CTS_HOST_LIBRARY_JARS) $(TF_JAR) $(CTS_TF_JAR) $(CTS_TF_EXEC_PATH) $(CTS_TF_README_PATH) $(PRIVATE_DIR)/tools
# Change mode of the executables
- $(foreach apk,$(CTS_CASE_LIST), \
- $(call copy-testcase-apk,$(apk)))
+ $(foreach apk,$(CTS_CASE_LIST),$(call copy-testcase-apk,$(apk)))
+ $(foreach testcase,$(CTS_TEST_CASES),$(call copy-testcase,$(testcase)))
$(hide) touch $@
# Generate the test descriptions for the core-tests
@@ -114,29 +114,6 @@ $(cts_dir)/all_cts_core_files_stamp: $(CTS_CORE_CASE_LIST) $(HOST_OUT_JAVA_LIBRA
libcore/expectations)
$(hide) touch $@
-
-# ----- Generate the test descriptions for the vm-tests -----
-# TODO: remove this section once cts-tf replaces cts.
-#
-CORE_VM_TEST_DESC := $(cts_dir)/$(cts_name)/repository/testcases/android.core.vm-tests
-
-VMTESTS_INTERMEDIATES :=$(call intermediates-dir-for,EXECUTABLES,vm-tests,1,)
-# core tests only needed to get hold of junit-framework-classes
-CORE_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core,,COMMON)
-JUNIT_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-junit,,COMMON)
-
-GEN_CLASSPATH := $(CORE_INTERMEDIATES)/classes.jar:$(JUNIT_INTERMEDIATES)/classes.jar:$(VMTESTS_INTERMEDIATES)/android.core.vm-tests.jar:$(HOSTTESTLIB_JAR):$(DDMLIB_JAR)
-
-$(CORE_VM_TEST_DESC): PRIVATE_CLASSPATH:=$(GEN_CLASSPATH)
-# Please see big comment above on why this line depends on javalib.jar instead of classes.jar
-$(CORE_VM_TEST_DESC): vm-tests $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar $(CORE_INTERMEDIATES)/javalib.jar $(JUNIT_INTERMEDIATES)/javalib.jar $(VMTESTS_INTERMEDIATES)/android.core.vm-tests.jar $(HOSTTESTLIB_JAR) $(DDMLIB_JAR) $(cts_dir)/all_cts_files_stamp | $(ACP)
- $(call generate-core-test-description,$(CORE_VM_TEST_DESC),\
- cts/tests/vm-tests/AndroidManifest.xml,\
- $(VMTESTS_INTERMEDIATES)/android.core.vm-tests.jar,"",\
- libcore/expectations,\
- cts/tools/vm-tests/Android.mk)
- $(ACP) -fv $(VMTESTS_INTERMEDIATES)/android.core.vm-tests.jar $(PRIVATE_DIR)/repository/testcases/android.core.vm-tests.jar
-
# ----- Generate the test descriptions for the vm-tests-tf -----
#
CORE_VM_TEST_TF_DESC := $(cts_dir)/$(cts_name)/repository/testcases/android.core.vm-tests-tf
@@ -165,9 +142,12 @@ APP_SECURITY_LIB := $(cts_dir)/$(cts_name)/repository/testcases/CtsAppSecurityTe
$(APP_SECURITY_LIB): $(HOST_OUT_JAVA_LIBRARIES)/CtsAppSecurityTests.jar $(cts_dir)/all_cts_files_stamp $(ACP)
$(ACP) -fv $(HOST_OUT_JAVA_LIBRARIES)/CtsAppSecurityTests.jar $(APP_SECURITY_LIB)
+
# Generate the default test plan for User.
# Usage: buildCts.py <testRoot> <ctsOutputDir> <tempDir> <androidRootDir> <docletPath>
-$(DEFAULT_TEST_PLAN): $(cts_dir)/all_cts_files_stamp $(cts_dir)/all_cts_core_files_stamp $(cts_tools_src_dir)/utils/buildCts.py $(CORE_VM_TEST_TF_DESC) $(CORE_VM_TEST_DESC) $(APP_SECURITY_LIB) $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar
+
+$(DEFAULT_TEST_PLAN): $(cts_dir)/all_cts_files_stamp $(cts_dir)/all_cts_core_files_stamp $(cts_tools_src_dir)/utils/buildCts.py $(CORE_VM_TEST_TF_DESC) $(APP_SECURITY_LIB) $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar $(CTS_TEST_XMLS) | $(ACP)
+ $(hide) $(ACP) -fp $(CTS_TEST_XMLS) $(PRIVATE_DIR)/repository/testcases
$(hide) $(cts_tools_src_dir)/utils/buildCts.py cts/tests/tests/ $(PRIVATE_DIR) $(TMP_DIR) \
$(TOP) $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar
@@ -180,7 +160,7 @@ $(INTERNAL_CTS_TARGET): PRIVATE_NAME := $(cts_name)
$(INTERNAL_CTS_TARGET): PRIVATE_CTS_DIR := $(cts_dir)
$(INTERNAL_CTS_TARGET): PRIVATE_DIR := $(cts_dir)/$(cts_name)
$(INTERNAL_CTS_TARGET): TMP_DIR := $(cts_dir)/temp
-$(INTERNAL_CTS_TARGET): $(cts_dir)/all_cts_files_stamp $(DEFAULT_TEST_PLAN) $(CORE_VM_TEST_DESC)
+$(INTERNAL_CTS_TARGET): $(cts_dir)/all_cts_files_stamp $(DEFAULT_TEST_PLAN)
$(hide) echo "Package CTS: $@"
$(hide) cd $(dir $@) && zip -rq $(notdir $@) $(PRIVATE_NAME)
@@ -194,3 +174,9 @@ $(hide) $(ACP) -fp $(call intermediates-dir-for,APPS,$(1))/package.apk \
$(PRIVATE_DIR)/repository/testcases/$(1).apk
endef
+
+define copy-testcase
+
+$(hide) $(ACP) -fp $(1) $(PRIVATE_DIR)/repository/testcases/$(notdir $1)
+
+endef
diff --git a/core/tasks/factory_ramdisk.mk b/core/tasks/factory_ramdisk.mk
new file mode 100644
index 0000000..ecfc4d0
--- /dev/null
+++ b/core/tasks/factory_ramdisk.mk
@@ -0,0 +1,73 @@
+#
+# Copyright (C) 2011 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.
+#
+
+ifeq (,$(ONE_SHOT_MAKEFILE))
+
+# PRODUCT_FACTORY_RAMDISK_MODULES consists of "<module_name>:<install_path>[:<install_path>...]" tuples.
+# <install_path> is relative to TARGET_FACTORY_RAMDISK_OUT.
+# We can have multiple <install_path>s because multiple modules may have the same name.
+# For example:
+# PRODUCT_FACTORY_RAMDISK_MODULES := \
+# toolbox:system/bin/toolbox adbd:sbin/adbd adb:system/bin/adb
+factory_ramdisk_modules := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_FACTORY_RAMDISK_MODULES))
+ifneq (,$(factory_ramdisk_modules))
+
+# A module name may end up in multiple modules (so multiple built files)
+# with the same name.
+# This function selects the module built file based on the install path.
+# $(1): the dest install path
+# $(2): the module built files
+define install-one-factory-ramdisk-module
+$(eval _iofrm_suffix := $(suffix $(1))) \
+$(if $(_iofrm_suffix), \
+ $(eval _iofrm_pattern := %$(_iofrm_suffix)), \
+ $(eval _iofrm_pattern := %$(notdir $(1)))) \
+$(eval _iofrm_src := $(filter $(_iofrm_pattern),$(2))) \
+$(if $(filter 1,$(words $(_iofrm_src))), \
+ $(eval _fulldest := $(TARGET_FACTORY_RAMDISK_OUT)/$(1)) \
+ $(eval $(call copy-one-file,$(_iofrm_src),$(_fulldest))) \
+ $(eval INTERNAL_FACTORY_RAMDISK_EXTRA_MODULES_FILES += $(_fulldest)), \
+ $(error Error: Can not find match in "$(2)" for "$(1)") \
+ )
+endef
+
+INTERNAL_FACTORY_RAMDISK_EXTRA_MODULES_FILES :=
+$(foreach m, $(factory_ramdisk_modules), \
+ $(eval _fr_m_tuple := $(subst :, ,$(m))) \
+ $(eval _fr_m_name := $(word 1,$(_fr_m_tuple))) \
+ $(eval _fr_dests := $(wordlist 2,999,$(_fr_m_tuple))) \
+ $(eval _fr_m_built := $(filter $(PRODUCT_OUT)/%, $(ALL_MODULES.$(_fr_m_name).BUILT))) \
+ $(foreach d,$(_fr_dests),$(call install-one-factory-ramdisk-module,$(d),$(_fr_m_built))) \
+ )
+endif
+
+# Files may also be installed via PRODUCT_COPY_FILES, PRODUCT_PACKAGES etc.
+INTERNAL_FACTORY_RAMDISK_FILES := $(filter $(TARGET_FACTORY_RAMDISK_OUT)/%, \
+ $(ALL_DEFAULT_INSTALLED_MODULES))
+
+ifneq (,$(INTERNAL_FACTORY_RAMDISK_EXTRA_MODULES_FILES)$(INTERNAL_FACTORY_RAMDISK_FILES))
+
+BUILT_FACTORY_RAMDISK_TARGET := $(PRODUCT_OUT)/factory_ramdisk.img
+
+INSTALLED_FACTORY_RAMDISK_TARGET := $(BUILT_FACTORY_RAMDISK_TARGET)
+$(INSTALLED_FACTORY_RAMDISK_TARGET) : $(MKBOOTFS) \
+ $(INTERNAL_FACTORY_RAMDISK_EXTRA_MODULES_FILES) $(INTERNAL_FACTORY_RAMDISK_FILES) | $(MINIGZIP)
+ $(call pretty,"Target factory ram disk: $@")
+ $(hide) $(MKBOOTFS) $(TARGET_FACTORY_RAMDISK_OUT) | $(MINIGZIP) > $@
+
+endif
+
+endif # ONE_SHOT_MAKEFILE
diff --git a/core/tasks/module_owner_check.mk b/core/tasks/module_owner_check.mk
new file mode 100644
index 0000000..028f037
--- /dev/null
+++ b/core/tasks/module_owner_check.mk
@@ -0,0 +1,60 @@
+#
+# Copyright (C) 2011 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.
+#
+
+# Restrict the vendor module owners here.
+
+_vendor_owner_whitelist := \
+ broadcom \
+ imgtec \
+ invensense \
+ nxp \
+ samsung \
+ ti
+
+
+ifeq (true,$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_RESTRICT_VENDOR_FILES))
+
+ifneq (,$(filter vendor/%, $(PRODUCT_PACKAGE_OVERLAYS) $(DEVICE_PACKAGE_OVERLAYS)))
+$(error Error: Product "$(TARGET_PRODUCT)" can not have overlay in vendor tree: \
+ $(filter vendor/%, $(PRODUCT_PACKAGE_OVERLAYS) $(DEVICE_PACKAGE_OVERLAYS)))
+endif
+ifneq (,$(filter vendor/%, $(PRODUCT_COPY_FILES)))
+$(error Error: Product "$(TARGET_PRODUCT)" can not have PRODUCT_COPY_FILES from vendor tree: \
+ $(filter vendor/%, $(PRODUCT_COPY_FILES)))
+endif
+
+_owner_check_modules := $(sort $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES))
+
+# expand with the required modules
+# $(1) the module name set to expand
+define _expand_required_modules
+$(eval _erm_new_modules:=)\
+$(foreach m, $(1), $(eval r:=$(ALL_MODULES.$(m).REQUIRED))\
+ $(if $(r), $(if $(filter $(_owner_check_modules), $(r)),,\
+ $(eval _owner_check_modules := $(_owner_check_modules) $(r))\
+ $(eval _erm_new_modules := $(_erm_new_modules) $(r)))))\
+$(if $(_erm_new_modules), $(call _expand_required_modules, $(_erm_new_modules)))
+endef
+
+$(call _expand_required_modules, $(_owner_check_modules))
+
+$(foreach m, $(_owner_check_modules), \
+ $(if $(filter vendor/%, $(ALL_MODULES.$(m).PATH)),\
+ $(if $(filter $(_vendor_owner_whitelist), $(ALL_MODULES.$(m).OWNER)),,\
+ $(error Error: vendor module "$(m)" in $(ALL_MODULES.$(m).PATH) with unknown owner \
+ "$(ALL_MODULES.$(m).OWNER)" in product "$(TARGET_PRODUCT)"))))
+
+endif
diff --git a/target/board/generic/BoardConfig.mk b/target/board/generic/BoardConfig.mk
index 229ea9c..bc999fa 100644
--- a/target/board/generic/BoardConfig.mk
+++ b/target/board/generic/BoardConfig.mk
@@ -21,6 +21,7 @@ TARGET_NO_KERNEL := true
TARGET_ARCH_VARIANT := armv7-a
TARGET_CPU_ABI := armeabi-v7a
TARGET_CPU_ABI2 := armeabi
+ARCH_ARM_HAVE_TLS_REGISTER := true
HAVE_HTC_AUDIO_DRIVER := true
BOARD_USES_GENERIC_AUDIO := true
@@ -39,3 +40,7 @@ endif
# Build OpenGLES emulation guest and host libraries
BUILD_EMULATOR_OPENGL := true
+
+# Build and enable the OpenGL ES View renderer. When running on the emulator,
+# the GLES renderer disables itself if host GL acceleration isn't available.
+USE_OPENGL_RENDERER := true
diff --git a/target/board/generic/device.mk b/target/board/generic/device.mk
index 8b187d5..4edcc19 100644
--- a/target/board/generic/device.mk
+++ b/target/board/generic/device.mk
@@ -19,7 +19,8 @@
PRODUCT_PROPERTY_OVERRIDES := \
ro.ril.hsxpa=1 \
- ro.ril.gprsclass=10
+ ro.ril.gprsclass=10 \
+ ro.adb.qemud=1
PRODUCT_COPY_FILES := \
development/data/etc/apns-conf.xml:system/etc/apns-conf.xml \
diff --git a/target/board/generic_armv5/BoardConfig.mk b/target/board/generic_armv5/BoardConfig.mk
index d8fa2fe..82170f0 100644
--- a/target/board/generic_armv5/BoardConfig.mk
+++ b/target/board/generic_armv5/BoardConfig.mk
@@ -19,5 +19,6 @@ include build/target/board/generic/BoardConfig.mk
TARGET_ARCH_VARIANT :=
TARGET_CPU_ABI := armeabi
TARGET_CPU_ABI2 :=
+ARCH_ARM_HAVE_TLS_REGISTER := false
WITH_DEXPREOPT := false
diff --git a/target/board/generic_x86/device.mk b/target/board/generic_x86/device.mk
index 1055cba..0dd2bc0 100644
--- a/target/board/generic_x86/device.mk
+++ b/target/board/generic_x86/device.mk
@@ -19,7 +19,8 @@
PRODUCT_PROPERTY_OVERRIDES := \
ro.ril.hsxpa=1 \
- ro.ril.gprsclass=10
+ ro.ril.gprsclass=10 \
+ ro.adb.qemud=1
PRODUCT_COPY_FILES := \
development/data/etc/apns-conf.xml:system/etc/apns-conf.xml \
diff --git a/target/board/vbox_x86/device.mk b/target/board/vbox_x86/device.mk
index a76d8fa..66a6e84 100644
--- a/target/board/vbox_x86/device.mk
+++ b/target/board/vbox_x86/device.mk
@@ -21,7 +21,8 @@ LOCAL_PATH := $(call my-dir)
PRODUCT_PROPERTY_OVERRIDES := \
ro.ril.hsxpa=1 \
- ro.ril.gprsclass=10
+ ro.ril.gprsclass=10 \
+ ro.adb.qemud=1
LOCAL_KERNEL := prebuilt/android-x86/kernel/kernel-vbox
diff --git a/target/product/core.mk b/target/product/core.mk
index abb2d9f..e25294b 100644
--- a/target/product/core.mk
+++ b/target/product/core.mk
@@ -70,6 +70,7 @@ PRODUCT_PACKAGES := \
libOpenMAXAL \
libOpenSLES \
libaudiopreprocessing \
+ libaudioutils \
libcrypto \
libdvm \
libexpat \
diff --git a/tools/droiddoc/templates-sdk/assets/android-developer-docs.css b/tools/droiddoc/templates-sdk/assets/android-developer-docs.css
index 2e15a68..03073eb 100644
--- a/tools/droiddoc/templates-sdk/assets/android-developer-docs.css
+++ b/tools/droiddoc/templates-sdk/assets/android-developer-docs.css
@@ -67,7 +67,7 @@
#side-nav li {
padding:0;
- line-height:16px;
+ padding:1px 0 1px 0;
white-space:nowrap;
zoom:1;
}
@@ -80,8 +80,10 @@
}
#side-nav li a {
+ display: inline-block; /* needed to apply padding to line-wraps */
text-decoration:none;
padding: 0 0 0 18px;
+ white-space:normal;
zoom:1;
}
diff --git a/tools/droiddoc/templates-sdk/assets/android-developer-docs.js b/tools/droiddoc/templates-sdk/assets/android-developer-docs.js
index 0cac2fc..c88f726 100644
--- a/tools/droiddoc/templates-sdk/assets/android-developer-docs.js
+++ b/tools/droiddoc/templates-sdk/assets/android-developer-docs.js
@@ -429,7 +429,7 @@ $(window).unload(function(){
writeCookie("lastpage", path, "reference", null);
} else if (path.indexOf("/guide/") != -1) {
writeCookie("lastpage", path, "guide", null);
- } else if (path.indexOf("/resources/") != -1) {
+ } else if ((path.indexOf("/resources/") != -1) || (path.indexOf("/training/") != -1)) {
writeCookie("lastpage", path, "resources", null);
}
});
diff --git a/tools/java-event-log-tags.py b/tools/java-event-log-tags.py
index c63fa20..846d9cf 100755
--- a/tools/java-event-log-tags.py
+++ b/tools/java-event-log-tags.py
@@ -26,6 +26,7 @@ tags in the given input file.
import cStringIO
import getopt
import os
+import os.path
import re
import sys
@@ -144,4 +145,8 @@ for t in tagfile.tags:
buffer.write("}\n");
+output_dir = os.path.dirname(output_file)
+if not os.path.exists(output_dir):
+ os.makedirs(output_dir)
+
event_log_tags.WriteOutput(output_file, buffer)