2017-01-28 13:20:22 +08:00
|
|
|
AUTOTAGS := $(shell ./btrfs_tag.sh) $(shell ./libdm_tag.sh)
|
2017-03-29 03:20:37 +08:00
|
|
|
PREFIX := $(DESTDIR)/usr/local
|
2017-03-30 03:06:36 +08:00
|
|
|
BINDIR := $(PREFIX)/bin
|
2017-03-29 03:20:37 +08:00
|
|
|
BASHINSTALLDIR=${PREFIX}/share/bash-completion/completions
|
2017-01-27 23:55:04 +08:00
|
|
|
|
|
|
|
|
all: buildah
|
|
|
|
|
|
2017-02-11 00:50:59 +08:00
|
|
|
buildah: *.go cmd/buildah/*.go
|
|
|
|
|
go build -o buildah -tags "$(AUTOTAGS) $(TAGS)" ./cmd/buildah
|
2017-01-27 23:55:04 +08:00
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
|
clean:
|
|
|
|
|
$(RM) buildah
|
|
|
|
|
|
2017-02-11 00:50:59 +08:00
|
|
|
# For vendoring to work right, the checkout directory must be such that out top
|
2017-03-16 22:43:50 +08:00
|
|
|
# level is at $GOPATH/src/github.com/projectatomic/buildah.
|
2017-01-27 23:55:04 +08:00
|
|
|
.PHONY: gopath
|
|
|
|
|
gopath:
|
2017-03-16 22:43:50 +08:00
|
|
|
test $(shell pwd) = $(shell cd ../../../../src/github.com/projectatomic/buildah ; pwd)
|
2017-01-27 23:55:04 +08:00
|
|
|
|
2017-01-28 12:59:37 +08:00
|
|
|
# We use https://github.com/lk4d4/vndr to manage dependencies.
|
2017-01-27 23:55:04 +08:00
|
|
|
.PHONY: deps
|
|
|
|
|
deps: gopath
|
|
|
|
|
env GOPATH=$(shell cd ../../../.. ; pwd) vndr
|
2017-03-29 03:20:37 +08:00
|
|
|
|
|
|
|
|
install:
|
|
|
|
|
install -D -m0755 buildah $(BINDIR)/buildah
|
|
|
|
|
|
|
|
|
|
.PHONY: install.completions
|
|
|
|
|
install.completions:
|
|
|
|
|
install -d -m 755 ${BASHINSTALLDIR}
|
|
|
|
|
install -m 644 -D contrib/completions/bash/buildah ${BASHINSTALLDIR}
|