Build system support to export include paths

Bug: 5573756
With this change, we can set LOCAL_EXPORT_C_INCLUDE_DIRS in the module
definition to export include dir paths.
Paths in LOCAL_EXPORT_C_INCLUDE_DIRS should be relative to the top dir
of the source tree.
If a library (shared or static) exports some include paths, any module
using it will import the include paths and add them to the compiler
command line.

Change-Id: I49aabc589d2cf214044d13ccd5532ef68209adf0
diff --git a/core/shared_library.mk b/core/shared_library.mk
index ca639eb..d715349 100644
--- a/core/shared_library.mk
+++ b/core/shared_library.mk
@@ -16,6 +16,9 @@
 ifneq ($(strip $(OVERRIDE_BUILT_MODULE_PATH)),)
 $(error $(LOCAL_PATH): Illegal use of OVERRIDE_BUILT_MODULE_PATH)
 endif
+ifneq ($(strip $(LOCAL_MODULE_STEM)$(LOCAL_BUILT_MODULE_STEM)),)
+$(error $(LOCAL_PATH): Can not set module stem for a library)
+endif
 
 # Put the built targets of all shared libraries in a common directory
 # to simplify the link line.