diff options
author | Ying Wang <wangying@google.com> | 2014-02-13 18:04:00 -0800 |
---|---|---|
committer | Ying Wang <wangying@google.com> | 2014-02-13 18:04:00 -0800 |
commit | 8c556594bfa6db9089b2ad30b9400f94eb537e20 (patch) | |
tree | da7211897b09a098c8d3e621c7bfc112ea89b94e | |
parent | 59dc65a28a6e33e518006ec6c7edaa1971a1c2a7 (diff) | |
download | build-8c556594bfa6db9089b2ad30b9400f94eb537e20.zip build-8c556594bfa6db9089b2ad30b9400f94eb537e20.tar.gz build-8c556594bfa6db9089b2ad30b9400f94eb537e20.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
-rw-r--r-- | core/binary.mk | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/binary.mk b/core/binary.mk index bbdf4d2..f4a7eae 100644 --- a/core/binary.mk +++ b/core/binary.mk @@ -411,6 +411,8 @@ $(proto_generated_cc_sources): $(proto_generated_cc_sources_dir)/%.pb.cc: %.prot proto_generated_headers := $(patsubst %.pb.cc,%.pb.h, $(proto_generated_cc_sources)) $(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 $<." $(proto_generated_objects): PRIVATE_ARM_MODE := $(normal_objects_mode) $(proto_generated_objects): PRIVATE_ARM_CFLAGS := $(normal_objects_cflags) |