Closed cschol closed 3 years ago
Does $(MAKE)
contain all makefile arguments? Try echo $(MAKE)
It does not contain the -j
argument. $(MAKE)
is already there and it didn't pass on the -j
from the top-level.
Example w/o MFLAGS (current master
):
docker run --rm --interactive --tty --volume=/home/cschol/src/library-v1/repos/FehlerFabrik-Suite/:/home/build/plugin-src --volume=/home/cschol/src/rack-plugin-toolchain/plugin-build:/home/build/rack-plugin-toolchain/plugin-build --env PLUGIN_DIR=/home/build/plugin-src rack-plugin-toolchain:1 /bin/bash -c "make plugin-build"
Example with MFLAGS:
docker run --rm --interactive --tty --volume=/home/cschol/src/library-v1/repos/FehlerFabrik-Suite/:/home/build/plugin-src --volume=/home/cschol/src/rack-plugin-toolchain/plugin-build:/home/build/rack-plugin-toolchain/plugin-build --env PLUGIN_DIR=/home/build/plugin-src rack-plugin-toolchain:1 /bin/bash -c "make plugin-build -j8 --jobserver-auth=3,4"
Ah, I see how this works. https://www.gnu.org/software/make/manual/html_node/Options_002fRecursion.html#Options_002fRecursion
The make flags are passed to sub-makes via the MAKEFLAGS
environment variable, not the MAKE
variable. Obviously environment variables aren't passed to the Docker environment, so MFLAGS
is needed.
Adding MFLAGS allows passing "-j N" to the Docker build from the invoking command line.