DEVP_PROTOC_VERSION = 33.2
DEVP_PROTOC_DIR = ${DEVP_TOOLS_ROOT}/protoc/${DEVP_PROTOC_VERSION}
DEVP_PROTOC_EXE = ${DEVP_PROTOC_DIR}/protoc/bin/protoc

${DEVP_PROTOC_EXE}:
ifdef DEVP_NO_INSTALL
ifneq ($(DEVP_VERSION),$(DEVP_CI_BUILDER_VERSION))
	$(call error_message,"Platform version is [${DEVP_VERSION}] image version is [${DEVP_CI_BUILDER_VERSION}]. Same version is expected. Updating with [make devp/update] might help. DEVP_NO_INSTALL == 1. See: https://mws.pages.mws-team.ru/devp/platform-go-tools/pgt/user/pages/platform-update.html")
	@exit 1
endif
	$(call error_message,"[protoc] is expected to be installed but it is not. Please contact /duty golang for support.")
	@exit 1
endif
	$(Q) mkdir -p ${DEVP_PROTOC_DIR}
	$(Q) ${DEVP_INSTALL_SCRIPTS}/protoc.sh "${DEVP_PROTOC_DIR}" ${DEVP_PROTOC_VERSION} "$(OS)"
	$(call green,"protoc installed as $@")

.PHONY: devp/install/protoc
devp/install/protoc: ${DEVP_PROTOC_EXE}
	@# Install protoc - 33.2

DEVP_PROTOC_CMD := ${DEVP_PROTOC_EXE} -I ${DEVP_PROTOC_DIR}/protoc/include
