summaryrefslogtreecommitdiffstats
path: root/core/host_java_library_common.mk
diff options
context:
space:
mode:
authorYohann Roussel <yroussel@google.com>2015-02-05 16:10:58 +0100
committerYohann Roussel <yroussel@google.com>2015-02-18 22:54:18 +0100
commitd2a76c14bf60f45a4bf19721a09a10f758c42a66 (patch)
treece76a61becd8d1050f6ad4c02350f703565cab5b /core/host_java_library_common.mk
parent1f382fa4f79dad8be5a7c32ed2a14a65003e661b (diff)
downloadbuild-d2a76c14bf60f45a4bf19721a09a10f758c42a66.zip
build-d2a76c14bf60f45a4bf19721a09a10f758c42a66.tar.gz
build-d2a76c14bf60f45a4bf19721a09a10f758c42a66.tar.bz2
Change built module of static java libraries
Set LOCAL_BUILT_MODULE of static java libraries when Jack is enabled to classes.jack instead of javalib.jar. This allows that running mm in those libraries will build classes.jack instead of the jar. Change-Id: I96b4b227848e971df96331b3f0cc731e856be349
Diffstat (limited to 'core/host_java_library_common.mk')
-rw-r--r--core/host_java_library_common.mk19
1 files changed, 16 insertions, 3 deletions
diff --git a/core/host_java_library_common.mk b/core/host_java_library_common.mk
index cd9e679..d077634 100644
--- a/core/host_java_library_common.mk
+++ b/core/host_java_library_common.mk
@@ -23,6 +23,22 @@ LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
LOCAL_IS_HOST_MODULE := true
LOCAL_BUILT_MODULE_STEM := javalib.jar
+intermediates := $(call local-intermediates-dir)
+intermediates.COMMON := $(call local-intermediates-dir,COMMON)
+
+built_javalib_jar := $(intermediates)/javalib.jar
+
+#################################
+include $(BUILD_SYSTEM)/configure_local_jack.mk
+#################################
+
+ifdef LOCAL_JACK_ENABLED
+ifdef LOCAL_IS_STATIC_JAVA_LIBRARY
+LOCAL_BUILT_MODULE_STEM := classes.jack
+LOCAL_INTERMEDIATE_TARGETS += $(built_javalib_jar)
+endif
+endif
+
# base_rules.mk looks at this
all_res_assets :=
@@ -39,9 +55,6 @@ else
endif
endif
-intermediates := $(call local-intermediates-dir)
-intermediates.COMMON := $(call local-intermediates-dir,COMMON)
-
LOCAL_INTERMEDIATE_SOURCE_DIR := $(intermediates.COMMON)/src
LOCAL_JAVA_LIBRARIES := $(sort $(LOCAL_JAVA_LIBRARIES))