infrakit: Move the hyperkit instance plugin into the source directory

- The tools directory ideally should not contain source code
- Removes double vendoring of packagages
- Makes it easer to hook the build into the top-level Makefile

Eventually, the plugin should be moved to the infrakit repo.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
Rolf Neugebauer
2017-03-25 12:41:22 +01:00
parent 30c39863c1
commit 48845bcfd9
418 changed files with 23393 additions and 2389 deletions

View File

@@ -10,11 +10,19 @@ GOARCH=amd64
ifneq ($(GOOS),linux)
CROSS=-e GOOS=$(GOOS) -e GOARCH=$(GOARCH)
endif
ifeq ($(GOOS),darwin)
default: bin/infrakit-instance-hyperkit
endif
bin/moby: $(MOBY_DEPS) | bin
tar cf - vendor src/initrd src/pad4 -C src/cmd/moby . | docker run --rm --net=none --log-driver=none -i $(CROSS) $(GO_COMPILE) --package github.com/docker/moby -o $@ | tar xf -
touch $@
MOBY_DEPS=$(wildcard src/cmd/infrakit-instance-hyperkit/*.go)
bin/infrakit-instance-hyperkit: $(INFRAKIT_DEPS) | bin
tar cf - vendor -C src/cmd/infrakit-instance-hyperkit . | docker run --rm --net=none --log-driver=none -i $(CROSS) $(GO_COMPILE) --package github.com/docker/moby -o $@ | tar xf -
touch $@
moby-initrd.img: bin/moby moby.yaml
bin/moby build moby.yaml