From bc9bb9e4ae3fd72632210eae2f01d1c13ea65b83 Mon Sep 17 00:00:00 2001 From: David Wragg Date: Mon, 13 Apr 2015 20:37:12 +0100 Subject: [PATCH 1/2] tempfile is a deprecated debianism As noted in its man page. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 496eb684..b5844b77 100644 --- a/Makefile +++ b/Makefile @@ -70,7 +70,7 @@ $(DOCKER_DISTRIB): tests: echo "mode: count" > profile.cov for dir in $$(find . -type f -name '*_test.go' | xargs -n1 dirname | sort -u); do \ - output=$$(tempfile -p cover); \ + output=$$(mktemp cover.XXXXXXXXXX); \ go test -tags netgo -covermode=count -coverprofile=$$output $$dir; \ if [ -f $$output ]; then \ tail -n +2 <$$output >>profile.cov; \ From 433d406d83ab9a3489366b7e68c71b4005e0878d Mon Sep 17 00:00:00 2001 From: David Wragg Date: Mon, 13 Apr 2015 20:39:01 +0100 Subject: [PATCH 2/2] Use $(@D) rather than $(shell dirname $@) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b5844b77..e757a207 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ update: $(WEAVER_EXE) $(WEAVEDNS_EXE): common/*.go go get -tags netgo ./$(@D) - go build -ldflags "-extldflags \"-static\" -X main.version $(WEAVE_VERSION)" -tags netgo -o $@ ./$(shell dirname $@) + go build -ldflags "-extldflags \"-static\" -X main.version $(WEAVE_VERSION)" -tags netgo -o $@ ./$(@D) @strings $@ | grep cgo_stub\\\.go >/dev/null || { \ rm $@; \ echo "\nYour go standard library was built without the 'netgo' build tag."; \ @@ -47,7 +47,7 @@ $(WEAVEDNS_EXE): nameserver/*.go weavedns/main.go # Sigproxy needs separate rule as it fails the netgo check in the main # build stanza due to not importing net package $(SIGPROXY_EXE): sigproxy/main.go - go build -o $@ ./$(shell dirname $@) + go build -o $@ ./$(@D) $(WEAVER_EXPORT): weaver/Dockerfile $(WEAVER_EXE) $(SUDO) docker build -t $(WEAVER_IMAGE) weaver