Make export_includes depend on the module's definition makefile.
Bug: 6383397
Note that LOCAL_MODULE_MAKEFILE is calculated in the macro my-dir,
which must be called at the beginning of your Android.mk to calculate
LOCAL_PATH.
Change-Id: I7aa079e37253fbda25ffb85c2e5bbf0663340e27
diff --git a/core/binary.mk b/core/binary.mk
index 70af9b9..04ac90b 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -692,7 +692,7 @@
###########################################################
export_includes := $(intermediates)/export_includes
$(export_includes): PRIVATE_EXPORT_C_INCLUDE_DIRS := $(LOCAL_EXPORT_C_INCLUDE_DIRS)
-$(export_includes) :
+$(export_includes) : $(LOCAL_MODULE_MAKEFILE)
@echo Export includes file: $< -- $@
$(hide) mkdir -p $(dir $@) && rm -f $@
ifdef LOCAL_EXPORT_C_INCLUDE_DIRS