Support LOCAL_ACP_UNAVAILABLE for prebuilts
Files built by soong will be installed using BUILD_PREBUILT, and may
include prerequesites of the acp binary. Allow specifying
LOCAL_ACP_UNAVAILABLE:=true on prebuilts.
Change-Id: Iccfe61092f90b61f397a45f5334b0c1c0f439b32
diff --git a/core/prebuilt_internal.mk b/core/prebuilt_internal.mk
index 3af7101..da76eb9 100644
--- a/core/prebuilt_internal.mk
+++ b/core/prebuilt_internal.mk
@@ -275,8 +275,13 @@
$(built_module) : $(my_prebuilt_src_file)
$(transform-prebuilt-to-target-strip-comments)
else
+ifneq ($(LOCAL_ACP_UNAVAILABLE),true)
$(built_module) : $(my_prebuilt_src_file) | $(ACP)
$(transform-prebuilt-to-target)
+else
+$(built_module) : $(my_prebuilt_src_file)
+ $(copy-file-to-target-with-cp)
+endif
endif
endif # LOCAL_MODULE_CLASS != APPS