github.com/keltia/go-ipfs@v0.3.8-0.20150909044612-210793031c63/test/Makefile (about) 1 2 BINS = bin/random bin/multihash bin/ipfs bin/pollEndpoint bin/iptb bin/go-sleep 3 IPFS_ROOT = ../ 4 IPFS_CMD = ../cmd/ipfs 5 RANDOM_SRC = ../Godeps/_workspace/src/github.com/jbenet/go-random 6 RANDOM_FILES_SRC = ../Godeps/_workspace/src/github.com/jbenet/go-random-files 7 MULTIHASH_SRC = ../Godeps/_workspace/src/github.com/jbenet/go-multihash 8 IPTB_SRC = ../Godeps/_workspace/src/github.com/whyrusleeping/iptb 9 POLLENDPOINT_SRC= ../thirdparty/pollEndpoint 10 GOSLEEP_SRC = ../Godeps/_workspace/src/github.com/chriscool/go-sleep 11 12 # User might want to override those on the command line 13 GOFLAGS = 14 15 all: deps 16 17 deps: bins 18 19 clean: 20 rm $(BINS) 21 22 bins: $(BINS) 23 24 find_go_files = $(shell find $(1) -name "*.go") 25 26 bin/random: $(call find_go_files, $(RANDOM_SRC)) IPFS-BUILD-OPTIONS 27 @echo "*** installing $@ ***" 28 go build $(GOFLAGS) -o bin/random $(RANDOM_SRC)/random 29 30 bin/random-files: 31 @echo "*** installing $@ ***" 32 go build $(GOFLAGS) -o bin/random-files $(RANDOM_FILES_SRC)/random-files 33 34 bin/multihash: $(call find_go_files, $(MULTIHASH_SRC)) IPFS-BUILD-OPTIONS 35 @echo "*** installing $@ ***" 36 go build $(GOFLAGS) -o bin/multihash $(MULTIHASH_SRC)/multihash 37 38 bin/ipfs: $(call find_go_files, $(IPFS_ROOT)) IPFS-BUILD-OPTIONS 39 @echo "*** installing $@ ***" 40 go build $(GOFLAGS) -o bin/ipfs $(IPFS_CMD) 41 42 bin/pollEndpoint: $(call find_go_files, $(POLLENDPOINT_SRC)) IPFS-BUILD-OPTIONS 43 @echo "*** installing $@ ***" 44 go build $(GOFLAGS) -o bin/pollEndpoint $(POLLENDPOINT_SRC) 45 46 bin/iptb: $(call find_go_files, $(IPTB_SRC)) IPFS-BUILD-OPTIONS 47 @echo "*** installing $@ ***" 48 go build $(GOFLAGS) -o bin/iptb $(IPTB_SRC) 49 50 bin/go-sleep: $(call find_go_files, $(GOSLEEP_SRC)) IPFS-BUILD-OPTIONS 51 @echo "*** installing $@ ***" 52 go build $(GOFLAGS) -o bin/go-sleep $(GOSLEEP_SRC) 53 54 test: test_expensive 55 56 test_expensive: verify_gofmt 57 cd sharness && make TEST_EXPENSIVE=1 58 cd 3nodetest && make 59 cd dependencies && make 60 61 test_cheap: verify_gofmt 62 cd sharness && make 63 cd 3nodetest && make 64 65 test_race: verify_gofmt 66 cd sharness && make GOFLAGS=-race TEST_EXPENSIVE=1 67 cd 3nodetest && make GOFLAGS=-race 68 cd dependencies && make GOFLAGS=-race 69 70 IPFS-BUILD-OPTIONS: FORCE 71 @bin/checkflags '$@' '$(GOFLAGS)' '*** new Go flags ***' 72 73 verify_gofmt: 74 bin/verify-go-fmt.sh 75 76 .PHONY: all clean FORCE