diff options
-rw-r--r-- | lib/spack/docs/.gitignore | 1 | ||||
-rw-r--r-- | lib/spack/docs/Makefile | 2 | ||||
-rw-r--r-- | lib/spack/docs/conf.py | 5 |
3 files changed, 7 insertions, 1 deletions
diff --git a/lib/spack/docs/.gitignore b/lib/spack/docs/.gitignore index 26c343d3eb..0bbf78cce0 100644 --- a/lib/spack/docs/.gitignore +++ b/lib/spack/docs/.gitignore @@ -1,4 +1,5 @@ package_list.rst command_index.rst spack*.rst +modules.rst _build diff --git a/lib/spack/docs/Makefile b/lib/spack/docs/Makefile index 302ffd4c97..f9eae29187 100644 --- a/lib/spack/docs/Makefile +++ b/lib/spack/docs/Makefile @@ -74,7 +74,7 @@ clean: -rm -f package_list.rst command_index.rst -rm -rf $(BUILDDIR)/* $(APIDOC_FILES) -html: apidoc +html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." diff --git a/lib/spack/docs/conf.py b/lib/spack/docs/conf.py index 06a2523ca2..c0dccaa6ba 100644 --- a/lib/spack/docs/conf.py +++ b/lib/spack/docs/conf.py @@ -42,6 +42,7 @@ import re import shutil import subprocess from glob import glob +from sphinx.apidoc import main as sphinx_apidoc # -- Spack customizations ----------------------------------------------------- @@ -93,6 +94,10 @@ with open('command_index.rst', 'a') as index: for cmd in sorted(command_names): index.write(' * :ref:`%s`\n' % cmd) + +# Run sphinx-apidoc +sphinx_apidoc(['-T', '-o', '.', '../spack']) + # # Exclude everything in spack.__all__ from indexing. All of these # symbols are imported from elsewhere in spack; their inclusion in |