1. Georg Brandl
  2. sphinx


sphinx / doc / invocation.rst

Invocation of sphinx-build

The :program:`sphinx-build` script builds a Sphinx documentation set. It is called like this:

$ sphinx-build [options] sourcedir builddir [filenames]

where sourcedir is the :term:`source directory`, and builddir is the directory in which you want to place the built documentation. Most of the time, you don't need to specify any filenames.

The :program:`sphinx-build` script has several options:

You can also give one or more filenames on the command line after the source and build directories. Sphinx will then try to build only these output files (and their dependencies).

Makefile options

The :file:`Makefile` and :file:`make.bat` files created by :program:`sphinx-quickstart` usually run :program:`sphinx-build` only with the :option:`-b` and :option:`-d` options. However, they support the following variables to customize behavior: