From 68f1c77a8db3ee6f92194cbaeeb1bf559bb79afd Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Mon, 23 Apr 2012 21:29:18 -0700 Subject: [PATCH] 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 --- core/binary.mk | 2 +- core/definitions.mk | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/binary.mk b/core/binary.mk index 70af9b9da4..04ac90b72a 100644 --- a/core/binary.mk +++ b/core/binary.mk @@ -692,7 +692,7 @@ $(LOCAL_INSTALLED_MODULE): | $(installed_static_library_notice_file_targets) ########################################################### 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 diff --git a/core/definitions.mk b/core/definitions.mk index 6bf3daadfd..9943d5ff85 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -113,11 +113,11 @@ endef # Figure out where we are. define my-dir $(strip \ - $(eval md_file_ := $$(lastword $$(MAKEFILE_LIST))) \ - $(if $(filter $(CLEAR_VARS),$(md_file_)), \ + $(eval LOCAL_MODULE_MAKEFILE := $$(lastword $$(MAKEFILE_LIST))) \ + $(if $(filter $(CLEAR_VARS),$(LOCAL_MODULE_MAKEFILE)), \ $(error LOCAL_PATH must be set before including $$(CLEAR_VARS)) \ , \ - $(patsubst %/,%,$(dir $(md_file_))) \ + $(patsubst %/,%,$(dir $(LOCAL_MODULE_MAKEFILE))) \ ) \ ) endef