1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

set cpus only if not set already

This commit is contained in:
Brian Coca 2017-01-19 23:09:55 -05:00
parent c95bd7d9b0
commit 0803c638bb
2 changed files with 5 additions and 5 deletions

View file

@ -48,10 +48,10 @@ endif
ifeq ($(shell echo $(OS) | egrep -c 'Darwin|FreeBSD|OpenBSD|DragonFly'),1) 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) 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 else
DATE := $(shell date --utc --date="$(GIT_DATE)" +%Y%m%d%H%M) DATE := $(shell date --utc --date="$(GIT_DATE)" +%Y%m%d%H%M)
CPUS := $(shell nproc) CPUS ?= $(shell nproc)
endif endif
# DEB build parameters # DEB build parameters

View file

@ -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()"): SITELIB = $(shell python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"):
FORMATTER=../../hacking/module_formatter.py FORMATTER=../../hacking/module_formatter.py
DUMPER=../../hacking/dump_playbook_attributes.py DUMPER=../../hacking/dump_playbook_attributes.py
ifeq ($(shell echo $(OS) | egrep -ic 'Darwin|FreeBSD|OpenBSD|DragonFly'),1) 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 else
CPUS := $(shell nproc) CPUS ?= $(shell nproc)
endif endif
all: docs all: docs