mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-01-05 13:19:49 +00:00
Linux xargs calls the command with no arguments if it gets no inputs, which `docker rmi` complains about. It provides -r / --no-run-if-empty to prevent this but unfortunately this isn't supported on OSX. Ignore errors from `docker rmi` so that `make clean` will keep going and clean up later stuff. Signed-off-by: Ian Campbell <ian.campbell@docker.com>
19 lines
447 B
Makefile
19 lines
447 B
Makefile
.PHONY: all
|
|
|
|
HDR=transfused.h transfused_log.h transfused_vsock.h
|
|
SRC=transfused.c transfused_log.c transfused_vsock.c
|
|
DEPS=$(HDR) $(SRC)
|
|
|
|
|
|
all: Dockerfile $(DEPS)
|
|
docker build -t transfused:build .
|
|
docker run --rm transfused:build cat transfused > transfused
|
|
chmod 755 transfused
|
|
|
|
transfused: $(DEPS)
|
|
gcc -g -static -Wall -Werror -o transfused $(SRC)
|
|
|
|
clean:
|
|
rm -f transfused
|
|
docker images -q transfused:build | xargs docker rmi -f || true
|