Merge 6bad1bd169
into 0b48dd5d7f
This commit is contained in:
commit
e8ed4b2616
1 changed files with 26 additions and 11 deletions
37
Makefile
37
Makefile
|
@ -13,6 +13,15 @@ ETCDIR ?= ${DESTDIR}/etc
|
||||||
ETCDIR_OCID ?= ${ETCDIR}/ocid
|
ETCDIR_OCID ?= ${ETCDIR}/ocid
|
||||||
BUILDTAGS := selinux seccomp $(shell hack/btrfs_tag.sh) $(shell hack/libdm_tag.sh)
|
BUILDTAGS := selinux seccomp $(shell hack/btrfs_tag.sh) $(shell hack/libdm_tag.sh)
|
||||||
BASHINSTALLDIR=${PREFIX}/share/bash-completion/completions
|
BASHINSTALLDIR=${PREFIX}/share/bash-completion/completions
|
||||||
|
BINARIES := \
|
||||||
|
ocid \
|
||||||
|
ocic \
|
||||||
|
kpod \
|
||||||
|
conmon \
|
||||||
|
pause \
|
||||||
|
bin2img \
|
||||||
|
copyimg \
|
||||||
|
checkseccomp
|
||||||
|
|
||||||
all: binaries ocid.conf docs
|
all: binaries ocid.conf docs
|
||||||
|
|
||||||
|
@ -30,12 +39,14 @@ help:
|
||||||
|
|
||||||
.PHONY: check-gopath
|
.PHONY: check-gopath
|
||||||
|
|
||||||
check-gopath:
|
check-gopath = \
|
||||||
ifndef GOPATH
|
if [ -z "GOPATH" ] ; then \
|
||||||
$(error GOPATH is not set)
|
echo "GOPATH is not set"; \
|
||||||
endif
|
exit 1; \
|
||||||
|
fi
|
||||||
|
|
||||||
lint: check-gopath
|
lint:
|
||||||
|
@$(call check-gopath)
|
||||||
@echo "checking lint"
|
@echo "checking lint"
|
||||||
@./.tool/lint
|
@./.tool/lint
|
||||||
|
|
||||||
|
@ -54,18 +65,22 @@ bin2img:
|
||||||
copyimg:
|
copyimg:
|
||||||
$(MAKE) -C test/$@ BUILDTAGS="$(BUILDTAGS)"
|
$(MAKE) -C test/$@ BUILDTAGS="$(BUILDTAGS)"
|
||||||
|
|
||||||
checkseccomp: check-gopath
|
checkseccomp:
|
||||||
|
@$(check-gopath)
|
||||||
$(MAKE) -C test/$@
|
$(MAKE) -C test/$@
|
||||||
|
|
||||||
ocid: check-gopath
|
ocid:
|
||||||
|
@$(check-gopath)
|
||||||
$(GO) build -o $@ \
|
$(GO) build -o $@ \
|
||||||
-tags "$(BUILDTAGS)" \
|
-tags "$(BUILDTAGS)" \
|
||||||
$(PROJECT)/cmd/ocid
|
$(PROJECT)/cmd/ocid
|
||||||
|
|
||||||
ocic: check-gopath
|
ocic:
|
||||||
|
@$(check-gopath)
|
||||||
$(GO) build -o $@ $(PROJECT)/cmd/ocic
|
$(GO) build -o $@ $(PROJECT)/cmd/ocic
|
||||||
|
|
||||||
kpod: check-gopath
|
kpod:
|
||||||
|
@$(check-gopath)
|
||||||
$(GO) build -o $@ $(PROJECT)/cmd/kpod
|
$(GO) build -o $@ $(PROJECT)/cmd/kpod
|
||||||
|
|
||||||
ocid.conf: ocid
|
ocid.conf: ocid
|
||||||
|
@ -95,7 +110,7 @@ integration: ocidimage
|
||||||
localintegration: binaries
|
localintegration: binaries
|
||||||
./test/test_runner.sh ${TESTFLAGS}
|
./test/test_runner.sh ${TESTFLAGS}
|
||||||
|
|
||||||
binaries: ocid ocic kpod conmon pause bin2img copyimg checkseccomp
|
binaries: $(BINARIES)
|
||||||
|
|
||||||
MANPAGES_MD := $(wildcard docs/*.md)
|
MANPAGES_MD := $(wildcard docs/*.md)
|
||||||
MANPAGES := $(MANPAGES_MD:%.md=%)
|
MANPAGES := $(MANPAGES_MD:%.md=%)
|
||||||
|
@ -111,7 +126,7 @@ docs/%.8: docs/%.8.md check-gopath
|
||||||
|
|
||||||
docs: $(MANPAGES)
|
docs: $(MANPAGES)
|
||||||
|
|
||||||
install: check-gopath
|
install:
|
||||||
install -D -m 755 ocid $(BINDIR)/ocid
|
install -D -m 755 ocid $(BINDIR)/ocid
|
||||||
install -D -m 755 ocic $(BINDIR)/ocic
|
install -D -m 755 ocic $(BINDIR)/ocic
|
||||||
install -D -m 755 kpod $(BINDIR)/kpod
|
install -D -m 755 kpod $(BINDIR)/kpod
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue