Skip to content

Commit

Permalink
Merge remote-tracking branch 'aosp/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
kito-cheng committed Nov 27, 2013
2 parents 9ab597f + 4e361bf commit c640254
Show file tree
Hide file tree
Showing 286 changed files with 21,537 additions and 493 deletions.
23 changes: 23 additions & 0 deletions CleanSpec.mk
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,35 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)

$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)

# Start of "K" development!
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)

# GCC 4.7
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/EXECUTABLES)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/lib/*.o)

# Wait, back to some JB development!
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)

# And on to KLP...
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)

# KLP now based off API 18.
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)

# Clean up around the /system/app -> /system/priv-app migration
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)

# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************
11 changes: 11 additions & 0 deletions buildspec.mk.default
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,17 @@ ifndef ENABLE_SVG
#ENABLE_SVG:=false
endif

# OVERRIDE_RUNTIMES allows you to locally override PRODUCT_RUNTIMES.
#
# To only build ART, use "runtime_libart_default"
# To use Dalvik but also include ART, use "runtime_libdvm_default runtime_libart"
# To use ART but also include Dalvik, use "runtime_libart_default runtime_libdvm"
ifndef OVERRIDE_RUNTIMES
#OVERRIDE_RUNTIMES:=runtime_libart_default
#OVERRIDE_RUNTIMES:=runtime_libdvm_default runtime_libart
#OVERRIDE_RUNTIMES:=runtime_libart_default runtime_libdvm
endif

# when the build system changes such that this file must be updated, this
# variable will be changed. After you have modified this file with the new
# changes (see buildspec.mk.default), update this to the new value from
Expand Down
3 changes: 2 additions & 1 deletion core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@ define package_files-copy-root
endef

$(BUILT_TARGET_FILES_PACKAGE): PRIVATE_RECOVERY_API_VERSION := $(RECOVERY_API_VERSION)
$(BUILT_TARGET_FILES_PACKAGE): PRIVATE_RECOVERY_FSTAB_VERSION := $(RECOVERY_FSTAB_VERSION)

ifeq ($(TARGET_RELEASETOOLS_EXTENSIONS),)
# default to common dir for device vendor
Expand Down Expand Up @@ -576,7 +577,7 @@ endif
$(hide) zipinfo -1 $@ | awk 'BEGIN { FS="SYSTEM/" } /^SYSTEM\// {print "system/" $$2}' | $(HOST_OUT_EXECUTABLES)/fs_config > $(zip_root)/META/filesystem_config.txt
$(hide) (cd $(zip_root) && zip -q ../$(notdir $@) META/*filesystem_config.txt)


.PHONY: target-files-package
target-files-package: $(BUILT_TARGET_FILES_PACKAGE)


Expand Down
101 changes: 75 additions & 26 deletions core/base_rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ ifdef LOCAL_IS_HOST_MODULE
ifneq ($(LOCAL_IS_HOST_MODULE),true)
$(error $(LOCAL_PATH): LOCAL_IS_HOST_MODULE must be "true" or empty, not "$(LOCAL_IS_HOST_MODULE)")
endif
my_prefix:=HOST_
my_host:=host-
my_prefix := HOST_
my_host := host-
else
my_prefix:=TARGET_
my_host:=
my_prefix := TARGET_
my_host :=
endif

###########################################################
Expand Down Expand Up @@ -98,23 +98,27 @@ ifneq ($(words $(LOCAL_MODULE_CLASS)),1)
endif

ifneq (true,$(LOCAL_UNINSTALLABLE_MODULE))
ifdef LOCAL_IS_HOST_MODULE
partition_tag :=
else
ifeq (true,$(LOCAL_PROPRIETARY_MODULE))
partition_tag := _VENDOR
else
# The definition of should-install-to-system will be different depending
# on which goal (e.g., sdk or just droid) is being built.
partition_tag := $(if $(call should-install-to-system,$(LOCAL_MODULE_TAGS)),,_DATA)
endif
endif

LOCAL_MODULE_PATH := $(strip $(LOCAL_MODULE_PATH))
ifeq ($(LOCAL_MODULE_PATH),)
LOCAL_MODULE_PATH := $($(my_prefix)OUT$(partition_tag)_$(LOCAL_MODULE_CLASS))
ifdef LOCAL_IS_HOST_MODULE
partition_tag :=
else
ifeq (true,$(LOCAL_PROPRIETARY_MODULE))
partition_tag := _VENDOR
else
# The definition of should-install-to-system will be different depending
# on which goal (e.g., sdk or just droid) is being built.
partition_tag := $(if $(call should-install-to-system,$(LOCAL_MODULE_TAGS)),,_DATA)
endif
endif
install_path_var := $(my_prefix)OUT$(partition_tag)_$(LOCAL_MODULE_CLASS)
ifeq (true,$(LOCAL_PRIVILEGED_MODULE))
install_path_var := $(install_path_var)_PRIVILEGED
endif

LOCAL_MODULE_PATH := $($(install_path_var))
ifeq ($(strip $(LOCAL_MODULE_PATH)),)
$(error $(LOCAL_PATH): unhandled LOCAL_MODULE_CLASS "$(LOCAL_MODULE_CLASS)")
$(error $(LOCAL_PATH): unhandled install path "$(install_path_var)")
endif
endif
endif # not LOCAL_UNINSTALLABLE_MODULE
Expand Down Expand Up @@ -384,6 +388,20 @@ endif # !LOCAL_IS_HOST_MODULE
full_java_libs += $(full_static_java_libs) $(LOCAL_CLASSPATH)
full_java_lib_deps += $(full_static_java_libs) $(LOCAL_CLASSPATH)

# This is set by packages that are linking to other packages that export
# shared libraries, allowing them to make use of the code in the linked apk.
LOCAL_APK_LIBRARIES := $(strip $(LOCAL_APK_LIBRARIES))
ifdef LOCAL_APK_LIBRARIES
link_apk_libraries := \
$(foreach lib,$(LOCAL_APK_LIBRARIES), \
$(call intermediates-dir-for, \
APPS,$(lib),,COMMON)/classes.jar)

# link against the jar with full original names (before proguard processing).
full_java_libs += $(link_apk_libraries)
full_java_lib_deps += $(link_apk_libraries)
endif

# This is set by packages that contain instrumentation, allowing them to
# link against the package they are instrumenting. Currently only one such
# package is allowed.
Expand Down Expand Up @@ -482,10 +500,12 @@ ifndef LOCAL_UNINSTALLABLE_MODULE
# Define a copy rule to install the module.
# acp and libraries that it uses can't use acp for
# installation; hence, LOCAL_ACP_UNAVAILABLE.
$(LOCAL_INSTALLED_MODULE): PRIVATE_POST_INSTALL_CMD := $(LOCAL_POST_INSTALL_CMD)
ifneq ($(LOCAL_ACP_UNAVAILABLE),true)
$(LOCAL_INSTALLED_MODULE): $(LOCAL_BUILT_MODULE) | $(ACP)
@echo "Install: $@"
$(copy-file-to-new-target)
$(PRIVATE_POST_INSTALL_CMD)
else
$(LOCAL_INSTALLED_MODULE): $(LOCAL_BUILT_MODULE)
@echo "Install: $@"
Expand Down Expand Up @@ -520,12 +540,17 @@ endif # !LOCAL_UNINSTALLABLE_MODULE
###########################################################

# If nobody has defined a more specific module for the
# checked modules, use LOCAL_BUILT_MODULE. This was old
# behavior, so it should be a safe default.
# checked modules, use LOCAL_BUILT_MODULE.
ifndef LOCAL_CHECKED_MODULE
ifndef LOCAL_SDK_VERSION
LOCAL_CHECKED_MODULE := $(LOCAL_BUILT_MODULE)
endif
LOCAL_CHECKED_MODULE := $(LOCAL_BUILT_MODULE)
endif

need_compile_java :=
ifdef java_alternative_checked_module
ifneq (,$(strip $(all_java_sources)$(full_static_java_libs))$(filter true,$(LOCAL_SOURCE_FILES_ALL_GENERATED)))
need_compile_java := true
LOCAL_CHECKED_MODULE := $(java_alternative_checked_module)
endif
endif

# If they request that this module not be checked, then don't.
Expand Down Expand Up @@ -582,17 +607,41 @@ ALL_MODULE_TAGS := $(sort $(ALL_MODULE_TAGS) $(LOCAL_MODULE_TAGS))
# it will default to recursive expansion.
$(foreach tag,$(LOCAL_MODULE_TAGS),\
$(eval ALL_MODULE_TAGS.$(tag) := \
$(ALL_MODULE_TAGS.$(tag)) \
$(LOCAL_INSTALLED_MODULE)))
$(ALL_MODULE_TAGS.$(tag)) \
$(LOCAL_INSTALLED_MODULE)))

# Add this module name to the tag list of each specified tag.
$(foreach tag,$(LOCAL_MODULE_TAGS),\
$(eval ALL_MODULE_NAME_TAGS.$(tag) += $(LOCAL_MODULE)))

###########################################################
## umbrella targets used to verify builds
###########################################################
j_or_n :=
ifneq (,$(filter EXECUTABLES SHARED_LIBRARIES STATIC_LIBRARIES,$(LOCAL_MODULE_CLASS)))
j_or_n := native
else
ifneq (,$(filter JAVA_LIBRARIES APPS,$(LOCAL_MODULE_CLASS)))
j_or_n := java
endif
endif
ifdef LOCAL_IS_HOST_MODULE
h_or_t := host
else
h_or_t := target
endif

ifdef j_or_n
$(j_or_n) $(h_or_t) $(j_or_n)-$(h_or_t) : $(LOCAL_CHECKED_MODULE)
ifneq (,$(filter $(LOCAL_MODULE_TAGS),tests))
$(j_or_n)-$(h_or_t)-tests $(j_or_n)-tests $(h_or_t)-tests : $(LOCAL_CHECKED_MODULE)
endif
endif

###########################################################
## NOTICE files
###########################################################

include $(BUILD_SYSTEM)/notice_files.mk
include $(BUILD_NOTICE_FILE)

#:vi noexpandtab
Loading

0 comments on commit c640254

Please sign in to comment.