Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R4R: Fix Makefile targets dependencies #2744

Merged
merged 5 commits into from
Nov 14, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ GOTOOLS = \
github.com/golang/dep/cmd/dep \
github.com/alecthomas/gometalinter \
github.com/rakyll/statik
GOBIN ?= $(GOPATH)/bin
alexanderbez marked this conversation as resolved.
Show resolved Hide resolved
all: get_tools get_vendor_deps install install_examples install_cosmos-sdk-cli test_lint test

########################################
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 \
Expand Down