Makefile: ensure that containerd-shim gets added when installing

Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
Stephen J Day 2018-01-19 17:03:12 -08:00
parent aaf930eaf9
commit fe5da18f70
No known key found for this signature in database
GPG Key ID: 67B3DED84EDC823F

View File

@ -11,10 +11,29 @@ REVISION=$(shell git rev-parse HEAD)$(shell if ! git diff --no-ext-diff --quiet
ifneq "$(strip $(shell command -v go 2>/dev/null))" "" ifneq "$(strip $(shell command -v go 2>/dev/null))" ""
GOOS ?= $(shell go env GOOS) GOOS ?= $(shell go env GOOS)
GOARCH ?= $(shell go env GOARCH) GOARCH ?= $(shell go env GOARCH)
else
ifeq ($(GOOS),)
# approximate GOOS for the platform if we don't have Go and GOOS isn't
# set. We leave GOARCH unset, so that may need to be fixed.
ifeq ($(OS),Windows_NT)
GOOS = windows
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
GOOS = linux
endif
ifeq ($(UNAME_S),Darwin)
GOOS = darwin
endif
ifeq ($(UNAME_S),FreeBSD)
GOOS = freebsd
endif
endif
else else
GOOS ?= $$GOOS GOOS ?= $$GOOS
GOARCH ?= $$GOARCH GOARCH ?= $$GOARCH
endif endif
endif
WHALE = "🇩" WHALE = "🇩"
ONI = "👹" ONI = "👹"
@ -38,7 +57,6 @@ TEST_REQUIRES_ROOT_PACKAGES=$(filter \
# Project binaries. # Project binaries.
COMMANDS=ctr containerd containerd-stress containerd-release COMMANDS=ctr containerd containerd-stress containerd-release
BINARIES=$(addprefix bin/,$(COMMANDS))
GO_TAGS=$(if $(BUILDTAGS),-tags "$(BUILDTAGS)",) GO_TAGS=$(if $(BUILDTAGS),-tags "$(BUILDTAGS)",)
GO_LDFLAGS=-ldflags '-s -w -X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) -X $(PKG)/version.Package=$(PKG) $(EXTRA_LDFLAGS)' GO_LDFLAGS=-ldflags '-s -w -X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) -X $(PKG)/version.Package=$(PKG) $(EXTRA_LDFLAGS)'
@ -51,6 +69,8 @@ GO_BUILD_FLAGS=
#include platform specific makefile #include platform specific makefile
-include Makefile.$(GOOS) -include Makefile.$(GOOS)
BINARIES=$(addprefix bin/,$(COMMANDS))
# Flags passed to `go test` # Flags passed to `go test`
TESTFLAGS ?= -v $(TESTFLAGS_RACE) TESTFLAGS ?= -v $(TESTFLAGS_RACE)
TESTFLAGS_PARALLEL ?= 8 TESTFLAGS_PARALLEL ?= 8