[Bf-docboard-svn] bf-manual: [7191] trunk/blender_docs: Makefiles: Use -j auto for thread count

Aaron Carlisle noreply at blender.org
Mon Oct 5 22:49:15 CEST 2020


Revision: 7191
          https://developer.blender.org/rBM7191
Author:   Blendify
Date:     2020-10-05 22:49:14 +0200 (Mon, 05 Oct 2020)
Log Message:
-----------
Makefiles: Use -j auto for thread count

Modified Paths:
--------------
    trunk/blender_docs/Makefile
    trunk/blender_docs/make.bat

Modified: trunk/blender_docs/Makefile
===================================================================
--- trunk/blender_docs/Makefile	2020-10-05 20:24:46 UTC (rev 7190)
+++ trunk/blender_docs/Makefile	2020-10-05 20:49:14 UTC (rev 7191)
@@ -2,24 +2,12 @@
 # System Vars
 OS:=$(shell uname -s)
 
-# ------------------------------------------
-# Get the number of cores for threaded build
-ifndef NPROCS
-	NPROCS:=1
-	ifeq ($(OS), Linux)
-		NPROCS:=$(shell nproc)
-	endif
-	ifneq (,$(filter $(OS),Darwin FreeBSD NetBSD))
-		NPROCS:=$(shell sysctl -n hw.ncpu)
-	endif
-endif
-
 # End System Vars
 # ---------------
 
 # You can set these variables from the command line, and also
 # from the environment for the first two.
-SPHINXOPTS    ?= -j "$(NPROCS)"
+SPHINXOPTS    ?= -j auto
 LATEXOPTS     ?= "-interaction nonstopmode"
 SPHINXBUILD   ?= sphinx-build
 SOURCEDIR     = ./manual

Modified: trunk/blender_docs/make.bat
===================================================================
--- trunk/blender_docs/make.bat	2020-10-05 20:24:46 UTC (rev 7190)
+++ trunk/blender_docs/make.bat	2020-10-05 20:49:14 UTC (rev 7191)
@@ -7,7 +7,7 @@
 )
 set SOURCEDIR=./manual
 set BUILDDIR=build
-set SPHINXOPTS=-j %Number_Of_Processors%
+set SPHINXOPTS=-j auto
 
 REM Check if sphinx-build is available and fallback to Python version if any
 %SPHINXBUILD% 1>NUL 2>NUL
@@ -68,7 +68,7 @@
 
 if "%1" == "html" (
 	:html
-	%SPHINXBUILD% -b html %SPHINXOPTS% %SOURCEDIR% %BUILDDIR%/html
+	%SPHINXBUILD% -j 8 -b html %SPHINXOPTS% %SOURCEDIR% %BUILDDIR%/html
 	if errorlevel 1 exit /b 1
 	echo.
 	echo.Build finished. The HTML pages are in %BUILDDIR%/html.



More information about the Bf-docboard-svn mailing list