Makefile: do not rebuild tests every time "make" runs
bin2img/checkseccomp/copyimg are file targets and should not be .PHONY. This prevents to build them if not necessary. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
c66c633b77
commit
a30f84906c
2 changed files with 8 additions and 11 deletions
|
@ -78,6 +78,6 @@ WORKDIR /go/src/github.com/kubernetes-incubator/cri-o
|
||||||
|
|
||||||
ADD . /go/src/github.com/kubernetes-incubator/cri-o
|
ADD . /go/src/github.com/kubernetes-incubator/cri-o
|
||||||
|
|
||||||
RUN make copyimg \
|
RUN make test/copyimg/copyimg \
|
||||||
&& mkdir -p .artifacts/redis-image \
|
&& mkdir -p .artifacts/redis-image \
|
||||||
&& ./test/copyimg/copyimg --import-from=docker://redis --export-to=dir:.artifacts/redis-image --signature-policy ./test/policy.json
|
&& ./test/copyimg/copyimg --import-from=docker://redis --export-to=dir:.artifacts/redis-image --signature-policy ./test/policy.json
|
||||||
|
|
17
Makefile
17
Makefile
|
@ -64,14 +64,14 @@ conmon:
|
||||||
pause:
|
pause:
|
||||||
$(MAKE) -C $@
|
$(MAKE) -C $@
|
||||||
|
|
||||||
bin2img: .gopathok $(wildcard test/bin2img/*.go)
|
test/bin2img/bin2img: .gopathok $(wildcard test/bin2img/*.go)
|
||||||
$(GO) build $(LDFLAGS) -tags "$(BUILDTAGS)" -o test/bin2img/$@ $(PROJECT)/test/bin2img
|
$(GO) build $(LDFLAGS) -tags "$(BUILDTAGS)" -o $@ $(PROJECT)/test/bin2img
|
||||||
|
|
||||||
copyimg: .gopathok $(wildcard test/copyimg/*.go)
|
test/copyimg/copyimg: .gopathok $(wildcard test/copyimg/*.go)
|
||||||
$(GO) build $(LDFLAGS) -tags "$(BUILDTAGS)" -o test/copyimg/$@ $(PROJECT)/test/copyimg
|
$(GO) build $(LDFLAGS) -tags "$(BUILDTAGS)" -o $@ $(PROJECT)/test/copyimg
|
||||||
|
|
||||||
checkseccomp: .gopathok $(wildcard test/checkseccomp/*.go)
|
test/checkseccomp/checkseccomp: .gopathok $(wildcard test/checkseccomp/*.go)
|
||||||
$(GO) build $(LDFLAGS) -tags "$(BUILDTAGS)" -o test/checkseccomp/$@ $(PROJECT)/test/checkseccomp
|
$(GO) build $(LDFLAGS) -tags "$(BUILDTAGS)" -o $@ $(PROJECT)/test/checkseccomp
|
||||||
|
|
||||||
crio: .gopathok $(shell hack/find-godeps.sh $(GOPKGDIR) cmd/crio $(PROJECT))
|
crio: .gopathok $(shell hack/find-godeps.sh $(GOPKGDIR) cmd/crio $(PROJECT))
|
||||||
$(GO) build $(LDFLAGS) -tags "$(BUILDTAGS)" -o $@ $(PROJECT)/cmd/crio
|
$(GO) build $(LDFLAGS) -tags "$(BUILDTAGS)" -o $@ $(PROJECT)/cmd/crio
|
||||||
|
@ -113,7 +113,7 @@ integration: crioimage
|
||||||
localintegration: clean binaries
|
localintegration: clean binaries
|
||||||
./test/test_runner.sh ${TESTFLAGS}
|
./test/test_runner.sh ${TESTFLAGS}
|
||||||
|
|
||||||
binaries: crio crioctl kpod conmon pause bin2img copyimg checkseccomp
|
binaries: crio crioctl kpod conmon pause test/bin2img/bin2img test/copyimg/copyimg test/checkseccomp/checkseccomp
|
||||||
|
|
||||||
MANPAGES_MD := $(wildcard docs/*.md)
|
MANPAGES_MD := $(wildcard docs/*.md)
|
||||||
MANPAGES := $(MANPAGES_MD:%.md=%)
|
MANPAGES := $(MANPAGES_MD:%.md=%)
|
||||||
|
@ -203,12 +203,9 @@ install.tools: .install.gitvalidation .install.gometalinter .install.md2man
|
||||||
fi
|
fi
|
||||||
|
|
||||||
.PHONY: \
|
.PHONY: \
|
||||||
bin2img \
|
|
||||||
binaries \
|
binaries \
|
||||||
checkseccomp \
|
|
||||||
clean \
|
clean \
|
||||||
conmon \
|
conmon \
|
||||||
copyimg \
|
|
||||||
default \
|
default \
|
||||||
docs \
|
docs \
|
||||||
gofmt \
|
gofmt \
|
||||||
|
|
Loading…
Reference in a new issue