Skip to content

Commit

Permalink
Tweak Makefile for consistency and Ctrl+C-ability (also, -rm to keep …
Browse files Browse the repository at this point in the history
…it clean)
  • Loading branch information
tianon committed Dec 4, 2013
1 parent 2fd76fc commit 00030ce
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
default: build
.PHONY: all binary build default doc shell test

build: bundles
docker build -t docker .
docker run -privileged -v `pwd`/bundles:/go/src/github.com/dotcloud/docker/bundles docker hack/make.sh binary
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:
cd docs && docker build -t docker-docs . && docker run -p 8000:8000 docker-docs
docker build -t docker-docs 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
test: build
$(DOCKER_RUN_DOCKER) hack/make.sh test

shell:
docker run -privileged -i -t docker bash
shell: build
$(DOCKER_RUN_DOCKER) bash

build: bundles
docker build -t docker .

bundles:
mkdir bundles

0 comments on commit 00030ce

Please sign in to comment.