Fix T48078: incorrect OS X command for retrieving number of CPUs on in Makefile.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Fri, 8 Apr 2016 21:58:37 +0000 (23:58 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Fri, 8 Apr 2016 22:25:18 +0000 (00:25 +0200)
GNUmakefile

index 2732fdb6c8c238f8294e046a65242d77b8e4eab5..df2d705132692cd72103d698c8d29ff341cbccb7 100644 (file)
@@ -87,13 +87,13 @@ ifndef NPROCS
                NPROCS:=$(shell nproc)
        endif
        ifeq ($(OS), Darwin)
-               NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f3)
+               NPROCS:=$(shell sysctl -n hw.ncpu)
        endif
        ifeq ($(OS), FreeBSD)
-               NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f2 )
+               NPROCS:=$(shell sysctl -n hw.ncpu)
        endif
        ifeq ($(OS), NetBSD)
-               NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f2 )
+               NPROCS:=$(shell sysctl -n hw.ncpu)
        endif
 endif