[Bf-blender-cvs] [05d637280ce] master: Fix recent update to sphinx_doc_gen.sh

Campbell Barton noreply at git.blender.org
Thu Oct 8 02:25:14 CEST 2020


Commit: 05d637280cead978c502aa2c5785fa726f71f377
Author: Campbell Barton
Date:   Thu Oct 8 11:06:59 2020 +1100
Branches: master
https://developer.blender.org/rB05d637280cead978c502aa2c5785fa726f71f377

Fix recent update to sphinx_doc_gen.sh

2f1a0f6f0eabe090d3ea95c4f508ef72454369a2 copied Makefile syntax into a
shell script. Use sphinx-builds 'auto' command to set the number of
jobs to run.

===================================================================

M	doc/python_api/sphinx_doc_gen.sh

===================================================================

diff --git a/doc/python_api/sphinx_doc_gen.sh b/doc/python_api/sphinx_doc_gen.sh
index 0dcb8ce04a8..590de594875 100755
--- a/doc/python_api/sphinx_doc_gen.sh
+++ b/doc/python_api/sphinx_doc_gen.sh
@@ -27,22 +27,6 @@ else
 fi
 
 
-# -----------------------------------------------------------------------------
-# Get the number of cores for threaded build
-ifndef NPROCS
-	NPROCS:=1
-	ifeq ($(OS), Linux)
-		NPROCS:=$(shell nproc)
-	endif
-	ifeq ($(OS), NetBSD)
-		NPROCS:=$(shell getconf NPROCESSORS_ONLN)
-	endif
-	ifneq (,$(filter $(OS),Darwin FreeBSD))
-		NPROCS:=$(shell sysctl -n hw.ncpu)
-	endif
-endif
-
-
 # ----------------------------------------------------------------------------
 # Blender Version & Info
 
@@ -92,7 +76,7 @@ fi
 # Generate HTML (sphinx)
 
 if $DO_OUT_HTML ; then
-  sphinx-build -b html -j $(NPROCS) $SPHINX_WORKDIR/sphinx-in $SPHINX_WORKDIR/sphinx-out
+  sphinx-build -b html -j auto $SPHINX_WORKDIR/sphinx-in $SPHINX_WORKDIR/sphinx-out
 
   # XXX, saves space on upload and zip, should move HTML outside
   # and zip up there, for now this is OK
@@ -119,7 +103,7 @@ fi
 # Generate PDF (sphinx/laytex)
 
 if $DO_OUT_PDF ; then
-  sphinx-build -n -b latex -j $(NPROCS) $SPHINX_WORKDIR/sphinx-in $SPHINX_WORKDIR/sphinx-out
+  sphinx-build -n -b latex -j auto $SPHINX_WORKDIR/sphinx-in $SPHINX_WORKDIR/sphinx-out
   make -C $SPHINX_WORKDIR/sphinx-out
   mv $SPHINX_WORKDIR/sphinx-out/contents.pdf \
      $SPHINX_WORKDIR/sphinx-out/blender_python_reference_$BLENDER_VERSION.pdf



More information about the Bf-blender-cvs mailing list