Makefile: make_parallel_flags via env variable 12/9512/3
authorEd Kern <ejk@cisco.com>
Wed, 22 Nov 2017 00:22:23 +0000 (17:22 -0700)
committerDamjan Marion <dmarion.lists@gmail.com>
Wed, 22 Nov 2017 20:19:00 +0000 (20:19 +0000)
    /proc/cpuinfo with container builds may lead to jenkins failures
    ability to pass in MAKE_PARALLEL_FLAGS via env directly for
    container builds

Change-Id: Id02acb542d5ffbe3f4dec7712ae2cb07512b236d
Signed-off-by: Ed Kern <ejk@cisco.com>
build-root/Makefile

index dd24b4c..d491e71 100644 (file)
@@ -645,7 +645,7 @@ configure_check_timestamp =                                         \
 # for file presence and content; for now this will have to do.
 MAKE_PARALLEL_JOBS = -j $(if $(shell [ -f /proc/cpuinfo ] && head /proc/cpuinfo), \
        $(shell grep -c ^processor /proc/cpuinfo), 2)
-MAKE_PARALLEL_FLAGS = $(if $($(PACKAGE)_make_parallel_fails),,$(MAKE_PARALLEL_JOBS))
+MAKE_PARALLEL_FLAGS ?= $(if $($(PACKAGE)_make_parallel_fails),,$(MAKE_PARALLEL_JOBS))
 
 # Make command shorthand for packages & tools.
 PACKAGE_MAKE =                                 \