From c289312f964b6e8851d0812b65f59c8b0387e78d Mon Sep 17 00:00:00 2001
From: Markus Heiser <markus.heiser@darmarit.de>
Date: Wed, 26 Oct 2016 08:23:14 +0200
Subject: [PATCH] doc-rst: make dev-tools folder buildable stand-alone

Add minimal conf.py and moved dev-tools/tools.rst to dev-tools/index.rst
makes the dev-tools folder buildable stand-alone. To build only this
folder run::

  make SPHINXDIRS=dev-tools htmldocs
  make SPHINXDIRS=dev-tools pdfdocs

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
---
 Documentation/dev-tools/conf.py                  | 10 ++++++++++
 Documentation/dev-tools/{tools.rst => index.rst} |  8 ++++++++
 Documentation/index.rst                          |  2 +-
 3 files changed, 19 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/dev-tools/conf.py
 rename Documentation/dev-tools/{tools.rst => index.rst} (87%)

diff --git a/Documentation/dev-tools/conf.py b/Documentation/dev-tools/conf.py
new file mode 100644
index 0000000000000..7faafa3f78886
--- /dev/null
+++ b/Documentation/dev-tools/conf.py
@@ -0,0 +1,10 @@
+# -*- coding: utf-8; mode: python -*-
+
+project = "Development tools for the kernel"
+
+tags.add("subproject")
+
+latex_documents = [
+    ('index', 'dev-tools.tex', project,
+     'The kernel development community', 'manual'),
+]
diff --git a/Documentation/dev-tools/tools.rst b/Documentation/dev-tools/index.rst
similarity index 87%
rename from Documentation/dev-tools/tools.rst
rename to Documentation/dev-tools/index.rst
index 824ae8e54dd5b..07d881147ef3c 100644
--- a/Documentation/dev-tools/tools.rst
+++ b/Documentation/dev-tools/index.rst
@@ -23,3 +23,11 @@ whole; patches welcome!
    kmemleak
    kmemcheck
    gdb-kernel-debugging
+
+
+.. only::  subproject and html
+
+   Indices
+   =======
+
+   * :ref:`genindex`
diff --git a/Documentation/index.rst b/Documentation/index.rst
index f6a3d4766495f..0f98823126f2c 100644
--- a/Documentation/index.rst
+++ b/Documentation/index.rst
@@ -14,7 +14,7 @@ Contents:
    admin-guide/index
    kernel-documentation
    process/index
-   dev-tools/tools
+   dev-tools/index
    driver-api/index
    media/index
    gpu/index
-- 
GitLab