OSDN Git Service

Harden dependency on generated sources.
authorYing Wang <wangying@google.com>
Fri, 6 May 2016 03:02:08 +0000 (20:02 -0700)
committerYing Wang <wangying@google.com>
Fri, 6 May 2016 20:55:47 +0000 (13:55 -0700)
commitbb37c657aee057b6d5b63dcc1d10c11cad6ec032
tree9a53db601418f7c55f5f880ec324c9b71336f4c6
parent430fed0675da47f3cbccb9f7995fcb0047c82cff
Harden dependency on generated sources.

Previously if a library has custom generated headers in
LOCAL_GENERATED_SOURCES and export its include path with
LOCAL_EXPORT_C_INCLUDE_DIRS, there is almost no way for the users of the
library to set up dependency of their object files on the generated
headers.
This change makes the generated sources dependency of the library's
export_includes, which is guaranteed generated before client code gets
compiled.

Also we added proto-generated cpp files to my_generated_sources so that
we can deal solely with $(my_generated_sources). Because many
Android.mks assume the generted .pb.hs are in $(generated_sources_dir)
instead of $(intermediates), we have to generate the source files in
$(generated_sources_dir) and make a copy in $(intermediates).

Bug: 28622149
Change-Id: I73b21443fa706f3735faf16356ed8c08fbfecca6
(Cherry-pick from commit 05f9f358363da66a51ebcba57409116dfa9e3a53)
core/binary.mk
core/definitions.mk