Files
linuxkit/alpine/packages/9pmount-vsock/Makefile
Ian Campbell 5165a6c795 Add || true to the docker rmi invocations in the clean target
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>
2016-06-08 13:59:47 +01:00

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