buildsystem: various small improvements (#6598)

Follow-up of #6101.

- Makefile:

Set all as actual default target.

- contrib/devtools/Makefile:

The buf target was running unconditionally.

Install protoc-gen-gocosmos along with protoc.
This commit is contained in:
Alessio Treglia
2020-07-03 20:50:14 +02:00
committed by GitHub
parent 849429ecda
commit 80e53a4d89
3 changed files with 17 additions and 14 deletions
+13 -11
View File
@@ -60,7 +60,7 @@ tools-stamp: proto-tools statik runsim
# Install the runsim binary with a temporary workaround of entering an outside
# directory as the "go get" command ignores the -mod option and will polute the
# go.{mod, sum} files.
#
#
# ref: https://github.com/golang/go/issues/30515
statik: $(STATIK)
$(STATIK):
@@ -70,7 +70,7 @@ $(STATIK):
# Install the runsim binary with a temporary workaround of entering an outside
# directory as the "go get" command ignores the -mod option and will polute the
# go.{mod, sum} files.
#
#
# ref: https://github.com/golang/go/issues/30515
runsim: $(RUNSIM)
$(RUNSIM):
@@ -85,7 +85,7 @@ ifeq ($(UNAME_S),Darwin)
PROTOC_ZIP ?= protoc-3.11.2-osx-x86_64.zip
endif
proto-tools: proto-tools-stamp protoc-gen-gocosmos buf
proto-tools: proto-tools-stamp buf
proto-tools-stamp:
@echo "Installing protoc compiler..."
@@ -95,7 +95,14 @@ proto-tools-stamp:
unzip -o ${PROTOC_ZIP} -d $(PREFIX) 'include/*'; \
rm -f ${PROTOC_ZIP})
buf:
@echo "Installing protoc-gen-gocosmos..."
@go install github.com/regen-network/cosmos-proto/protoc-gen-gocosmos
touch $@
buf: buf-stamp
buf-stamp:
@echo "Installing buf..."
@curl -sSL \
"https://github.com/bufbuild/buf/releases/download/v${BUF_VERSION}/buf-${UNAME_S}-${UNAME_M}" \
@@ -104,13 +111,8 @@ buf:
touch $@
protoc-gen-gocosmos:
@echo "Installing protoc-gen-gocosmos..."
@go install github.com/regen-network/cosmos-proto/protoc-gen-gocosmos
tools-clean:
rm -f $(STATIK) $(GOLANGCI_LINT) $(RUNSIM)
rm -f tools-stamp proto-tools-stamp
rm -f tools-stamp proto-tools-stamp buf-stamp
.PHONY: tools-clean statik runsim \
protoc-gen-gocosmos
.PHONY: tools-clean statik runsim