Merge pull request #3032 from tianon/makefile-tweaks

Tweak Makefile for consistency and Ctrl+C-ability
This commit is contained in:
Michael Crosby 2013-12-04 16:04:47 -08:00
commit 3a8222dfa5

View file

@ -1,18 +1,26 @@
default: build
.PHONY: all binary build default doc shell test
DOCKER_RUN_DOCKER := docker run -rm -i -t -privileged -e TESTFLAGS -v $(CURDIR)/bundles:/go/src/github.com/dotcloud/docker/bundles docker
default: binary
all: build
$(DOCKER_RUN_DOCKER) hack/make.sh
binary: build
$(DOCKER_RUN_DOCKER) hack/make.sh binary
doc:
docker build -t docker-docs docs && docker run -p 8000:8000 docker-docs
test: build
$(DOCKER_RUN_DOCKER) hack/make.sh test
shell: build
$(DOCKER_RUN_DOCKER) bash
build: bundles
docker build -t docker .
docker run -privileged -v `pwd`/bundles:/go/src/github.com/dotcloud/docker/bundles docker hack/make.sh binary
doc:
cd docs && docker build -t docker-docs . && docker run -p 8000:8000 docker-docs
test: bundles
docker run -e TESTFLAGS -privileged -v `pwd`/bundles:/go/src/github.com/dotcloud/docker/bundles docker hack/make.sh test
shell:
docker run -privileged -i -t docker bash
bundles:
mkdir bundles