From f74b7a5cd38a0d86bdf9fb763df4e5347708250f Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 6 Apr 2023 16:10:42 +0200 Subject: [PATCH] update Makefiles in C++ examples to accept protobuf 22.x+ as well --- examples/cpp/compression/Makefile | 8 ++++---- examples/cpp/helloworld/Makefile | 8 ++++---- examples/cpp/load_balancing/Makefile | 8 ++++---- examples/cpp/metadata/Makefile | 8 ++++---- examples/cpp/route_guide/Makefile | 8 ++++---- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/examples/cpp/compression/Makefile b/examples/cpp/compression/Makefile index 5286413289cf0..7e9994ccdb69e 100644 --- a/examples/cpp/compression/Makefile +++ b/examples/cpp/compression/Makefile @@ -60,7 +60,7 @@ clean: # They are by no means necessary to actually compile a grpc-enabled software. PROTOC_CMD = which $(PROTOC) -PROTOC_CHECK_CMD = $(PROTOC) --version | grep -q libprotoc.3 +PROTOC_CHECK_CMD = $(PROTOC) --version | grep -q 'libprotoc.3\|libprotoc [0-9][0-9]\.' PLUGIN_CHECK_CMD = which $(GRPC_CPP_PLUGIN) HAS_PROTOC = $(shell $(PROTOC_CMD) > /dev/null && echo true || echo false) ifeq ($(HAS_PROTOC),true) @@ -79,11 +79,11 @@ system-check: ifneq ($(HAS_VALID_PROTOC),true) @echo " DEPENDENCY ERROR" @echo - @echo "You don't have protoc 3.0.0 installed in your path." - @echo "Please install Google protocol buffers 3.0.0 and its compiler." + @echo "You don't have protoc 3.0.0 or newer installed in your path." + @echo "Please install an up-to-date version of Google protocol buffers." @echo "You can find it here:" @echo - @echo " https://github.com/protocolbuffers/protobuf/releases/tag/v3.0.0" + @echo " https://github.com/protocolbuffers/protobuf/releases" @echo @echo "Here is what I get when trying to evaluate your version of protoc:" @echo diff --git a/examples/cpp/helloworld/Makefile b/examples/cpp/helloworld/Makefile index f6296f060675f..50829c0026b06 100644 --- a/examples/cpp/helloworld/Makefile +++ b/examples/cpp/helloworld/Makefile @@ -87,7 +87,7 @@ clean: # They are by no means necessary to actually compile a grpc-enabled software. PROTOC_CMD = which $(PROTOC) -PROTOC_CHECK_CMD = $(PROTOC) --version | grep -q libprotoc.3 +PROTOC_CHECK_CMD = $(PROTOC) --version | grep -q 'libprotoc.3\|libprotoc [0-9][0-9]\.' PLUGIN_CHECK_CMD = which $(GRPC_CPP_PLUGIN) HAS_PROTOC = $(shell $(PROTOC_CMD) > /dev/null && echo true || echo false) ifeq ($(HAS_PROTOC),true) @@ -106,11 +106,11 @@ system-check: ifneq ($(HAS_VALID_PROTOC),true) @echo " DEPENDENCY ERROR" @echo - @echo "You don't have protoc 3.0.0 installed in your path." - @echo "Please install Google protocol buffers 3.0.0 and its compiler." + @echo "You don't have protoc 3.0.0 or newer installed in your path." + @echo "Please install an up-to-date version of Google protocol buffers." @echo "You can find it here:" @echo - @echo " https://github.com/protocolbuffers/protobuf/releases/tag/v3.0.0" + @echo " https://github.com/protocolbuffers/protobuf/releases" @echo @echo "Here is what I get when trying to evaluate your version of protoc:" @echo diff --git a/examples/cpp/load_balancing/Makefile b/examples/cpp/load_balancing/Makefile index 8254286ceba0b..2da6814b6593a 100644 --- a/examples/cpp/load_balancing/Makefile +++ b/examples/cpp/load_balancing/Makefile @@ -60,7 +60,7 @@ clean: # They are by no means necessary to actually compile a grpc-enabled software. PROTOC_CMD = which $(PROTOC) -PROTOC_CHECK_CMD = $(PROTOC) --version | grep -q libprotoc.3 +PROTOC_CHECK_CMD = $(PROTOC) --version | grep -q 'libprotoc.3\|libprotoc [0-9][0-9]\.' PLUGIN_CHECK_CMD = which $(GRPC_CPP_PLUGIN) HAS_PROTOC = $(shell $(PROTOC_CMD) > /dev/null && echo true || echo false) ifeq ($(HAS_PROTOC),true) @@ -79,11 +79,11 @@ system-check: ifneq ($(HAS_VALID_PROTOC),true) @echo " DEPENDENCY ERROR" @echo - @echo "You don't have protoc 3.0.0 installed in your path." - @echo "Please install Google protocol buffers 3.0.0 and its compiler." + @echo "You don't have protoc 3.0.0 or newer installed in your path." + @echo "Please install an up-to-date version of Google protocol buffers." @echo "You can find it here:" @echo - @echo " https://github.com/protocolbuffers/protobuf/releases/tag/v3.0.0" + @echo " https://github.com/protocolbuffers/protobuf/releases" @echo @echo "Here is what I get when trying to evaluate your version of protoc:" @echo diff --git a/examples/cpp/metadata/Makefile b/examples/cpp/metadata/Makefile index a4a452178f4d3..0f596aaa0d639 100644 --- a/examples/cpp/metadata/Makefile +++ b/examples/cpp/metadata/Makefile @@ -48,7 +48,7 @@ GRPC_CPP_PLUGIN_PATH ?= `which $(GRPC_CPP_PLUGIN)` # The following is to test your system and ensure a smoother experience. # They are by no means necessary to actually compile a grpc-enabled software. PROTOC_CMD = which $(PROTOC) -PROTOC_CHECK_CMD = $(PROTOC) --version | grep -q libprotoc.3 +PROTOC_CHECK_CMD = $(PROTOC) --version | grep -q 'libprotoc.3\|libprotoc [0-9][0-9]\.' PLUGIN_CHECK_CMD = which $(GRPC_CPP_PLUGIN) HAS_PROTOC = $(shell $(PROTOC_CMD) > /dev/null && echo true || echo false) ifeq ($(HAS_PROTOC),true) @@ -65,11 +65,11 @@ endif ifneq ($(HAS_VALID_PROTOC),true) @echo " DEPENDENCY ERROR" @echo - @echo "You don't have protoc 3.0.0 installed in your path." - @echo "Please install Google protocol buffers 3.0.0 and its compiler." + @echo "You don't have protoc 3.0.0 or newer installed in your path." + @echo "Please install an up-to-date version of Google protocol buffers." @echo "You can find it here:" @echo - @echo " https://github.com/protocolbuffers/protobuf/releases/tag/v3.0.0" + @echo " https://github.com/protocolbuffers/protobuf/releases" @echo @echo "Here is what I get when trying to evaluate your version of protoc:" @echo diff --git a/examples/cpp/route_guide/Makefile b/examples/cpp/route_guide/Makefile index e26f60b886372..25fcde9567697 100644 --- a/examples/cpp/route_guide/Makefile +++ b/examples/cpp/route_guide/Makefile @@ -70,7 +70,7 @@ clean: # They are by no means necessary to actually compile a grpc-enabled software. PROTOC_CMD = which $(PROTOC) -PROTOC_CHECK_CMD = $(PROTOC) --version | grep -q libprotoc.3 +PROTOC_CHECK_CMD = $(PROTOC) --version | grep -q 'libprotoc.3\|libprotoc [0-9][0-9]\.' PLUGIN_CHECK_CMD = which $(GRPC_CPP_PLUGIN) HAS_PROTOC = $(shell $(PROTOC_CMD) > /dev/null && echo true || echo false) ifeq ($(HAS_PROTOC),true) @@ -89,11 +89,11 @@ system-check: ifneq ($(HAS_VALID_PROTOC),true) @echo " DEPENDENCY ERROR" @echo - @echo "You don't have protoc 3.0.0 installed in your path." - @echo "Please install Google protocol buffers 3.0.0 and its compiler." + @echo "You don't have protoc 3.0.0 or newer installed in your path." + @echo "Please install an up-to-date version of Google protocol buffers." @echo "You can find it here:" @echo - @echo " https://github.com/protocolbuffers/protobuf/releases/tag/v3.0.0" + @echo " https://github.com/protocolbuffers/protobuf/releases" @echo @echo "Here is what I get when trying to evaluate your version of protoc:" @echo