https://github.com/tendermint/tendermint
Raw File
Tip revision: d4f625455109d88e7f55a999fdb25e208f174802 authored by Ethan Buchman on 06 March 2017, 10:34:45 UTC
Merge pull request #426 from tendermint/release-0.9.0
Tip revision: d4f6254
Makefile
GOTOOLS = \
					github.com/mitchellh/gox \
					github.com/Masterminds/glide
PACKAGES=$(shell go list ./... | grep -v '/vendor/')
BUILD_TAGS?=tendermint
TMROOT = $${TMROOT:-$$HOME/.tendermint}

all: install test

install: get_vendor_deps
	@go install ./cmd/tendermint

build:
	go build -o build/tendermint ./cmd/tendermint

build_race:
	go build -race -o build/tendermint ./cmd/tendermint

# dist builds binaries for all platforms and packages them for distribution
dist:
	@BUILD_TAGS='$(BUILD_TAGS)' sh -c "'$(CURDIR)/scripts/dist.sh'"

test:
	@echo "--> Running go test"
	@go test $(PACKAGES)

test_race:
	@echo "--> Running go test --race"
	@go test -v -race $(PACKAGES)

test_integrations:
	@bash ./test/test.sh

test100:
	@for i in {1..100}; do make test; done

draw_deps:
	# requires brew install graphviz
	go get github.com/hirokidaichi/goviz
	goviz -i ./cmd/tendermint | dot -Tpng -o huge.png

list_deps:
	@go list -f '{{join .Deps "\n"}}' ./... | \
		grep -v /vendor/ | sort | uniq | \
		xargs go list -f '{{if not .Standard}}{{.ImportPath}}{{end}}'

get_deps:
	@echo "--> Running go get"
	@go get -v -d $(PACKAGES)
	@go list -f '{{join .TestImports "\n"}}' ./... | \
		grep -v /vendor/ | sort | uniq | \
		xargs go get -v -d

get_vendor_deps: ensure_tools
	@rm -rf vendor/
	@echo "--> Running glide install"
	@glide install

update_deps: tools
	@echo "--> Updating dependencies"
	@go get -d -u ./...

revision:
	-echo `git rev-parse --verify HEAD` > $(TMROOT)/revision
	-echo `git rev-parse --verify HEAD` >> $(TMROOT)/revision_history

tools:
	go get -u -v $(GOTOOLS)

ensure_tools:
	go get $(GOTOOLS)


.PHONY: install build build_race dist test test_race test_integrations test100 draw_deps list_deps get_deps get_vendor_deps update_deps revision tools
back to top