Skip to content

Commit

Permalink
Add %O% option to make.bat templates; update docs
Browse files Browse the repository at this point in the history
The make.bat_t and make.bat.new_t templates now pass %O% as well as
%SPHINXOPTS% to `sphinx-build`, in parity with Makefile.new_t.

The sphinx-build documentation page was updated to explicitly note
$(O) and %O% as shortcut variables.

Closes sphinx-doc#6323, per the comment thread discussion.
  • Loading branch information
bskinn committed May 13, 2019
1 parent 774c598 commit 0dbdae3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion doc/man/sphinx-build.rst
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ variables to customize behavior:

.. describe:: SPHINXOPTS

Additional options for :program:`sphinx-build`.
Additional options for :program:`sphinx-build`. These options can
also be set via the shortcut variable **O** (capital 'o').

.. _when-deprecation-warnings-are-displayed:

Expand Down
4 changes: 2 additions & 2 deletions sphinx/templates/quickstart/make.bat.new_t
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ if errorlevel 9009 (
exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
Expand Down
2 changes: 1 addition & 1 deletion sphinx/templates/quickstart/make.bat_t
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if "%SPHINXBUILD%" == "" (
)
set BUILDDIR={{ rbuilddir }}
set SOURCEDIR={{ rsrcdir }}
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% %SOURCEDIR%
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% %O% %SOURCEDIR%
set I18NSPHINXOPTS=%SPHINXOPTS% %SOURCEDIR%
if NOT "%PAPER%" == "" (
set ALLSPHINXOPTS=-D latex_elements.papersize=%PAPER%paper %ALLSPHINXOPTS%
Expand Down

0 comments on commit 0dbdae3

Please sign in to comment.