Merge PR #2744: Fix Makefile targets dependencies
* Fix Makefile targets dependencies * Remove unnecessary build deps from install targets * Create a rule for each tool * Don't dep test_lint on tools
This commit is contained in:
parent
d1614ebb7e
commit
6e9c3f8d1a
16
Makefile
16
Makefile
|
@ -8,6 +8,7 @@ GOTOOLS = \
|
|||
github.com/golang/dep/cmd/dep \
|
||||
github.com/alecthomas/gometalinter \
|
||||
github.com/rakyll/statik
|
||||
GOBIN ?= $(GOPATH)/bin
|
||||
all: get_tools get_vendor_deps install install_examples install_cosmos-sdk-cli test_lint test
|
||||
|
||||
########################################
|
||||
|
@ -113,26 +114,29 @@ update_dev_tools:
|
|||
$(GOPATH)/src/github.com/alecthomas/gometalinter/scripts/install.sh -b $(GOBIN)
|
||||
go get -u github.com/tendermint/lint/golint
|
||||
|
||||
get_tools:
|
||||
get_tools: $(GOBIN)/dep $(GOBIN)/gometalinter $(GOBIN)/statik
|
||||
@echo "--> Installing tools"
|
||||
$(MAKE) -C scripts get_tools
|
||||
|
||||
get_dev_tools:
|
||||
$(GOBIN)/%:
|
||||
$(MAKE) -C scripts $(subst $(GOBIN)/,,$(@))
|
||||
|
||||
get_dev_tools: get_tools
|
||||
@echo "--> Downloading linters (this may take awhile)"
|
||||
$(GOPATH)/src/github.com/alecthomas/gometalinter/scripts/install.sh -b $(GOBIN)
|
||||
go get github.com/tendermint/lint/golint
|
||||
|
||||
get_vendor_deps:
|
||||
get_vendor_deps: get_tools
|
||||
@echo "--> Generating vendor directory via dep ensure"
|
||||
@rm -rf .vendor-new
|
||||
@dep ensure -v -vendor-only
|
||||
|
||||
update_vendor_deps:
|
||||
update_vendor_deps: get_tools
|
||||
@echo "--> Running dep ensure"
|
||||
@rm -rf .vendor-new
|
||||
@dep ensure -v
|
||||
|
||||
draw_deps:
|
||||
draw_deps: get_tools
|
||||
@# requires brew install graphviz or apt-get install graphviz
|
||||
go get github.com/RobotsAndPencils/goviz
|
||||
@goviz -i github.com/cosmos/cosmos-sdk/cmd/gaia/cmd/gaiad -d 2 | dot -Tpng -o dependency-graph.png
|
||||
|
@ -261,7 +265,7 @@ localnet-stop:
|
|||
# unless there is a reason not to.
|
||||
# https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html
|
||||
.PHONY: build build_cosmos-sdk-cli build_examples install install_examples install_cosmos-sdk-cli install_debug dist \
|
||||
check_tools check_dev_tools get_tools get_dev_tools get_vendor_deps draw_deps test test_cli test_unit \
|
||||
check_tools check_dev_tools get_dev_tools get_vendor_deps draw_deps test test_cli test_unit \
|
||||
test_cover test_lint benchmark devdoc_init devdoc devdoc_save devdoc_update \
|
||||
build-linux build-docker-gaiadnode localnet-start localnet-stop \
|
||||
format check-ledger test_sim_gaia_nondeterminism test_sim_modules test_sim_gaia_fast \
|
||||
|
|
Loading…
Reference in New Issue