mirror of
https://github.com/mappu/miqt.git
synced 2025-01-20 21:50:38 +00:00
makefile: allow using a custom docker invocation
This commit is contained in:
parent
b4c82ca133
commit
8df8898dd8
7
Makefile
7
Makefile
@ -1,17 +1,18 @@
|
|||||||
BUILDSTAMPS = docker/genbindings.docker-buildstamp
|
BUILDSTAMPS = docker/genbindings.docker-buildstamp
|
||||||
|
DOCKER = docker
|
||||||
|
|
||||||
all: genbindings
|
all: genbindings
|
||||||
|
|
||||||
docker/genbindings.docker-buildstamp: docker/genbindings.Dockerfile
|
docker/genbindings.docker-buildstamp: docker/genbindings.Dockerfile
|
||||||
docker build -t miqt/genbindings:latest -f docker/genbindings.Dockerfile .
|
$(DOCKER) build -t miqt/genbindings:latest -f docker/genbindings.Dockerfile .
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
docker image rm -f miqt/genbindings:latest
|
$(DOCKER) image rm -f miqt/genbindings:latest
|
||||||
rm -f $(BUILDSTAMPS)
|
rm -f $(BUILDSTAMPS)
|
||||||
|
|
||||||
genbindings: $(BUILDSTAMPS)
|
genbindings: $(BUILDSTAMPS)
|
||||||
mkdir -p ~/.cache/go-build
|
mkdir -p ~/.cache/go-build
|
||||||
docker run --user $$(id -u):$$(id -g) -v ~/.cache/go-build:/.cache/go-build -v $$PWD:/src -w /src miqt/genbindings:latest /bin/bash -c 'cd cmd/genbindings && go build && ./genbindings'
|
$(DOCKER) run --user $$(id -u):$$(id -g) -v ~/.cache/go-build:/.cache/go-build -v $$PWD:/src -w /src miqt/genbindings:latest /bin/bash -c 'cd cmd/genbindings && go build && ./genbindings'
|
||||||
|
|
||||||
.PHONY : all clean genbindings
|
.PHONY : all clean genbindings
|
||||||
|
Loading…
x
Reference in New Issue
Block a user