From 3a9388b43a435ac00bc6ea6aa154440e4f8df593 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Tue, 30 Aug 2016 21:02:34 -0700 Subject: Move sphinx-apidoc into conf.py, too. --- lib/spack/docs/.gitignore | 1 + lib/spack/docs/Makefile | 2 +- lib/spack/docs/conf.py | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) (limited to 'lib') 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 -- cgit v1.2.3-60-g2f50