set cpus only if not set already

pull/20490/head
Brian Coca 7 years ago
parent c95bd7d9b0
commit 0803c638bb

@ -48,10 +48,10 @@ endif
ifeq ($(shell echo $(OS) | egrep -c 'Darwin|FreeBSD|OpenBSD|DragonFly'),1)
DATE := $(shell date -j -r $(shell git log -n 1 --format="%at") +%Y%m%d%H%M)
CPUS := $(shell sysctl hw.ncpu|awk '{print $$2}')
CPUS ?= $(shell sysctl hw.ncpu|awk '{print $$2}')
else
DATE := $(shell date --utc --date="$(GIT_DATE)" +%Y%m%d%H%M)
CPUS := $(shell nproc)
CPUS ?= $(shell nproc)
endif
# DEB build parameters

@ -1,11 +1,11 @@
OS = $(shell uname -s)
OS ?= $(shell uname -s)
SITELIB = $(shell python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"):
FORMATTER=../../hacking/module_formatter.py
DUMPER=../../hacking/dump_playbook_attributes.py
ifeq ($(shell echo $(OS) | egrep -ic 'Darwin|FreeBSD|OpenBSD|DragonFly'),1)
CPUS := $(shell sysctl hw.ncpu|awk '{print $$2}')
CPUS ?= $(shell sysctl hw.ncpu|awk '{print $$2}')
else
CPUS := $(shell nproc)
CPUS ?= $(shell nproc)
endif
all: docs

Loading…
Cancel
Save