From f6ca91a887ff3d18c465a1142e3cac5e99148836 Mon Sep 17 00:00:00 2001 From: Kamil Skalski Date: Mon, 9 Jan 2017 23:25:26 +0100 Subject: [PATCH] Allow specifying protoc binary with environment variable. (#234) --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7546fc1f..b59b04ec 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,9 @@ GPRCPLUGIN ?= /usr/local/bin/grpc_$(LANGUAGE)_plugin # Choose the proto include directory. PROTOINCLUDE ?= /usr/local/include +# Choose protoc binary +PROTOC ?= protoc + # Compile the entire repository # # NOTE: if "protoc" command is not in the PATH, you need to modify this file. @@ -39,7 +42,7 @@ all: $(DEPS) %.$(SUFFIX): %.proto mkdir -p $(OUTPUT) - protoc $(FLAGS) $*.proto + $(PROTOC) $(FLAGS) $*.proto clean: rm $(patsubst %,$(OUTPUT)/%,$(DEPS)) 2> /dev/null