Cleanup: de-duplicate makefile OS checks
authorCampbell Barton <ideasman42@gmail.com>
Thu, 10 Aug 2017 12:36:47 +0000 (22:36 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 10 Aug 2017 12:37:35 +0000 (22:37 +1000)
GNUmakefile

index 9661f2926992ec60ef20cb0bb04c5996686e97a4..d1e575cfc3cc9e24aa2e859208fff02b36d2a416 100644 (file)
@@ -91,13 +91,7 @@ ifndef NPROCS
        ifeq ($(OS), Linux)
                NPROCS:=$(shell nproc)
        endif
-       ifeq ($(OS), Darwin)
-               NPROCS:=$(shell sysctl -n hw.ncpu)
-       endif
-       ifeq ($(OS), FreeBSD)
-               NPROCS:=$(shell sysctl -n hw.ncpu)
-       endif
-       ifeq ($(OS), NetBSD)
+       ifneq (,$(filter $(OS),Darwin FreeBSD NetBSD))
                NPROCS:=$(shell sysctl -n hw.ncpu)
        endif
 endif