diff --git a/openjdk/openjdk.mk b/openjdk/openjdk.mk index af97720cfc..cf4323dc75 100644 --- a/openjdk/openjdk.mk +++ b/openjdk/openjdk.mk @@ -19,7 +19,7 @@ OS:=$(shell uname -s) ARCH:=$(shell uname -m) ifeq ($(OS),Linux) - NPROCS:=$(shell grep -c ^processor /proc/cpuinfo) + NPROCS:=$(shell nproc) MEMORY_SIZE:=$(shell KMEMMB=`awk '/^MemTotal:/{print int($$2/1024)}' /proc/meminfo`; if [ -r /sys/fs/cgroup/memory/memory.limit_in_bytes ]; then CGMEM=`cat /sys/fs/cgroup/memory/memory.limit_in_bytes`; else CGMEM=`expr $${KMEMMB} \* 1024`; fi; CGMEMMB=`expr $${CGMEM} / 1024`; if [ "$${KMEMMB}" -lt "$${CGMEMMB}" ]; then echo "$${KMEMMB}"; else echo "$${CGMEMMB}"; fi) endif ifeq ($(OS),Darwin)