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
This commit is contained in:
parent
59dc65a28a
commit
8c556594bf
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue