Merge pull request #1615 from gianarb/feature/make-install

Added install support on make
This commit is contained in:
Justin Cormack 2017-04-14 07:29:17 -05:00 committed by GitHub
commit 063f2af9bb
2 changed files with 6 additions and 1 deletions

View File

@ -17,6 +17,8 @@ ifeq ($(GOOS),darwin)
default: bin/infrakit-instance-hyperkit
endif
PREFIX?=/usr/local/
MOBY_DEPS=$(wildcard src/cmd/moby/*.go) Makefile vendor.conf
MOBY_DEPS+=$(wildcard src/initrd/*.go) $(wildcard src/pad4/*.go)
bin/moby: $(MOBY_DEPS) | bin
@ -46,6 +48,9 @@ test-qemu-efi: test-efi.iso
bin:
mkdir -p $@
install:
cp -R ./bin/* $(PREFIX)/bin
define check_test_log
@cat $1 |grep -q 'Moby test suite PASSED'
endef

View File

@ -18,7 +18,7 @@ LinuxKit, a toolkit for building custom minimal, immutable Linux distributions.
### Build the `moby` tool
Simple build instructions: use `make` to build. This will build the customisation tool in `bin/`. Add this
to your `PATH` or copy it to somewhere in your `PATH` eg `sudo cp bin/moby /usr/local/bin/`.
to your `PATH` or copy it to somewhere in your `PATH` eg `sudo cp bin/moby /usr/local/bin/`. Or you can use `sudo make install`.
If you already have `go` installed you can use `go get -u github.com/docker/moby/src/cmd/moby` to install
the `moby` tool, and then use `moby build linuxkit.yml` to build the example configuration. You