diff options
author | Ying Wang <wangying@google.com> | 2012-05-10 17:25:51 -0700 |
---|---|---|
committer | Ying Wang <wangying@google.com> | 2012-05-10 17:40:49 -0700 |
commit | 0ec188f1c197709cf61d0de647b5220539b97322 (patch) | |
tree | 03c6d5786e327b7a7c2e835d1c0221e8ee5309e8 /core | |
parent | 0c5db81fb28f74491e7f17c6c81ae0b19342ca7c (diff) | |
download | build-0ec188f1c197709cf61d0de647b5220539b97322.zip build-0ec188f1c197709cf61d0de647b5220539b97322.tar.gz build-0ec188f1c197709cf61d0de647b5220539b97322.tar.bz2 |
Support to build against prebuilt current SDK in unbundled branch
Bug: 6465084
With this change and prebuilt current SDK checked in, you can build
unbundled apps with LOCAL_SDK_VERSION current in an unbundled branch.
Change-Id: I4efcee611d08a3a903bd6bf5a80de11500564206
Diffstat (limited to 'core')
-rw-r--r-- | core/base_rules.mk | 6 | ||||
-rw-r--r-- | core/droiddoc.mk | 3 | ||||
-rw-r--r-- | core/java.mk | 6 | ||||
-rw-r--r-- | core/package.mk | 2 | ||||
-rw-r--r-- | core/static_java_library.mk | 2 |
5 files changed, 12 insertions, 7 deletions
diff --git a/core/base_rules.mk b/core/base_rules.mk index 38c2c10..249ecba 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -226,7 +226,8 @@ endif aidl_preprocess_import := LOCAL_SDK_VERSION:=$(strip $(LOCAL_SDK_VERSION)) ifdef LOCAL_SDK_VERSION -ifeq ($(LOCAL_SDK_VERSION),current) +ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),current) + # 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 @@ -399,7 +400,8 @@ ifeq ($(my_prefix),TARGET_) ifeq ($(LOCAL_SDK_VERSION),) $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := -bootclasspath $(call java-lib-files,core) else -ifeq ($(LOCAL_SDK_VERSION),current) +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 $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := -bootclasspath $(call java-lib-files,sdk_v$(LOCAL_SDK_VERSION)) diff --git a/core/droiddoc.mk b/core/droiddoc.mk index 47f599d..e312965 100644 --- a/core/droiddoc.mk +++ b/core/droiddoc.mk @@ -64,7 +64,8 @@ endif ifneq ($(LOCAL_IS_HOST_MODULE),true) ifneq ($(LOCAL_SDK_VERSION),) - ifeq ($(LOCAL_SDK_VERSION),current) + ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),current) + # Use android_stubs_current if LOCAL_SDK_VERSION is current and no TARGET_BUILD_APPS. LOCAL_JAVA_LIBRARIES := android_stubs_current $(LOCAL_JAVA_LIBRARIES) else LOCAL_JAVA_LIBRARIES := sdk_v$(LOCAL_SDK_VERSION) $(LOCAL_JAVA_LIBRARIES) diff --git a/core/java.mk b/core/java.mk index 4005ce3..7e4af79 100644 --- a/core/java.mk +++ b/core/java.mk @@ -28,7 +28,8 @@ ifneq ($(LOCAL_SDK_VERSION),) $(error $(LOCAL_PATH): Invalid LOCAL_SDK_VERSION '$(LOCAL_SDK_VERSION)' \ Choices are: $(TARGET_AVAILABLE_SDK_VERSIONS)) else - ifeq ($(LOCAL_SDK_VERSION),current) + ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),current) + # Use android_stubs_current if LOCAL_SDK_VERSION is current and no TARGET_BUILD_APPS. LOCAL_JAVA_LIBRARIES := android_stubs_current $(LOCAL_JAVA_LIBRARIES) else LOCAL_JAVA_LIBRARIES := sdk_v$(LOCAL_SDK_VERSION) $(LOCAL_JAVA_LIBRARIES) @@ -166,7 +167,8 @@ renderscript_flags := -Wall -Werror renderscript_flags += $(LOCAL_RENDERSCRIPT_FLAGS) # prepend the RenderScript system include path -ifneq ($(filter-out current,$(LOCAL_SDK_VERSION)),) +ifneq ($(filter-out current,$(LOCAL_SDK_VERSION))$(if $(TARGET_BUILD_APPS),$(filter current,$(LOCAL_SDK_VERSION))),) +# if a numeric LOCAL_SDK_VERSION, or current LOCAL_SDK_VERSION with TARGET_BUILD_APPS LOCAL_RENDERSCRIPT_INCLUDES := \ $(HISTORICAL_SDK_VERSIONS_ROOT)/renderscript/clang-include \ $(HISTORICAL_SDK_VERSIONS_ROOT)/renderscript/include \ diff --git a/core/package.mk b/core/package.mk index def715f..195b346 100644 --- a/core/package.mk +++ b/core/package.mk @@ -267,7 +267,7 @@ else # Most packages should link against the resources defined by framework-res. # Even if they don't have their own resources, they may use framework # resources. -ifneq ($(filter-out current,$(LOCAL_SDK_RES_VERSION)),) +ifneq ($(filter-out current,$(LOCAL_SDK_RES_VERSION))$(if $(TARGET_BUILD_APPS),$(filter current,$(LOCAL_SDK_RES_VERSION))),) # for released sdk versions, the platform resources were built into android.jar. framework_res_package_export := \ $(HISTORICAL_SDK_VERSIONS_ROOT)/$(LOCAL_SDK_RES_VERSION)/android.jar diff --git a/core/static_java_library.mk b/core/static_java_library.mk index 9165050..367ea5f 100644 --- a/core/static_java_library.mk +++ b/core/static_java_library.mk @@ -64,7 +64,7 @@ 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)),) +ifneq ($(filter-out current,$(LOCAL_SDK_RES_VERSION))$(if $(TARGET_BUILD_APPS),$(filter 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) |