diff --git a/doc/Makefile.am b/doc/Makefile.am index b0ccf234962..10e6f2f81f1 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -44,7 +44,11 @@ endif # BUILD_MANPAGES # see https://media.readthedocs.org/pdf/sphinx/1.6.3/sphinx.pdf # section 24.3.2 around page 247, third item for 'NotImplementedError', so this is kind of useless. -ALLSPHINXOPTS = $(SPHINXOPTS) -W +# Building with errors as warnings is fragile. What works for English may not +# when translated into Japanese, for example. To address this, we have the +# default configuration be to treat warnings as errors, but give up if the user +# passes SPHINXOPTS on the command line. +ALLSPHINXOPTS = $(or $(SPHINXOPTS),-W) # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(SPHINXOPTS)