Change handling for missing releng docs
authorTeemu Murtola <teemu.murtola@gmail.com>
Wed, 6 Jul 2016 18:27:39 +0000 (21:27 +0300)
committerErik Lindahl <erik.lindahl@gmail.com>
Thu, 7 Jul 2016 15:59:05 +0000 (17:59 +0200)
Use a placeholder document from the source tree instead of generating it
on the fly in case RELENG_PATH is not set.

Also fix other warnings that got generated with RELENG_PATH not set.

Fixes #2000

Change-Id: I80b075a39eeff36e64b78cd58b09bc5bdde6ffad

docs/CMakeLists.txt
docs/SphinxMacros.cmake
docs/dev-manual/releng/index.rst [new file with mode: 0644]
docs/dev-manual/releng/jenkins-howto.rst [new file with mode: 0644]
docs/dev-manual/releng/jenkins-ui.rst [new file with mode: 0644]

index 0e9b7f47de432d4a88c822ec4910326b5e4706f4..ec6e4550ef5366f00ee9f979c5a096bdbcc22b4b 100644 (file)
@@ -156,8 +156,11 @@ if (SPHINX_FOUND)
             FROM ${RELENG_PATH}/docs TO dev-manual/releng PREFIX releng/docs/
             FILES ${RELENG_SPHINX_FILES})
     else()
-        gmx_add_dummy_sphinx_input_file(dev-manual/releng/index.rst
-            "releng repository (missing)")
+        gmx_add_sphinx_source_files(FILES
+            dev-manual/releng/index.rst
+            dev-manual/releng/jenkins-howto.rst
+            dev-manual/releng/jenkins-ui.rst
+            )
     endif()
     gmx_add_sphinx_input_target(sphinx-input)
     # Remove other rst files from the build tree, since they confuse Sphinx.
index 5da91a18deae91120f370b09b037b464f31d9c38..efc95024e4a59264dff3d09a046f7493575f7c98 100644 (file)
@@ -66,16 +66,6 @@ function(gmx_add_sphinx_source_files)
     set(_SPHINX_INPUT_FILES "${_SPHINX_INPUT_FILES}" PARENT_SCOPE)
 endfunction()
 
-macro(gmx_add_dummy_sphinx_input_file FILEPATH TITLE)
-    set(_target ${_SPHINX_INPUT_ROOT}/${FILEPATH})
-    set(_underline "=====================================================")
-    file(WRITE  ${_target} "
-${TITLE}
-${_underline}
-")
-    list(APPEND _SPHINX_INPUT_FILES ${_target})
-endmacro()
-
 macro(gmx_remove_obsolete_sphinx_input_files IGNORE_PATTERN)
     file(GLOB_RECURSE _obsolete_sources ${_SPHINX_INPUT_ROOT}/*.rst)
     list(REMOVE_ITEM _obsolete_sources ${_SPHINX_INPUT_FILES})
diff --git a/docs/dev-manual/releng/index.rst b/docs/dev-manual/releng/index.rst
new file mode 100644 (file)
index 0000000..bc6b8cc
--- /dev/null
@@ -0,0 +1,17 @@
+.. This file is a placeholder that is used in case RELENG_PATH does not
+   identify the location of the releng repository.
+
+.. _releng-workflow-release:
+
+releng repository (missing)
+===========================
+
+.. toctree::
+   :hidden:
+
+   jenkins-howto
+   jenkins-ui
+
+This documentation was built without releng documentation.
+If you want to see this documentation, set ``RELENG_PATH`` CMake variable to
+point to the root of a checkout from the releng repository.
diff --git a/docs/dev-manual/releng/jenkins-howto.rst b/docs/dev-manual/releng/jenkins-howto.rst
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/docs/dev-manual/releng/jenkins-ui.rst b/docs/dev-manual/releng/jenkins-ui.rst
new file mode 100644 (file)
index 0000000..e69de29