mirror of
https://github.com/genuinetools/reg.git
synced 2024-05-13 09:48:33 -04:00
update makefile
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
parent
729aebcabb
commit
75eea3d0e8
12
Makefile
12
Makefile
|
@ -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
basic.mk
12
basic.mk
|
@ -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.
|
||||
|
||||
|
|
Loading…
Reference in a new issue