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

From: Kees Cook
Date: Thu Sep 19 2019 - 17:19:09 EST


On Thu, Sep 19, 2019 at 04:25:49PM -0300, Mauro Carvalho Chehab wrote:
> Em Thu, 19 Sep 2019 11:18:52 -0700
> Kees Cook <keescook@xxxxxxxxxxxx> escreveu:
> > [...]
> > +# Fetch the make environment options.
> > +flags = os.environ.get('MAKEFLAGS', None)
> > +if flags == None:
> > + print("1")
> > + sys.exit(0)
> > +
> > +# Look for "--jobserver=R,W"
> > +opts = [x for x in flags.split(" ") if x.startswith("--jobserver")]
> > +if len(opts) != 1:
> > + print("1")
> > + sys.exit(0)
>
> Using "1" as default if -j is not specified doesn't sound a good idea. I
> mean, Sphinx is very slow without any parallelism. I would keep "auto" as
> default here, if version >= 1.7 (and if there's no explicit SPHINXOPTS).

Okay, that's fair. This does introduce a behavioral regression from that
perspective. Let me spin a v2 that'll DTRT.

--
Kees Cook