tendermint/Makefile

59 lines
1.4 KiB
Makefile
Raw Normal View History

2015-06-25 18:42:17 -07:00
.PHONY: get_deps build all list_deps install
2015-03-16 03:51:24 -07:00
2016-02-08 00:48:58 -08:00
all: get_deps install test
2015-06-25 18:42:17 -07:00
2015-07-13 11:49:09 -07:00
TMROOT = $${TMROOT:-$$HOME/.tendermint}
define NEWLINE
2015-07-13 11:49:09 -07:00
endef
2016-06-11 20:14:44 -07:00
NOVENDOR = go list github.com/tendermint/tendermint/... | grep -v /vendor/
2015-07-13 11:49:09 -07:00
install: get_deps
2015-06-25 18:42:17 -07:00
go install github.com/tendermint/tendermint/cmd/tendermint
2014-12-28 16:26:53 -08:00
2015-06-10 09:06:28 -07:00
build:
go build -o build/tendermint github.com/tendermint/tendermint/cmd/tendermint
2015-06-10 09:06:28 -07:00
build_race:
go build -race -o build/tendermint github.com/tendermint/tendermint/cmd/tendermint
2014-12-28 17:10:03 -08:00
2015-03-16 03:51:24 -07:00
test: build
2016-06-11 20:14:44 -07:00
go test `${NOVENDOR}`
2016-06-24 17:21:44 -07:00
test_race: build
go test -race `${NOVENDOR}`
2014-12-28 16:26:53 -08:00
2016-07-23 16:38:44 -07:00
test_integrations:
2016-07-23 09:48:30 -07:00
bash ./test/test.sh
2016-04-29 15:32:50 -07:00
test100: build
for i in {1..100}; do make test; done
draw_deps:
# requires brew install graphviz
go get github.com/hirokidaichi/goviz
goviz -i github.com/tendermint/tendermint/cmd/tendermint | dot -Tpng -o huge.png
2014-12-28 16:26:53 -08:00
list_deps:
2016-06-11 20:14:44 -07:00
go list -f '{{join .Deps "\n"}}' github.com/tendermint/tendermint/... | \
grep -v /vendor/ | sort | uniq | \
xargs go list -f '{{if not .Standard}}{{.ImportPath}}{{end}}'
2014-12-28 16:26:53 -08:00
get_deps:
2016-06-11 20:14:44 -07:00
go get -d `${NOVENDOR}`
go list -f '{{join .TestImports "\n"}}' github.com/tendermint/tendermint/... | \
grep -v /vendor/ | sort | uniq | \
xargs go get
2015-03-16 03:51:24 -07:00
2016-07-05 12:40:53 -07:00
get_vendor_deps:
go get github.com/Masterminds/glide
glide install
2016-02-15 17:29:52 -08:00
update_deps:
go get -d -u github.com/tendermint/tendermint/...
2015-07-10 08:50:58 -07:00
revision:
2015-09-24 12:48:44 -07:00
-echo `git rev-parse --verify HEAD` > $(TMROOT)/revision
-echo `git rev-parse --verify HEAD` >> $(TMROOT)/revision_history