summaryrefslogtreecommitdiff
path: root/lib/spack/docs/conf.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/spack/docs/conf.py')
-rw-r--r--lib/spack/docs/conf.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/lib/spack/docs/conf.py b/lib/spack/docs/conf.py
index 35637093da..48f1fda47e 100644
--- a/lib/spack/docs/conf.py
+++ b/lib/spack/docs/conf.py
@@ -95,10 +95,21 @@ 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'])
-os.remove('modules.rst')
+#
+# Remove any previous API docs
+# Read the Docs doesn't clean up after previous builds
+# Without this, the API Docs will never actually update
+#
+apidoc_args = [
+ 'sphinx_apidoc', # The first arugment is ignored
+ '--force', # Overwrite existing files
+ '--no-toc', # Don't create a table of contents file
+ '--output-dir=.', # Directory to place all output
+]
+sphinx_apidoc(apidoc_args + ['../spack'])
+sphinx_apidoc(apidoc_args + ['../llnl'])
#
# Exclude everything in spack.__all__ from indexing. All of these