Skip to content

Commit

Permalink
update makefile
Browse files Browse the repository at this point in the history
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
jessfraz committed Sep 25, 2018
1 parent 729aebc commit 75eea3d
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 0 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -12,18 +12,6 @@ include basic.mk
.PHONY: prebuild
prebuild:

# Set the graph driver as the current graphdriver if not set.
DOCKER_GRAPHDRIVER := $(if $(DOCKER_GRAPHDRIVER),$(DOCKER_GRAPHDRIVER),$(shell docker info 2>&1 | grep "Storage Driver" | sed 's/.*: //'))
export DOCKER_GRAPHDRIVER

# If this session isn't interactive, then we don't want to allocate a
# TTY, which would fail, but if it is interactive, we do want to attach
# so that the user can send e.g. ^C through.
INTERACTIVE := $(shell [ -t 0 ] && echo 1 || echo 0)
ifeq ($(INTERACTIVE), 1)
DOCKER_FLAGS += -t
endif

.PHONY: dind
dind: stop-dind ## Starts a docker-in-docker container for running the tests with.
docker run -d \
12 changes: 12 additions & 0 deletions basic.mk
Original file line number Diff line number Diff line change
@@ -25,6 +25,18 @@ GO := go
# List the GOOS and GOARCH to build
GOOSARCHES = $(shell cat .goosarch)

# Set the graph driver as the current graphdriver if not set.
DOCKER_GRAPHDRIVER := $(if $(DOCKER_GRAPHDRIVER),$(DOCKER_GRAPHDRIVER),$(shell docker info 2>&1 | grep "Storage Driver" | sed 's/.*: //'))
export DOCKER_GRAPHDRIVER

# If this session isn't interactive, then we don't want to allocate a
# TTY, which would fail, but if it is interactive, we do want to attach
# so that the user can send e.g. ^C through.
INTERACTIVE := $(shell [ -t 0 ] && echo 1 || echo 0)
ifeq ($(INTERACTIVE), 1)
DOCKER_FLAGS += -t
endif

.PHONY: build
build: prebuild $(NAME) ## Builds a dynamic executable or package.

0 comments on commit 75eea3d

Please sign in to comment.