mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-04-09 20:34:27 +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>
22 lines
562 B
Makefile
22 lines
562 B
Makefile
.PHONY: all
|
|
|
|
DEPS=9pmount-vsock.c hvsock.c hvsock.h
|
|
|
|
all: Dockerfile $(DEPS)
|
|
docker build -t 9pmount-vsock:build .
|
|
docker run --rm 9pmount-vsock:build cat 9pmount-vsock > 9pmount-vsock
|
|
chmod 755 9pmount-vsock
|
|
|
|
9pmount-vsock: 9pmount-vsock.o hvsock.o
|
|
gcc -Wall -Werror -o 9pmount-vsock 9pmount-vsock.o hvsock.o -lpthread
|
|
|
|
9pmount-vsock.o: 9pmount-vsock.c hvsock.h
|
|
gcc -Wall -Werror -c 9pmount-vsock.c
|
|
|
|
hvsock.o: hvsock.c hvsock.h
|
|
gcc -Wall -Werror -c hvsock.c
|
|
|
|
clean:
|
|
rm -f 9pmount-vsock
|
|
docker images -q 9pmount-vsock:build | xargs docker rmi -f || true
|