From 863d2fddd79c3096cd421278dab420d1f3b0de63 Mon Sep 17 00:00:00 2001 From: onur-ozkan Date: Sat, 23 Sep 2023 23:58:43 +0300 Subject: [PATCH] Pass `-jN` from Make to `BOOTSTRAP_ARGS` Enables the same functionality as `x -jN` in Make by passing the `-jN` arg from Make to the `BOOTSTRAP_ARGS` args if it is specified. Signed-off-by: onur-ozkan --- src/bootstrap/mk/Makefile.in | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/bootstrap/mk/Makefile.in b/src/bootstrap/mk/Makefile.in index a9865e262fe..0b67079917c 100644 --- a/src/bootstrap/mk/Makefile.in +++ b/src/bootstrap/mk/Makefile.in @@ -6,6 +6,13 @@ Q := @ BOOTSTRAP_ARGS := endif +# Pass `-jN` to the bootstrap if it is specified. +ifdef MAKEFLAGS + ifneq (,$(findstring -j, $(MAKEFLAGS))) + BOOTSTRAP_ARGS += $(filter -j%, $(MAKEFLAGS)) + endif +endif + BOOTSTRAP := $(CFG_PYTHON) $(CFG_SRC_DIR)src/bootstrap/bootstrap.py all: