diff options
author | Craig Tiller <ctiller@google.com> | 2015-01-15 09:09:12 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-01-15 09:09:12 -0800 |
commit | f58b9ef68124134eb8ed122a6087c2ef14bb22c0 (patch) | |
tree | e8cfc11655d4070133931f81aefbf572912047b6 /templates/Makefile.template | |
parent | f0afe50dc925b6596d552381046e7a41d8b9b949 (diff) |
Remove protoc_plugins, and use a variable.
Files that have dependencies on phony targets are always remade, leading
to much unnecessary compiling of the C++ tests.
Diffstat (limited to 'templates/Makefile.template')
-rw-r--r-- | templates/Makefile.template | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/templates/Makefile.template b/templates/Makefile.template index bd49f5a24d..8cd3805a2e 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -219,6 +219,13 @@ endif .SECONDARY = %.pb.h %.pb.cc +PROTOC_PLUGINS=\ +% for tgt in targets: +% if tgt.build == 'protoc': + bins/$(CONFIG)/${tgt.name}\ +% endif +% endfor + ifeq ($(DEP_MISSING),) all: static shared\ % for tgt in targets: @@ -394,14 +401,6 @@ tools: privatelibs\ % endfor -protoc_plugins:\ -% for tgt in targets: -% if tgt.build == 'protoc': - bins/$(CONFIG)/${tgt.name}\ -% endif -% endfor - - buildbenchmarks: privatelibs\ % for tgt in targets: % if tgt.build == 'benchmark': @@ -459,7 +458,7 @@ strip-shared_cxx: shared_cxx % endfor % for p in protos: -gens/${p}.pb.cc: ${p}.proto protoc_plugins +gens/${p}.pb.cc: ${p}.proto $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --cpp_out=gens --grpc_out=gens --plugin=protoc-gen-grpc=bins/$(CONFIG)/cpp_plugin $< |