From bf4a8d306907010d782ef377fb7a7873d890ce03 Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Thu, 20 Feb 2014 13:54:43 -0800 Subject: [PATCH] Include $(BUILD_COPY_HEADERS) in upper-level makefiles This makes sure copy_headers.mk only be included onces, no matter it's for the 1st arch or the 2nd arch. Change-Id: I80a558fbdb52861f176bd27a21c302069a5cc3ce --- core/binary.mk | 6 ------ core/host_shared_library.mk | 5 +++++ core/host_static_library.mk | 5 +++++ core/shared_library.mk | 5 +++++ core/static_library.mk | 5 +++++ 5 files changed, 20 insertions(+), 6 deletions(-) diff --git a/core/binary.mk b/core/binary.mk index 2bfccf44a2..e22cd8419a 100644 --- a/core/binary.mk +++ b/core/binary.mk @@ -717,12 +717,6 @@ $(normal_objects) : | $(my_generated_sources) $(all_objects) : | $(import_includes) ALL_C_CPP_ETC_OBJECTS += $(all_objects) -########################################################### -## Copy headers to the install tree -########################################################### -ifndef LOCAL_2ND_ARCH_VAR_PREFIX -include $(BUILD_COPY_HEADERS) -endif ########################################################### # Standard library handling. diff --git a/core/host_shared_library.mk b/core/host_shared_library.mk index a29e14c2d7..a608251bfe 100644 --- a/core/host_shared_library.mk +++ b/core/host_shared_library.mk @@ -44,3 +44,8 @@ $(LOCAL_BUILT_MODULE): $(all_objects) $(all_libraries) $(LOCAL_ADDITIONAL_DEPEND $(transform-host-o-to-shared-lib) endif # skip_build_from_source + +########################################################### +## Copy headers to the install tree +########################################################### +include $(BUILD_COPY_HEADERS) diff --git a/core/host_static_library.mk b/core/host_static_library.mk index a533cf5ddf..7d9b3750f8 100644 --- a/core/host_static_library.mk +++ b/core/host_static_library.mk @@ -25,3 +25,8 @@ include $(BUILD_SYSTEM)/binary.mk $(LOCAL_BUILT_MODULE): $(built_whole_libraries) $(LOCAL_BUILT_MODULE): $(all_objects) $(transform-host-o-to-static-lib) + +########################################################### +## Copy headers to the install tree +########################################################### +include $(BUILD_COPY_HEADERS) diff --git a/core/shared_library.mk b/core/shared_library.mk index 25f6eb718d..87b60687f8 100644 --- a/core/shared_library.mk +++ b/core/shared_library.mk @@ -41,3 +41,8 @@ LOCAL_2ND_ARCH_VAR_PREFIX := endif # TARGET_2ND_ARCH my_module_arch_supported := + +########################################################### +## Copy headers to the install tree +########################################################### +include $(BUILD_COPY_HEADERS) diff --git a/core/static_library.mk b/core/static_library.mk index 329c6eee7a..d6e8d516e1 100644 --- a/core/static_library.mk +++ b/core/static_library.mk @@ -29,3 +29,8 @@ LOCAL_2ND_ARCH_VAR_PREFIX := endif # TARGET_2ND_ARCH my_module_arch_supported := + +########################################################### +## Copy headers to the install tree +########################################################### +include $(BUILD_COPY_HEADERS)