diff --git a/Makefile b/Makefile index 1294220eb84..357402deb68 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/docs/docsite/Makefile b/docs/docsite/Makefile index 970c148f4c2..7449d5e9785 100644 --- a/docs/docsite/Makefile +++ b/docs/docsite/Makefile @@ -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