Merge pull request #3032 from tianon/makefile-tweaks
Tweak Makefile for consistency and Ctrl+C-ability
This commit is contained in:
commit
3a8222dfa5
1 changed files with 20 additions and 12 deletions
32
Makefile
32
Makefile
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue