From f9b78a93122c3f80b28d48534cef8c327ec59e4e Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 27 Sep 2016 15:13:46 +0200 Subject: [PATCH] Configure sphinx to require 1.5 for building htmlhelp * This version contains the fix for sphinx-doc/sphinx#2550 so we want to assume it is present and tidy up all the external links. However if needed (and you don't care about the external links being broken) you can locally remove this version requirement. --- docs/Makefile | 2 +- docs/conf.py | 7 +++++++ docs/make.bat | 2 +- docs/make.sh | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index 5964a0364..40868db86 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -93,7 +93,7 @@ json: .PHONY: htmlhelp htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + $(SPHINXBUILD) -b htmlhelp -t htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp # Copy handwritten index file to output, overwriting auto-generated one @cp renderdoc.hhk $(BUILDDIR)/htmlhelp # Copy introduction page over index.html diff --git a/docs/conf.py b/docs/conf.py index 67ceb46fa..f7daba623 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -294,3 +294,10 @@ html_context = { 'show_source': False, 'html_show_sourcelink': False, } + +# We need 1.5 and above for the htmlhelp links to be handled properly without +# needing separate ugly _blank links. If you don't care about that, you can +# disable this +if(tags.has('htmlhelp')): + print("**** We require sphinx 1.5 for htmlhelp build to have the fix for issue #2550 ****") + needs_sphinx = '1.5' diff --git a/docs/make.bat b/docs/make.bat index a108f7c51..013a9b062 100644 --- a/docs/make.bat +++ b/docs/make.bat @@ -120,7 +120,7 @@ if "%1" == "json" ( ) if "%1" == "htmlhelp" ( - %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp + %SPHINXBUILD% -b htmlhelp -t htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp if errorlevel 1 exit /b 1 REM Copy handwritten index file to output, overwriting auto-generated one copy renderdoc.hhk %BUILDDIR%\htmlhelp\ diff --git a/docs/make.sh b/docs/make.sh index b1834419c..2eb5cc0bf 100644 --- a/docs/make.sh +++ b/docs/make.sh @@ -102,7 +102,7 @@ if [ $1 == "json" ]; then fi if [ $1 == "htmlhelp" ]; then - $SPHINXBUILD -b htmlhelp $ALLSPHINXOPTS $BUILDDIR/htmlhelp + $SPHINXBUILD -b htmlhelp -t htmlhelp $ALLSPHINXOPTS $BUILDDIR/htmlhelp if [ $? != 0 ]; then exit 1; fi # Copy handwritten index file to output, overwriting auto-generated one cp renderdoc.hhk $BUILDDIR/htmlhelp