From 906cceef625f6e05b03d446fb4b375fcacb9bc4c Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Sat, 20 Apr 2024 12:48:52 -0700 Subject: [PATCH] Fix running `make -C build docker` Without this change I get the following error: `docker: Error response from daemon: create .: volume name is too short, names should be at least two alphanumeric characters.` After fixing that by using `pwd`, I get the following (the w flag is added due to `-C build`): `make: *** No rule to make target 'w'` Fix this by using -$(MAKEFLAGS). I confirmed that both `make -C build docker -j4` and `cd build && make docker -j4` work. --- build/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Makefile b/build/Makefile index fad4fbcf7..040ee6953 100644 --- a/build/Makefile +++ b/build/Makefile @@ -25,7 +25,7 @@ all: $(TARGETS) # Build with preinstalled docker container; first install it with: # docker pull riscvintl/riscv-docs-base-container-image:latest docker: - cd .. && docker run -it -v .:/build riscvintl/riscv-docs-base-container-image:latest /bin/sh -c 'cd ./build; make $(MAKEFLAGS)' + cd .. && docker run -it -v `pwd`:/build riscvintl/riscv-docs-base-container-image:latest /bin/sh -c 'cd ./build; make -$(MAKEFLAGS)' # Asciidoctor options ASCIIDOCTOR_OPTS := -a compress \