diff options
author | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-07-09 05:52:36 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-07-17 05:57:51 -0400 |
commit | 9d42afbe6bd4ce6d424159715e4abf3ea3ddb789 (patch) | |
tree | 15e19797a384b293645562b9ddb009c2ed6cee41 /Documentation/conf.py | |
parent | bff9e34c678552eb172916d9288913e8bd8cc9d1 (diff) |
docs: pdf: add all Documentation/*/index.rst to PDF output
Currently, all index files should be manually added to the
latex_documents array at conf.py.
While this allows fine-tuning some LaTeX specific things, like
the name of the output file and the name of the document, it
is not uncommon to forget adding new documents there.
So, add a logic that will seek for all Documentation/*/index.rst.
If the index is not yet at latex_documents, it includes using
a reasonable default.
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'Documentation/conf.py')
-rw-r--r-- | Documentation/conf.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Documentation/conf.py b/Documentation/conf.py index 3b2397bcb565..13b5f711bddf 100644 --- a/Documentation/conf.py +++ b/Documentation/conf.py | |||
@@ -410,6 +410,21 @@ latex_documents = [ | |||
410 | 'The kernel development community', 'manual'), | 410 | 'The kernel development community', 'manual'), |
411 | ] | 411 | ] |
412 | 412 | ||
413 | # Add all other index files from Documentation/ subdirectories | ||
414 | for fn in os.listdir('.'): | ||
415 | doc = os.path.join(fn, "index") | ||
416 | if os.path.exists(doc + ".rst"): | ||
417 | has = False | ||
418 | for l in latex_documents: | ||
419 | if l[0] == doc: | ||
420 | has = True | ||
421 | break | ||
422 | if not has: | ||
423 | latex_documents.append((doc, fn + '.tex', | ||
424 | 'Linux %s Documentation' % fn.capitalize(), | ||
425 | 'The kernel development community', | ||
426 | 'manual')) | ||
427 | |||
413 | # The name of an image file (relative to this directory) to place at the top of | 428 | # The name of an image file (relative to this directory) to place at the top of |
414 | # the title page. | 429 | # the title page. |
415 | #latex_logo = None | 430 | #latex_logo = None |