summaryrefslogtreecommitdiffstats
path: root/core/base_rules.mk
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2014-07-19 17:00:50 -0700
committerYing Wang <wangying@google.com>2014-07-19 17:00:50 -0700
commitefb935800bce97abe0938270ba4c9cd3af6fb7b9 (patch)
treefbce59b895518f4815a7c17e28d4e382fc268c48 /core/base_rules.mk
parent50367cc77db4f576f6e7421e6b302395d202482e (diff)
downloadbuild-efb935800bce97abe0938270ba4c9cd3af6fb7b9.zip
build-efb935800bce97abe0938270ba4c9cd3af6fb7b9.tar.gz
build-efb935800bce97abe0938270ba4c9cd3af6fb7b9.tar.bz2
Support "LOCAL_SDK_VERSION := system_current"
A module can declare "LOCAL_SDK_VERSION := system_current" to build against the android system stubs generated from source. For now this is only supported in platform build. Change-Id: I1e9bbd159886bc0ea3a02b1dc4cbcb1a56e9cb15
Diffstat (limited to 'core/base_rules.mk')
-rw-r--r--core/base_rules.mk8
1 files changed, 5 insertions, 3 deletions
diff --git a/core/base_rules.mk b/core/base_rules.mk
index 2984d9d..f40eae7 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -207,12 +207,12 @@ aidl_sources := $(addprefix $(TOP_DIR)$(LOCAL_PATH)/, $(aidl_sources))
aidl_preprocess_import :=
LOCAL_SDK_VERSION:=$(strip $(LOCAL_SDK_VERSION))
ifdef LOCAL_SDK_VERSION
-ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),current)
+ifneq ($(filter current system_current, $(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS)),)
# LOCAL_SDK_VERSION is current and no TARGET_BUILD_APPS
aidl_preprocess_import := $(TARGET_OUT_COMMON_INTERMEDIATES)/framework.aidl
else
aidl_preprocess_import := $(HISTORICAL_SDK_VERSIONS_ROOT)/$(LOCAL_SDK_VERSION)/framework.aidl
-endif # !current
+endif # not current or system_current
else
# build against the platform.
LOCAL_AIDL_INCLUDES += $(FRAMEWORKS_BASE_JAVA_SRC_DIRS)
@@ -395,9 +395,11 @@ else
ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),current)
# LOCAL_SDK_VERSION is current and no TARGET_BUILD_APPS.
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := -bootclasspath $(call java-lib-files,android_stubs_current)
+else ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),system_current)
+$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := -bootclasspath $(call java-lib-files,android_system_stubs_current)
else
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := -bootclasspath $(call java-lib-files,sdk_v$(LOCAL_SDK_VERSION))
-endif # current
+endif # current or system_current
endif # LOCAL_SDK_VERSION
endif # TARGET_
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_RESOURCE_DIR := $(LOCAL_RESOURCE_DIR)