On Wed, 29 May 2019 22:53:05 -0300 Mauro Carvalho Chehab <mchehab+samsung@xxxxxxxxxx> wrote: > > Yup. The point is that I see the sphinx-build output *in the docs-build > > output", not when I run it standalone (where it does the expected thing). > > Weird... could some versions of Sphinx be redirecting the output of > --version to stderr instead of stdout? > > If so, something like: > > perl -e 'open IN,"sphinx-build --version 2>&1 |"; while (<IN>) { if (m/([\d\.]+)/) { print "-jauto\n" if ($1 >= "1.7") } ;} close IN' > > would make it print "-jauto" with those other versions you're trying. That does improve the behavior from the command line; it seems that sphinx-build is indeed writing to stderr. BUT that still doesn't fix the docs build! To get the option to take effect, I also have to explicitly export SPHINXOPTS. So the winning combination is: export SPHINXOPTS = $(shell perl -e 'open IN,"sphinx-build --version 2>&1 |"; while (<IN>) { if (m/([\d\.]+)/) { print "-jauto" if ($$1 >= "1.7") } ;} close IN') I don't have any weird version of make, so I'm not sure why you see different results than I do here. I can apply those tweaks to your patch if it's OK with you. > I didn't try the python2 versions, though. Interestingly, I would appear to have both versions installed, with python2 winning in $PATH. jon