mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
set cpus only if not set already
This commit is contained in:
4
Makefile
4
Makefile
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user