Count processors under OSX.

This commit is contained in:
Bastian Kleineidam 2011-05-28 08:22:54 +02:00
parent 44c195f91b
commit 01004255b9

View file

@ -20,7 +20,11 @@ DNSPYTHON:=$(HOME)/src/dnspython-git
PEP8OPTS:=--repeat --ignore=E211,E501,E225,E301,E302,E241 \
--exclude="gzip2.py,httplib2.py,robotparser2.py,reindent.py"
PY2APPOPTS ?=
NUMPROCESSORS:=$(shell grep -c processor /proc/cpuinfo)
ifeq ($(shell uname),Darwin)
NUMPROCESSORS:=$(shell sysctl -a | grep machdep.cpu.core_count | cut -d " " -f 2)
else
NUMPROCESSORS:=$(shell grep -c processor /proc/cpuinfo)
endif
.PHONY: all