diff options
author | Ying Wang <wangying@google.com> | 2014-05-28 16:17:09 -0700 |
---|---|---|
committer | Ying Wang <wangying@google.com> | 2014-05-28 16:17:09 -0700 |
commit | 81ab8339feea95db1caaaa57cc8b3bfa0852dc26 (patch) | |
tree | 02d6adf674ea9bc0d5a74b124d42f0ab82d424dc | |
parent | 5186dac02bc1999c2e34445ccd24406d3653b0c8 (diff) | |
download | build-81ab8339feea95db1caaaa57cc8b3bfa0852dc26.tar.gz |
Add a dummy build recipe for generated RS cpp files.
Previously the RS cpp files are generated by the timestamp rule. Though
we have the generated RS cpp files depend on the timestamp file, we
don't have a build recipe. In such case gmake does some "optimization"
that it skip recompiling the generated cpp files, because it assumes the
generated cpp files are already up to date even if the rs files have
been updated.
Bug: 15313144
Change-Id: Ie69ecd2c788057d3619f9c7d2a125d44c4a534a1
-rw-r--r-- | core/binary.mk | 4 | ||||
-rw-r--r-- | core/definitions.mk | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/core/binary.mk b/core/binary.mk index f2ae0f58ed..45ab0c00c5 100644 --- a/core/binary.mk +++ b/core/binary.mk @@ -425,6 +425,8 @@ rs_generated_cpps := $(addprefix \ $(notdir $(renderscript_sources))))) $(rs_generated_cpps) : $(RenderScript_file_stamp) + # This is just a dummy rule to make sure gmake doesn't skip updating the dependents. + @echo "Updated RS generated cpp file $@." my_c_includes += $(renderscript_intermediate) my_generated_sources += $(rs_generated_cpps) @@ -473,7 +475,7 @@ $(proto_generated_cc_sources): $(proto_generated_cc_sources_dir)/%.pb.cc: %.prot $(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 $<." + @echo "Updated header file $@." $(my_prefix)_$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)_proto_defined := true endif # transform-proto-to-cc rule included only once diff --git a/core/definitions.mk b/core/definitions.mk index e35d36fec5..dcc5b39e89 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -903,7 +903,7 @@ $(hide) $(PRIVATE_RS_CC) \ -a $@ -MD \ -reflect-c++ \ $(PRIVATE_RS_FLAGS) \ - $(foreach inc,$(PRIVATE_RS_INCLUDES),$(addprefix -I , $(inc))) \ + $(addprefix -I , $(PRIVATE_RS_INCLUDES)) \ $(PRIVATE_RS_SOURCE_FILES) $(hide) mkdir -p $(dir $@) $(hide) touch $@ |