From 7c8fc35c697cac81943660851587e55db857e35d Mon Sep 17 00:00:00 2001 From: Olivier Gambier Date: Fri, 9 Oct 2015 13:21:32 -0700 Subject: [PATCH] Don't build test files in cmd Signed-off-by: Olivier Gambier --- main_test.go => cmd/machine_test.go | 0 mk/build.mk | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename main_test.go => cmd/machine_test.go (100%) diff --git a/main_test.go b/cmd/machine_test.go similarity index 100% rename from main_test.go rename to cmd/machine_test.go diff --git a/mk/build.mk b/mk/build.mk index 129343fee9..5e8e8bbd4a 100644 --- a/mk/build.mk +++ b/mk/build.mk @@ -13,11 +13,11 @@ $(PREFIX)/bin/docker-%: ./cmd/%.go $(shell find . -type f -name '*.go') $(GO) build -o $@ $(VERBOSE_GO) -tags "$(BUILDTAGS)" -ldflags "$(GO_LDFLAGS)" $(GO_GCFLAGS) $< # Native build -build-simple: $(patsubst ./cmd/%.go,$(PREFIX)/bin/docker-%,$(wildcard ./cmd/*.go)) +build-simple: $(patsubst ./cmd/%.go,$(PREFIX)/bin/docker-%,$(filter-out %_test.go, $(wildcard ./cmd/*.go))) # Cross compilation targets build-x-%: ./cmd/%.go $(shell find . -type f -name '*.go') @$(foreach GOARCH,$(TARGET_ARCH),$(foreach GOOS,$(TARGET_OS),$(call gocross,$(GOOS),$(GOARCH),$<))) # Cross-build -build-x: $(patsubst ./cmd/%.go,build-x-%,$(wildcard ./cmd/*.go)) \ No newline at end of file +build-x: $(patsubst ./cmd/%.go,build-x-%,$(filter-out %_test.go, $(wildcard ./cmd/*.go)))