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
This commit is contained in:
Ying Wang 2014-05-28 16:17:09 -07:00
parent 5186dac02b
commit 81ab8339fe
2 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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 $@