From d358f826e779b9ee340d2d2faea433c8a3d0f2d3 Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Thu, 15 Oct 2015 15:29:01 -0700 Subject: [PATCH] Use direct dependency on the JNI so files. With the order-only dependency if the jni so files is updated, make won't rebuild the system.img, which has dependency only on the apk file. Bug: 24865400 Change-Id: I9d5bee82b8a712a2c24dabaa0cd4c50174ea219f --- core/install_jni_libs_internal.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/install_jni_libs_internal.mk b/core/install_jni_libs_internal.mk index 16d0962bd..27b9697e0 100644 --- a/core/install_jni_libs_internal.mk +++ b/core/install_jni_libs_internal.mk @@ -55,7 +55,8 @@ ifneq ($(my_jni_shared_libraries),) my_jni_filenames := $(notdir $(my_jni_shared_libraries)) # Make sure the JNI libraries get installed my_shared_library_path := $($(my_2nd_arch_prefix)TARGET_OUT$(partition_tag)_SHARED_LIBRARIES) -$(LOCAL_INSTALLED_MODULE) : | $(addprefix $(my_shared_library_path)/, $(my_jni_filenames)) +# Do not use order-only dependency, because we want to rebuild the image if an jni is updated. +$(LOCAL_INSTALLED_MODULE) : $(addprefix $(my_shared_library_path)/, $(my_jni_filenames)) # Create symlink in the app specific lib path ifdef LOCAL_POST_INSTALL_CMD @@ -93,7 +94,7 @@ else # not my_embed_jni $(foreach lib, $(my_prebuilt_jni_libs), \ $(eval $(call copy-one-file, $(lib), $(my_app_lib_path)/$(notdir $(lib))))) -$(LOCAL_INSTALLED_MODULE) : | $(addprefix $(my_app_lib_path)/, $(notdir $(my_prebuilt_jni_libs))) +$(LOCAL_INSTALLED_MODULE) : $(addprefix $(my_app_lib_path)/, $(notdir $(my_prebuilt_jni_libs))) endif # my_embed_jni endif # inner my_prebuilt_jni_libs endif # outer my_prebuilt_jni_libs