From 383ecfaf023dab1fcab25d97548093e32ef1a564 Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Mon, 3 Dec 2012 18:24:55 -0800 Subject: [PATCH] DO NOT MERGE: Support LOCAL_EXPORT_C_INCLUDE_DIRS for prebuilts too Cherry picked from commit fe3f62d06b77888cddf0365a40b20835eeac221f in master. Since this is already in master, and we're upstream, set to DO NOT MERGE. Change-Id: I09e8e849f642792e3a74e2564820ab9bbf1eb28c Signed-off-by: Mike J. Chen --- core/prebuilt.mk | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/core/prebuilt.mk b/core/prebuilt.mk index f59a17b1d..31ea0e07d 100644 --- a/core/prebuilt.mk +++ b/core/prebuilt.mk @@ -59,10 +59,18 @@ else built_module := $(LOCAL_BUILT_MODULE) ifdef prebuilt_module_is_a_library -# Create a dummy export_includes. -$(intermediates)/export_includes: +export_includes := $(intermediates)/export_includes +$(export_includes): PRIVATE_EXPORT_C_INCLUDE_DIRS := $(LOCAL_EXPORT_C_INCLUDE_DIRS) +$(export_includes) : $(LOCAL_MODULE_MAKEFILE) + @echo Export includes file: $< -- $@ $(hide) mkdir -p $(dir $@) && rm -f $@ +ifdef LOCAL_EXPORT_C_INCLUDE_DIRS + $(hide) for d in $(PRIVATE_EXPORT_C_INCLUDE_DIRS); do \ + echo "-I $$d" >> $@; \ + done +else $(hide) touch $@ +endif $(LOCAL_BUILT_MODULE) : | $(intermediates)/export_includes endif -- 2.11.0