All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
To: Jonathan Corbet <corbet@lwn.net>
Cc: Linux Doc Mailing List <linux-doc@vger.kernel.org>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/5] docs: by default, build docs a lot faster with Sphinx >= 1.7
Date: Wed, 29 May 2019 20:20:05 -0300	[thread overview]
Message-ID: <20190529202005.04dcd4a0@coco.lan> (raw)
In-Reply-To: <20190529170202.65c7f9ca@lwn.net>

Em Wed, 29 May 2019 17:02:02 -0600
Jonathan Corbet <corbet@lwn.net> escreveu:

> On Mon, 27 May 2019 08:07:40 -0300
> Mauro Carvalho Chehab <mchehab+samsung@kernel.org> wrote:
> 
> > Since Sphinx version 1.7, it is possible to use "-jauto" in
> > order to speedup documentation builds. On older versions,
> > while -j was already supported, one would need to set the
> > number of threads manually.
> > 
> > So, if SPHINXOPTS is not provided, add -jauto, in order to
> > speed up the build. That makes it *a lot* times faster than
> > without -j.
> > 
> > If one really wants to slow things down, it can just use:
> > 
> > 	make SPHINXOPTS=-j1 htmldocs
> > 
> > Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
> > ---
> >  Documentation/Makefile | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/Documentation/Makefile b/Documentation/Makefile
> > index 380e24053d6f..794233d05789 100644
> > --- a/Documentation/Makefile
> > +++ b/Documentation/Makefile
> > @@ -28,6 +28,8 @@ ifeq ($(HAVE_SPHINX),0)
> >  
> >  else # HAVE_SPHINX
> >  
> > +SPHINXOPTS = $(shell perl -e 'open IN,"sphinx-build --version |"; while (<IN>) { if (m/([\d\.]+)/) { print "-jauto" if ($$1 >= "1.7") } ;} close IN')
> > +  
> 
> So this totally fails to work for me with any version of sphinx, and I'm
> not enough of a Perl person to figure it out.  Sometimes I'll see the
> sphinx-build output, i.e.:
> 
>     sphinx-build 1.8.4
> 
> and sometimes (like with 2.0) I don't, but I never get -jauto regardless.

Hmm... with 2.0.0 --version prints the version.

	$ sphinx-build --version
	sphinx-build 2.0.0

Afaikt, only too old versions will output it with a different format:


	$ sphinx-build --version
	Sphinx (sphinx-build) 1.2


> Not sure what's going on here?

Do you have SPHINXOPTS already set on your environment? If so, Makefile
will not override the existing environment.

Here, if I call it by hand (replacing $$1 by $1), it does the right
thing. For example:

1.8.4:

	$ sphinx-build --version
	sphinx-build 1.8.4
	$ perl -e 'open IN,"sphinx-build --version |"; while (<IN>) { if (m/([\d\.]+)/) { print "-jauto\n" if ($1 >= "1.7") } ;} close IN'
	-jauto

2.0.0:
	$ sphinx-build --version
	sphinx-build 2.0.0
	(sphinx_2.0) $ perl -e 'open IN,"sphinx-build --version |"; while (<IN>) { if (m/([\d\.]+)/) { print "-jauto\n" if ($1 >= "1.7") } ;} close IN'
-jauto


Thanks,
Mauro

  reply	other threads:[~2019-05-29 23:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-27 11:07 [PATCH 0/5] Improvements to the documentation build system Mauro Carvalho Chehab
2019-05-27 11:07 ` [PATCH 1/5] scripts/sphinx-pre-install: make activate hint smarter Mauro Carvalho Chehab
2019-05-27 11:07 ` [PATCH 2/5] scripts/sphinx-pre-install: get rid of RHEL7 explicity check Mauro Carvalho Chehab
2019-05-27 11:07 ` [PATCH 3/5] scripts/sphinx-pre-install: always check if version is compatible with build Mauro Carvalho Chehab
2019-05-27 11:07 ` [PATCH 4/5] docs: by default, build docs a lot faster with Sphinx >= 1.7 Mauro Carvalho Chehab
2019-05-29 23:02   ` Jonathan Corbet
2019-05-29 23:20     ` Mauro Carvalho Chehab [this message]
2019-05-29 23:47       ` Jonathan Corbet
2019-05-30  1:53         ` Mauro Carvalho Chehab
2019-05-30 14:54           ` Jonathan Corbet
2019-05-30 15:08             ` Mauro Carvalho Chehab
2019-05-27 11:07 ` [PATCH 5/5] docs: requirements.txt: recommend Sphinx 1.7.9 Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190529202005.04dcd4a0@coco.lan \
    --to=mchehab+samsung@kernel.org \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.