[lxc-devel] [lxd/master] Makefile: Don't recursively include test deps

stgraber on Github lxc-bot at linuxcontainers.org
Wed Sep 28 05:28:38 UTC 2016


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 446 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160928/44761256/attachment.bin>
-------------- next part --------------
From 227b2a7ef5ed68afaf708e0678d1533bcb3d5d69 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Wed, 28 Sep 2016 01:27:52 -0400
Subject: [PATCH] Makefile: Don't recursively include test deps
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

We only want LXD's own test dependencies, not the ones for every single
package we use.

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 Makefile | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile
index 487f512..5d0d2c5 100644
--- a/Makefile
+++ b/Makefile
@@ -55,18 +55,20 @@ gccgo:
 
 .PHONY: dist
 dist:
+	$(eval TMP := $(shell mktemp -d))
 	rm -Rf lxd-$(VERSION) $(ARCHIVE) $(ARCHIVE).gz
-	mkdir -p lxd-$(VERSION)/dist
-	-GOPATH=$(shell pwd)/lxd-$(VERSION)/dist go get -t -v -d ./...
-	-GOPATH=$(shell pwd)/lxd-$(VERSION)/dist go get -t -v -d ./...
-	-GOPATH=$(shell pwd)/lxd-$(VERSION)/dist go get -t -v -d ./...
-	GOPATH=$(shell pwd)/lxd-$(VERSION)/dist go get -t -v -d ./...
-	rm -rf $(shell pwd)/lxd-$(VERSION)/dist/src/github.com/lxc/lxd
-	ln -s ../../../.. ./lxd-$(VERSION)/dist/src/github.com/lxc/lxd
+	mkdir -p lxd-$(VERSION)/
+	-GOPATH=$(TMP) go get -t -v -d ./...
+	-GOPATH=$(TMP) go get -t -v -d ./...
+	-GOPATH=$(TMP) go get -t -v -d ./...
+	GOPATH=$(TMP) go get -t -v -d ./...
+	rm -rf $(TMP)/src/github.com/lxc/lxd
+	ln -s ../../../.. $(TMP)/src/github.com/lxc/lxd
+	mv $(TMP)/ lxd-$(VERSION)/dist
 	git archive --prefix=lxd-$(VERSION)/ --output=$(ARCHIVE) HEAD
 	tar -uf $(ARCHIVE) --exclude-vcs lxd-$(VERSION)/
 	gzip -9 $(ARCHIVE)
-	rm -Rf dist lxd-$(VERSION) $(ARCHIVE)
+	rm -Rf lxd-$(VERSION) $(ARCHIVE)
 
 .PHONY: i18n update-po update-pot build-mo static-analysis
 i18n: update-pot


More information about the lxc-devel mailing list