X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=build-root%2FMakefile;h=0fed520c728ff3a518f4ccf194383c5bae2dcd48;hb=b2861e8fb6855e9924887e5743d65ebbfbc6d7d2;hp=f2f77804ad41012213735340ddbc5e99b548fb43;hpb=9f5a2b6310ce5c8e59c32ca6f27d8a187b0e4346;p=vpp.git diff --git a/build-root/Makefile b/build-root/Makefile index f2f77804ad4..0fed520c728 100644 --- a/build-root/Makefile +++ b/build-root/Makefile @@ -653,16 +653,13 @@ configure_check_timestamp = \ # Package build ###################################################################### -linux_n_cpus = `grep '^processor' /proc/cpuinfo | wc -l` - -MAKE_PARALLEL_JOBS = \ - -j $(shell \ - if [ -f /proc/cpuinfo ] ; then \ - expr 2 '*' $(linux_n_cpus) ; \ - else \ - echo 1 ; \ - fi) - +# /proc/cpuinfo does not exist on platforms without a /proc and on some +# platforms, notably inside containers, it has no content. In those cases +# we assume there's 1 processor; we use 2*ncpu for the -j option. +# NB: GNU Make 4.2 will let us use '$(file