From 0803c638bb8763ca2831bd7364106b08617f9cd2 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Thu, 19 Jan 2017 23:09:55 -0500 Subject: [PATCH] set cpus only if not set already --- Makefile | 4 ++-- docs/docsite/Makefile | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 1294220eb8..357402deb6 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 970c148f4c..7449d5e978 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