From 2e96b850a272a7b53cfd49ef8d21dffcbf3554f0 Mon Sep 17 00:00:00 2001
From: Martyn Gigg <martyn.gigg@stfc.ac.uk>
Date: Wed, 11 Jun 2014 21:41:24 +0100
Subject: [PATCH] Allow single file selection for sphinx run

Refs #9639
---
 Code/Mantid/docs/runsphinx.py.in | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Code/Mantid/docs/runsphinx.py.in b/Code/Mantid/docs/runsphinx.py.in
index 5f8ea3ce9f9..fe2d50b7a84 100644
--- a/Code/Mantid/docs/runsphinx.py.in
+++ b/Code/Mantid/docs/runsphinx.py.in
@@ -17,8 +17,13 @@ def main():
     output_dir = os.path.join(sphinx_build_dir, builder)
     doctree_dir = os.path.join(sphinx_build_dir, "doctrees")
 
+    # See if we have been told to only process a particular file
+    src_file = os.environ.get("DOCS_SRC_FILE", None)
+
     import sphinx
     argv = [sys.executable, "-b", builder, "-d", doctree_dir, src_dir, output_dir]
+    if src_file is not None:
+        argv.append(src_file)
 
     # run
     sys.exit(sphinx.main(argv))
-- 
GitLab