Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
detect number of procs during sphinx build (#16512)
Browse files Browse the repository at this point in the history
* detect number of procs during sphinx build

* improve variable naming
  • Loading branch information
aaronmarkham authored Oct 22, 2019
1 parent 34e4f71 commit 06b86da
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion docs/python_docs/python/Makefile_sphinx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,26 @@
# Makefile for Sphinx documentation
#

# Begin number of processors detection
NPROCS := 1
OS := $(shell uname)
export NPROCS

ifeq ($(NUMJOBS),)

ifeq ($(OS),Linux)
NPROCS := $(shell grep -c ^processor /proc/cpuinfo)
else ifeq ($(OS),Darwin)
NPROCS := $(shell system_profiler | awk '/Number of CPUs/ {print $$4}{next;}')
endif # $(OS)

else
NPROCS := $(NUMJOBS)
endif # $(NUMJOBS)
# End number of processors detection

# You can set these variables from the command line.
SPHINXOPTS = -j 32 -c ../scripts
SPHINXOPTS = -j$(NPROCS) -c ../scripts
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
Expand Down

0 comments on commit 06b86da

Please sign in to comment.