提交 7edfc784 作者: Christian Couder

test: add GOFLAGS variable to the Makefile

This makes it possible to build binaries with
different flags.

The content of the GOFLAGS variable is stored
in a IPFS-BUILD-OPTIONS file, so that if GOFLAGS
changes a rebuild of the binaries with the new
flags is forced.

License: MIT
Signed-off-by: 's avatarChristian Couder <chriscool@tuxfamily.org>
上级 a2c41e65
...@@ -6,6 +6,9 @@ RANDOM_SRC = ../Godeps/_workspace/src/github.com/jbenet/go-random ...@@ -6,6 +6,9 @@ RANDOM_SRC = ../Godeps/_workspace/src/github.com/jbenet/go-random
MULTIHASH_SRC = ../Godeps/_workspace/src/github.com/jbenet/go-multihash MULTIHASH_SRC = ../Godeps/_workspace/src/github.com/jbenet/go-multihash
POLLENDPOINT_SRC= ../thirdparty/pollEndpoint POLLENDPOINT_SRC= ../thirdparty/pollEndpoint
# User might want to override those on the command line
GOFLAGS =
all: deps all: deps
deps: bins deps: bins
...@@ -15,17 +18,21 @@ clean: ...@@ -15,17 +18,21 @@ clean:
bins: $(BINS) bins: $(BINS)
bin/random: $(RANDOM_SRC)/**/*.go bin/random: $(RANDOM_SRC)/**/*.go IPFS-BUILD-OPTIONS
go build -o bin/random $(RANDOM_SRC)/random @echo "*** installing $@ ***"
go build $(GOFLAGS) -o bin/random $(RANDOM_SRC)/random
bin/multihash: $(MULTIHASH_SRC)/**/*.go bin/multihash: $(MULTIHASH_SRC)/**/*.go IPFS-BUILD-OPTIONS
go build -o bin/multihash $(MULTIHASH_SRC)/multihash @echo "*** installing $@ ***"
go build $(GOFLAGS) -o bin/multihash $(MULTIHASH_SRC)/multihash
bin/ipfs: $(IPFS_ROOT)/**/*.go bin/ipfs: $(IPFS_ROOT)/**/*.go IPFS-BUILD-OPTIONS
go build -o bin/ipfs $(IPFS_CMD) @echo "*** installing $@ ***"
go build $(GOFLAGS) -o bin/ipfs $(IPFS_CMD)
bin/pollEndpoint: $(POLLENDPOINT_SRC)/*.go bin/pollEndpoint: $(POLLENDPOINT_SRC)/*.go IPFS-BUILD-OPTIONS
go build -o bin/pollEndpoint $(POLLENDPOINT_SRC) @echo "*** installing $@ ***"
go build $(GOFLAGS) -o bin/pollEndpoint $(POLLENDPOINT_SRC)
test: test_expensive test: test_expensive
...@@ -38,4 +45,7 @@ test_cheap: ...@@ -38,4 +45,7 @@ test_cheap:
cd sharness && make cd sharness && make
cd 3nodetest && make cd 3nodetest && make
.PHONY: all clean IPFS-BUILD-OPTIONS: FORCE
@bin/checkflags '$@' '$(GOFLAGS)' '*** new Go flags ***'
.PHONY: all clean FORCE
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论