diff --git a/libc/Android.mk b/libc/Android.mk index e710afb20..fca9a3fa1 100644 --- a/libc/Android.mk +++ b/libc/Android.mk @@ -2,6 +2,11 @@ LOCAL_PATH:= $(call my-dir) include $(LOCAL_PATH)/arch-$(TARGET_ARCH)/syscalls.mk +# Make everything depend on any changes to included makefiles. +libc_common_additional_dependencies := \ + $(LOCAL_PATH)/arch-$(TARGET_ARCH)/syscalls.mk \ + $(LOCAL_PATH)/Android.mk \ + # Define the common source files for all the libc instances # ========================================================= libc_common_src_files := \ @@ -538,12 +543,17 @@ _LIBC_ARCH_COMMON_SRC_FILES := _LIBC_ARCH_CPU_VARIANT_SRC_FILES := _LIBC_ARCH_STATIC_SRC_FILES := _LIBC_ARCH_DYNAMIC_SRC_FILES := -include bionic/libc/arch-$(TARGET_ARCH)/$(TARGET_ARCH).mk +_LIBC_ARCH_ADDITIONAL_DEPENDENCIES := + +libc_common_additional_dependencies += \ + $(LOCAL_PATH)/arch-$(TARGET_ARCH)/$(TARGET_ARCH).mk +include $(LOCAL_PATH)/arch-$(TARGET_ARCH)/$(TARGET_ARCH).mk libc_common_src_files += $(_LIBC_ARCH_COMMON_SRC_FILES) libc_common_src_files += $(_LIBC_ARCH_CPU_VARIANT_SRC_FILES) libc_arch_static_src_files := $(_LIBC_ARCH_STATIC_SRC_FILES) libc_arch_dynamic_src_files := $(_LIBC_ARCH_DYNAMIC_SRC_FILES) +libc_common_additional_dependencies += $(_LIBC_ARCH_ADDITIONAL_DEPENDENCIES) # Define some common cflags # ======================================================== @@ -770,7 +780,7 @@ LOCAL_CONLYFLAGS := $(libc_common_conlyflags) LOCAL_CPPFLAGS := $(libc_common_cppflags) LOCAL_C_INCLUDES := $(libc_common_c_includes) LOCAL_MODULE := libbionic_ssp -LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk +LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) LOCAL_SYSTEM_SHARED_LIBRARIES := include $(BUILD_STATIC_LIBRARY) @@ -793,7 +803,7 @@ LOCAL_CONLYFLAGS := $(libc_common_conlyflags) LOCAL_CPPFLAGS := $(libc_common_cppflags) LOCAL_C_INCLUDES := $(libc_common_c_includes) LOCAL_MODULE := libc_tzcode -LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk +LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) LOCAL_SYSTEM_SHARED_LIBRARIES := include $(BUILD_STATIC_LIBRARY) @@ -818,7 +828,7 @@ LOCAL_CONLYFLAGS := $(libc_common_conlyflags) LOCAL_CPPFLAGS := $(libc_common_cppflags) LOCAL_C_INCLUDES := $(libc_common_c_includes) LOCAL_MODULE := libc_freebsd -LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk +LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) LOCAL_SYSTEM_SHARED_LIBRARIES := include $(BUILD_STATIC_LIBRARY) @@ -843,7 +853,7 @@ LOCAL_CONLYFLAGS := $(libc_common_conlyflags) LOCAL_CPPFLAGS := $(libc_common_cppflags) LOCAL_C_INCLUDES := $(libc_common_c_includes) LOCAL_MODULE := libc_netbsd -LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk +LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) LOCAL_SYSTEM_SHARED_LIBRARIES := include $(BUILD_STATIC_LIBRARY) @@ -861,7 +871,7 @@ LOCAL_CONLYFLAGS := $(libc_common_conlyflags) LOCAL_CPPFLAGS := $(libc_common_cppflags) LOCAL_C_INCLUDES := $(libc_common_c_includes) LOCAL_MODULE := libc_bionic -LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk +LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) LOCAL_SYSTEM_SHARED_LIBRARIES := include $(BUILD_STATIC_LIBRARY) @@ -880,7 +890,7 @@ LOCAL_CONLYFLAGS := $(libc_common_conlyflags) LOCAL_CPPFLAGS := $(libc_common_cppflags) LOCAL_C_INCLUDES := $(libc_common_c_includes) LOCAL_MODULE := libc_common -LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk +LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) LOCAL_WHOLE_STATIC_LIBRARIES := \ libbionic_ssp \ libc_bionic \ @@ -919,7 +929,7 @@ LOCAL_CONLYFLAGS := $(libc_common_conlyflags) LOCAL_CPPFLAGS := $(libc_common_cppflags) LOCAL_MODULE := libc_nomalloc -LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk +LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) LOCAL_WHOLE_STATIC_LIBRARIES := libc_common LOCAL_SYSTEM_SHARED_LIBRARIES := @@ -944,7 +954,7 @@ LOCAL_CONLYFLAGS := $(libc_common_conlyflags) LOCAL_CPPFLAGS := $(libc_common_cppflags) LOCAL_C_INCLUDES := $(libc_common_c_includes) LOCAL_MODULE := libc -LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk +LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) LOCAL_WHOLE_STATIC_LIBRARIES := libc_common LOCAL_SYSTEM_SHARED_LIBRARIES := @@ -987,7 +997,7 @@ ifeq ($(TARGET_ARCH),arm) endif LOCAL_MODULE:= libc -LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk +LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) LOCAL_REQUIRED_MODULES := tzdata # WARNING: The only library libc.so should depend on is libdl.so! If you add other libraries, @@ -1033,7 +1043,7 @@ LOCAL_SRC_FILES := \ bionic/malloc_debug_check.cpp \ LOCAL_MODULE:= libc_malloc_debug_leak -LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk +LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) LOCAL_SHARED_LIBRARIES := libc libdl LOCAL_WHOLE_STATIC_LIBRARIES := libc_common @@ -1063,7 +1073,7 @@ LOCAL_SRC_FILES := \ bionic/malloc_debug_qemu.cpp LOCAL_MODULE:= libc_malloc_debug_qemu -LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk +LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) LOCAL_SHARED_LIBRARIES := libc libdl LOCAL_WHOLE_STATIC_LIBRARIES := libc_common diff --git a/libc/arch-arm/arm.mk b/libc/arch-arm/arm.mk index 5f2443f9a..da54cb829 100644 --- a/libc/arch-arm/arm.mk +++ b/libc/arch-arm/arm.mk @@ -42,4 +42,6 @@ ifeq ($(strip $(wildcard bionic/libc/arch-arm/$(TARGET_CPU_VARIANT)/$(TARGET_CPU $(error "TARGET_CPU_VARIANT not set or set to an unknown value. Possible values are cortex-a7, cortex-a8, cortex-a9, cortex-a15, krait. Use generic for devices that do not have a CPU similar to any of the supported cpu variants.") endif -include bionic/libc/arch-arm/$(TARGET_CPU_VARIANT)/$(TARGET_CPU_VARIANT).mk +_LIBC_ARCH_ADDITIONAL_DEPENDENCIES := \ + $(LOCAL_PATH)/arch-arm/$(TARGET_CPU_VARIANT)/$(TARGET_CPU_VARIANT).mk +include $(LOCAL_PATH)/arch-arm/$(TARGET_CPU_VARIANT)/$(TARGET_CPU_VARIANT).mk