File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ mpl-run: &mpl-install
6868
6969doc-run : &doc-build
7070 name : Build documentation
71- command : make O=-W html
71+ command : make html
7272 working_directory : doc
7373
7474doc-bundle-run : &doc-bundle
Original file line number Diff line number Diff line change 22#
33
44# You can set these variables from the command line.
5- SPHINXOPTS =
5+ SPHINXOPTS = -W
66SPHINXBUILD = python -msphinx
77SPHINXPROJ = matplotlib
88SOURCEDIR = .
Original file line number Diff line number Diff line change @@ -87,17 +87,24 @@ Other useful invocations include
8787 # Build pdf docs.
8888 make latexpdf
8989
90- You can build the documentation with several options:
90+ The ``SPHINXOPTS `` variable is set to ``-W `` by default to turn warnings into
91+ errors. To unset it, use
9192
92- * ``make O=-W html `` turns Sphinx warnings into errors. The continuous
93- integration script uses this option.
94- * ``make O=-j4 html `` (for example) runs a parallel build with 4 processes.
93+ .. code-block :: sh
94+
95+ make SPHINXOPTS= html
96+
97+ You can use the ``O `` variable to set additional options:
98+
99+ * ``make O=-j4 html `` runs a parallel build with 4 processes.
95100* ``make O=-Dplot_formats=png:100 html `` saves figures in low resolution.
96101* ``make O=-Dplot_gallery=0 html `` skips the gallery build.
97102
98- Multiple options can be combined using e.g. ``make O='-W -j4 ...' html ``. On
99- Windows, the option needs to be set as the ``SPHINXOPTS `` environment
100- variable, e.g. ``set SPHINXOPTS=-W -j4 & make html ``.
103+ Multiple options can be combined using e.g. ``make O='-j4 -Dplot_gallery=0'
104+ html ``.
105+
106+ On Windows, options needs to be set as environment variables, e.g. ``set O=-W
107+ -j4 & make html ``.
101108
102109Writing new documentation
103110=========================
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ if "%SPHINXBUILD%" == "" (
1010set SOURCEDIR = .
1111set BUILDDIR = build
1212set SPHINXPROJ = matplotlib
13+ set SPHINXOPTS = -W
14+ set O =
1315
1416%SPHINXBUILD% > NUL 2 > NUL
1517if errorlevel 9009 (
@@ -26,11 +28,11 @@ if errorlevel 9009 (
2628
2729if " %1 " == " " goto help
2830
29- %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
31+ %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
3032goto end
3133
3234:help
33- %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
35+ %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
3436
3537:end
3638popd
You can’t perform that action at this time.
0 commit comments