Skip to content

Commit 56ac770

Browse files
ayourtchDave Barach
authored andcommitted
misc: fix the MAKE_PARALLEL_JOBS for 'make verify' target
MAKE_PARALLEL_JOBS was prepending "-j", which in case of nested targets like "verify" resulted in ninja being executed with "-j -j" flags. Solution: prepend -j only at the moment of setting the MAKE_PARALLEL_FLAGS variable, this keeps MAKE_PARALLEL_JOBS intact regardless of depth of the job call tree. Type: make Signed-off-by: Andrew Yourtchenko <[email protected]> Change-Id: I10a69fe527758e5a862852a9f2102aeaca30e88f
1 parent 2edff14 commit 56ac770

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

build-root/Makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -653,12 +653,10 @@ configure_check_timestamp = \
653653
# NB: GNU Make 4.2 will let us use '$(file </proc/cpuinfo)' to both test
654654
# for file presence and content; for now this will have to do.
655655
ifndef MAKE_PARALLEL_JOBS
656-
MAKE_PARALLEL_JOBS = -j $(if $(shell [ -f /proc/cpuinfo ] && head /proc/cpuinfo), \
656+
MAKE_PARALLEL_JOBS = $(if $(shell [ -f /proc/cpuinfo ] && head /proc/cpuinfo), \
657657
$(shell grep -c ^processor /proc/cpuinfo), 2)
658-
else
659-
MAKE_PARALLEL_JOBS := -j $(MAKE_PARALLEL_JOBS)
660658
endif
661-
MAKE_PARALLEL_FLAGS ?= $(if $($(PACKAGE)_make_parallel_fails),,$(MAKE_PARALLEL_JOBS))
659+
MAKE_PARALLEL_FLAGS ?= $(if $($(PACKAGE)_make_parallel_fails),,-j $(MAKE_PARALLEL_JOBS))
662660

663661
# Make command shorthand for packages & tools.
664662
PACKAGE_MAKE = \

0 commit comments

Comments
 (0)