2 github.com/mitchellh/gox \
3 github.com/Masterminds/glide
4 PACKAGES=$(shell go list ./... | grep -v '/vendor/')
6 TMHOME = $${TMHOME:-$$HOME/.bytom}
10 install: get_vendor_deps copy
11 @go install --ldflags '-extldflags "-static"' \
12 --ldflags "-X github.com/Bytom/blockchain/version.GitCommit=`git rev-parse HEAD`" ./node/
16 --ldflags "-X github.com/Bytom/blockchain/version.GitCommit=`git rev-parse HEAD`" -o build/node ./node/
19 cp -r vendor/github.com/golang/crypto vendor/golang.org/x/crypto
20 cp -r vendor/github.com/golang/net vendor/golang.org/x/net
21 cp -r vendor/github.com/golang/text vendor/golang.org/x/text
22 cp -r vendor/github.com/golang/tools vendor/golang.org/x/tools
23 cp -r vendor/github.com/golang/time vendor/golang.org/x/time
25 # dist builds binaries for all platforms and packages them for distribution
27 @BUILD_TAGS='$(BUILD_TAGS)' sh -c "'$(CURDIR)/scripts/dist.sh'"
30 @echo "--> Running go test"
34 @echo "--> Running go test --race"
35 @go test -v -race $(PACKAGES)
41 @for i in {1..100}; do make test; done
44 # requires brew install graphviz or apt-get install graphviz
45 go get github.com/RobotsAndPencils/goviz
46 @goviz -i github.com/tendermint/tendermint/cmd/tendermint -d 3 | dot -Tpng -o dependency-graph.png
49 @go list -f '{{join .Deps "\n"}}' ./... | \
50 grep -v /vendor/ | sort | uniq | \
51 xargs go list -f '{{if not .Standard}}{{.ImportPath}}{{end}}'
54 @echo "--> Running go get"
55 @go get -v -d $(PACKAGES)
56 @go list -f '{{join .TestImports "\n"}}' ./... | \
57 grep -v /vendor/ | sort | uniq | \
60 get_vendor_deps: ensure_tools
62 @echo "--> Running glide install"
66 @echo "--> Updating dependencies"
70 -echo `git rev-parse --verify HEAD` > $(TMHOME)/revision
71 -echo `git rev-parse --verify HEAD` >> $(TMHOME)/revision_history
74 go get -u -v $(GOTOOLS)
80 .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