OSDN Git Service

Add the FRAMEWORKS_BASE_JAVA_SRC_DIRS to aidl includes
authorYing Wang <wangying@google.com>
Wed, 2 Oct 2013 01:16:45 +0000 (18:16 -0700)
committerYing Wang <wangying@google.com>
Wed, 2 Oct 2013 01:16:45 +0000 (18:16 -0700)
only if the module is built against the platform, not the SDK.
Previously it added it if it's doing a platform build.
But we can do an apps_only build inside the platform source tree and
such a build may build modules against the platform.
This fixes the apps build in the platform source tree.

Change-Id: I73e32a8f0e505349790a102321f88e77fba472cd

core/base_rules.mk

index c892d94..36f36c1 100644 (file)
@@ -186,9 +186,6 @@ ifneq ($(strip $(aidl_sources)),)
 aidl_java_sources := $(patsubst %.aidl,%.java,$(addprefix $(intermediates.COMMON)/src/, $(aidl_sources)))
 aidl_sources := $(addprefix $(TOP_DIR)$(LOCAL_PATH)/, $(aidl_sources))
 
-ifeq (,$(TARGET_BUILD_APPS))
-LOCAL_AIDL_INCLUDES += $(FRAMEWORKS_BASE_JAVA_SRC_DIRS)
-endif
 aidl_preprocess_import :=
 LOCAL_SDK_VERSION:=$(strip $(LOCAL_SDK_VERSION))
 ifdef LOCAL_SDK_VERSION
@@ -198,6 +195,9 @@ ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),current)
 else
   aidl_preprocess_import := $(HISTORICAL_SDK_VERSIONS_ROOT)/$(LOCAL_SDK_VERSION)/framework.aidl
 endif # !current
+else
+# build against the platform.
+LOCAL_AIDL_INCLUDES += $(FRAMEWORKS_BASE_JAVA_SRC_DIRS)
 endif # LOCAL_SDK_VERSION
 $(aidl_java_sources): PRIVATE_AIDL_FLAGS := -b $(addprefix -p,$(aidl_preprocess_import)) -I$(LOCAL_PATH) -I$(LOCAL_PATH)/src $(addprefix -I,$(LOCAL_AIDL_INCLUDES))