summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2014-02-13 18:04:00 -0800
committerYing Wang <wangying@google.com>2014-05-28 16:15:13 -0700
commit5186dac02bc1999c2e34445ccd24406d3653b0c8 (patch)
treec8599e081f2aeddef574030cf9edf1e4f4b4fe5a /core
parentf4999d3b8a0d09e790767176c543df1c2ad53c5a (diff)
downloadbuild-5186dac02bc1999c2e34445ccd24406d3653b0c8.zip
build-5186dac02bc1999c2e34445ccd24406d3653b0c8.tar.gz
build-5186dac02bc1999c2e34445ccd24406d3653b0c8.tar.bz2
Add a dummy build recipe for the proto generated header files
This fixed issue that gnumake skip updating the cpp file that includes the generated header file when the .proto file gets updated. For example: Say a.cc includes b.pb.h, since b.pb.h is just byproduct of the rule that generates b.pb.cc, and though we have dependency "b.pb.h : b.pb.cc", but we don't have build recipe for that rule. Gmake stupidly thinks that b.pb.h must not be updated in that case so it skips all targets that depends on b.pb.h! With the dumy build recipe, gmake now doesn't skip the depedent targets. Bug: 13009798 Change-Id: I39adc09b7656bdd023f578fb8933667944fd974c
Diffstat (limited to 'core')
-rw-r--r--core/binary.mk2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/binary.mk b/core/binary.mk
index bee4428..f2ae0f5 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -472,6 +472,8 @@ $(proto_generated_cc_sources): $(proto_generated_cc_sources_dir)/%.pb.cc: %.prot
$(transform-proto-to-cc)
$(proto_generated_headers): $(proto_generated_cc_sources_dir)/%.pb.h: $(proto_generated_cc_sources_dir)/%.pb.cc
+ # This is just a dummy rule to make sure gmake doesn't skip updating the dependents.
+ @echo "Updated header file $<."
$(my_prefix)_$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)_proto_defined := true
endif # transform-proto-to-cc rule included only once