Re: [PATCH v3] docs: Use make invocation's -j argument for parallelism

From: Jonathan Corbet
Date: Tue Oct 01 2019 - 08:39:52 EST


On Tue, 24 Sep 2019 16:29:58 -0700
Kees Cook <keescook@xxxxxxxxxxxx> wrote:

> While sphinx 1.7 and later supports "-jauto" for parallelism, this
> effectively ignores the "-j" flag used in the "make" invocation, which
> may cause confusion for build systems. Instead, extract the available
> parallelism from "make"'s job server (since it is not exposed in any
> special variables) and use that for the "sphinx-build" run. Now things
> work correctly for builds where -j is specified at the top-level:
>
> make -j16 htmldocs
>
> If -j is not specified, continue to fallback to "-jauto" if available.
>
> Signed-off-by: Kees Cook <keescook@xxxxxxxxxxxx>

I finally messed with this a bit; it seems to do exactly what's written on
the box.

It seems to me that The Real Solutionâ here is to send a patch to the
Sphinx folks adding a "-jgmake" (or some such) option. It also seems to
me that none of us is likely to get around to that in the near future. So
I just applied this, thanks for dealing with all my picky comments...

jon