From d4e2afc9735470c5b9553073a23e606b2fc5cf2c Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Wed, 8 Jul 2020 19:25:49 +0200 Subject: Android.mk: remove deprecated LOCAL_COPY_HEADERS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Android "Build System Best Practices" document[1] states: "LOCAL_COPY_HEADERS is deprecated. Soong modules cannot use these headers, and when the VNDK is enabled, System modules in Make cannot declare or use them either." and: "Don't use non-local paths in your LOCAL_EXPORT_C_INCLUDE_DIRS, [...]. Non-local exported include dirs are not supported in Soong." And having both VNDK enabled and LOCAL_COPY_HEADERS does prevent the build on Replicant 10. LOCAL_COPY_HEADERS was kept for compatibility reasons in the fear that not removing it would potentially break older Replicant versions like Replicant 4.2 which are still needed in order to test libsamsung-ipc on devices that are not supported anymore by subsequent Replicant versions. However since: - LOCAL_EXPORT_C_INCLUDE_DIRS is also used in Replicant 4.2 and 6.0 as well - all devices currently supported by libsamsung-ipc are supported by one of these Replicant versions[2] it should be safe to remove all usage of LOCAL_COPY_HEADERS in Android. This change was tested at build time with the following configurations: - Replicant 10.0 with the i9300 target - Replicant 6.0 with the i9300 target - Replicant 4.2 with the galaxysmtd target References: ----------- [1]https://android.googlesource.com/platform/build/soong/+/master/docs/best_practices.md#headers [2]With the exception of the Galaxy Tab which was never supported by Replicant. Signed-off-by: Denis 'GNUtoo' Carikli Acked-by: Joonas Kylmälä --- Android.mk | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Android.mk b/Android.mk index 9fa2c7d..7fffb61 100644 --- a/Android.mk +++ b/Android.mk @@ -77,7 +77,7 @@ libsamsung_ipc_local_src_files := \ samsung-ipc/rfs.c \ samsung-ipc/gen.c -libsamsung_ipc_local_copy_headers := \ +libsamsung_ipc_local_export_headers := \ include/call.h \ include/disp.h \ include/gen.h \ @@ -98,7 +98,7 @@ libsamsung_ipc_local_copy_headers := \ include/svc.h \ local_export_c_include_dirs := \ - $(TARGET_OUT_HEADERS)/libsamsung-ipc + $(LOCAL_PATH)/include libsamsung_ipc_local_c_includes := \ $(LOCAL_PATH)/include \ @@ -130,10 +130,6 @@ LOCAL_C_INCLUDES := $(libsamsung_ipc_local_c_includes) LOCAL_CFLAGS := $(libsamsung_local_cflags) LOCAL_SHARED_LIBRARIES := $(libsamsung_ipc_local_shared_libraries) - -LOCAL_COPY_HEADERS_TO := libsamsung-ipc -LOCAL_COPY_HEADERS := $(libsamsung_ipc_local_copy_headers) - LOCAL_EXPORT_C_INCLUDE_DIRS := $(local_export_c_include_dirs) include $(BUILD_STATIC_LIBRARY) @@ -152,7 +148,6 @@ LOCAL_C_INCLUDES := $(libsamsung_ipc_local_c_includes) LOCAL_CFLAGS := $(libsamsung_local_cflags) LOCAL_SHARED_LIBRARIES := $(libsamsung_ipc_local_shared_libraries) - LOCAL_EXPORT_C_INCLUDE_DIRS := $(local_export_c_include_dirs) include $(BUILD_SHARED_LIBRARY) -- cgit v1.2.3