2017-12-13 04:34:55 +00:00
|
|
|
BINARIES=bin/buildd bin/buildctl
|
2017-12-15 07:00:13 +00:00
|
|
|
BINARIES_EXTRA=bin/buildd.oci_only bin/buildd.containerd_only bin/buildctl-darwin bin/buildd.exe bin/buildctl.exe
|
2017-12-13 04:34:55 +00:00
|
|
|
DESTDIR=/usr/local
|
2017-06-19 23:10:09 +00:00
|
|
|
|
|
|
|
binaries: $(BINARIES)
|
2017-12-13 04:34:55 +00:00
|
|
|
binaries-all: $(BINARIES) $(BINARIES_EXTRA)
|
2017-06-19 23:10:09 +00:00
|
|
|
|
|
|
|
bin/buildctl-darwin: FORCE
|
|
|
|
mkdir -p bin
|
2017-06-22 20:15:46 +00:00
|
|
|
docker build --build-arg GOOS=darwin -t buildkit:buildctl-darwin --target buildctl -f ./hack/dockerfiles/test.Dockerfile --force-rm .
|
|
|
|
( containerID=$$(docker create buildkit:buildctl-darwin noop); \
|
2017-06-19 23:10:09 +00:00
|
|
|
docker cp $$containerID:/usr/bin/buildctl $@; \
|
|
|
|
docker rm $$containerID )
|
|
|
|
chmod +x $@
|
|
|
|
|
2017-07-12 05:08:53 +00:00
|
|
|
bin/%.exe: FORCE
|
|
|
|
mkdir -p bin
|
|
|
|
docker build -t buildkit:$*.exe --target $*.exe -f ./hack/dockerfiles/test.Dockerfile --force-rm .
|
|
|
|
( containerID=$$(docker create buildkit:$*.exe noop); \
|
|
|
|
docker cp $$containerID:/$*.exe $@; \
|
|
|
|
docker rm $$containerID )
|
|
|
|
chmod +x $@
|
|
|
|
|
2017-06-19 23:10:09 +00:00
|
|
|
bin/%: FORCE
|
|
|
|
mkdir -p bin
|
2017-06-22 20:15:46 +00:00
|
|
|
docker build -t buildkit:$* --target $* -f ./hack/dockerfiles/test.Dockerfile --force-rm .
|
|
|
|
( containerID=$$(docker create buildkit:$* noop); \
|
2017-06-19 23:10:09 +00:00
|
|
|
docker cp $$containerID:/usr/bin/$* $@; \
|
|
|
|
docker rm $$containerID )
|
|
|
|
chmod +x $@
|
|
|
|
|
2017-12-13 04:34:55 +00:00
|
|
|
install: FORCE
|
|
|
|
mkdir -p $(DESTDIR)/bin
|
|
|
|
install $(BINARIES) $(DESTDIR)/bin
|
|
|
|
|
|
|
|
clean: FORCE
|
|
|
|
rm -rf ./bin
|
|
|
|
|
2017-05-26 00:16:32 +00:00
|
|
|
test:
|
2017-05-27 05:10:26 +00:00
|
|
|
./hack/test
|
2017-05-26 00:16:32 +00:00
|
|
|
|
2017-06-19 23:10:09 +00:00
|
|
|
lint:
|
|
|
|
./hack/lint
|
2017-07-12 05:08:53 +00:00
|
|
|
|
2017-06-19 23:10:09 +00:00
|
|
|
validate-vendor:
|
|
|
|
./hack/validate-vendor
|
|
|
|
|
|
|
|
validate-all: test lint validate-vendor
|
|
|
|
|
2017-05-25 23:26:11 +00:00
|
|
|
vendor:
|
|
|
|
./hack/update-vendor
|
2017-07-12 05:08:53 +00:00
|
|
|
|
2017-12-13 04:34:55 +00:00
|
|
|
.PHONY: vendor test binaries binaries-all install clean lint validate-all validate-vendor
|
2017-07-12 05:08:53 +00:00
|
|
|
FORCE:
|