summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-08-30 21:02:34 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2016-08-30 21:02:34 -0700
commit3a9388b43a435ac00bc6ea6aa154440e4f8df593 (patch)
tree480607627bbdcbcf0a1aff7377a543f6d65200f6
parent32834dd67d20f2a58514bc9b9cd511e1a78d431e (diff)
downloadspack-3a9388b43a435ac00bc6ea6aa154440e4f8df593.tar.gz
spack-3a9388b43a435ac00bc6ea6aa154440e4f8df593.tar.bz2
spack-3a9388b43a435ac00bc6ea6aa154440e4f8df593.tar.xz
spack-3a9388b43a435ac00bc6ea6aa154440e4f8df593.zip
Move sphinx-apidoc into conf.py, too.
-rw-r--r--lib/spack/docs/.gitignore1
-rw-r--r--lib/spack/docs/Makefile2
-rw-r--r--lib/spack/docs/conf.py5
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