Skip to content

Commit a90ffae

Browse files
authored
Automate use of MAKE_NB_JOBS=-1 to avoid adding a conflicting job count entry to MAKEFLAGS
1 parent a846977 commit a90ffae

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Makefile.system

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,11 @@ NO_PARALLEL_MAKE=0
247247
endif
248248
GETARCH_FLAGS += -DNO_PARALLEL_MAKE=$(NO_PARALLEL_MAKE)
249249

250+
ifndef MAKE_NB_JOBS
251+
ifneq (,$(patsubst -j%,%,$(filter -j%,$(MAKEFLAGS))))
252+
MAKE_NB_JOBS=-1
253+
endif
254+
endif
250255
ifdef MAKE_NB_JOBS
251256
GETARCH_FLAGS += -DMAKE_NB_JOBS=$(MAKE_NB_JOBS)
252257
endif

0 commit comments

Comments
 (0)