blob: 43e41ed74584490b899b1a2c69e7c3f29d550a78 [file] [log] [blame]
Jani Nikula22cba312016-05-19 15:14:05 +03001# -*- coding: utf-8 -*-
2#
3# The Linux Kernel documentation build configuration file, created by
4# sphinx-quickstart on Fri Feb 12 13:51:46 2016.
5#
6# This file is execfile()d with the current directory set to its
7# containing dir.
8#
9# Note that not all possible configuration values are present in this
10# autogenerated file.
11#
12# All configuration values have a default; values that are commented out
13# serve to show the default.
14
15import sys
16import os
17
18# If extensions (or modules to document with autodoc) are in another directory,
19# add these directories to sys.path here. If the directory is relative to the
20# documentation root, use os.path.abspath to make it absolute, like shown here.
Jani Nikula24dcdeb2016-05-20 11:51:47 +030021sys.path.insert(0, os.path.abspath('sphinx'))
Markus Heiser606b9ac2016-08-13 16:12:42 +020022from load_config import loadConfig
Jani Nikula22cba312016-05-19 15:14:05 +030023
24# -- General configuration ------------------------------------------------
25
26# If your documentation needs a minimal Sphinx version, state it here.
27#needs_sphinx = '1.0'
28
29# Add any Sphinx extension module names here, as strings. They can be
30# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
31# ones.
Markus Heiser627e32d2016-07-08 14:15:05 +020032extensions = ['kernel-doc', 'rstFlatTable', 'kernel_include']
Jani Nikula22cba312016-05-19 15:14:05 +030033
34# Gracefully handle missing rst2pdf.
35try:
36 import rst2pdf
37 extensions += ['rst2pdf.pdfbuilder']
38except ImportError:
39 pass
40
41# Add any paths that contain templates here, relative to this directory.
42templates_path = ['_templates']
43
44# The suffix(es) of source filenames.
45# You can specify multiple suffix as a list of string:
46# source_suffix = ['.rst', '.md']
47source_suffix = '.rst'
48
49# The encoding of source files.
50#source_encoding = 'utf-8-sig'
51
52# The master toctree document.
53master_doc = 'index'
54
55# General information about the project.
56project = 'The Linux Kernel'
57copyright = '2016, The kernel development community'
58author = 'The kernel development community'
59
60# The version info for the project you're documenting, acts as replacement for
61# |version| and |release|, also used in various other places throughout the
62# built documents.
63#
Jani Nikulac13ce442016-05-28 15:25:41 +030064# In a normal build, version and release are are set to KERNELVERSION and
65# KERNELRELEASE, respectively, from the Makefile via Sphinx command line
66# arguments.
67#
68# The following code tries to extract the information by reading the Makefile,
69# when Sphinx is run directly (e.g. by Read the Docs).
70try:
71 makefile_version = None
72 makefile_patchlevel = None
73 for line in open('../Makefile'):
74 key, val = [x.strip() for x in line.split('=', 2)]
75 if key == 'VERSION':
76 makefile_version = val
77 elif key == 'PATCHLEVEL':
78 makefile_patchlevel = val
79 if makefile_version and makefile_patchlevel:
80 break
81except:
82 pass
83finally:
84 if makefile_version and makefile_patchlevel:
85 version = release = makefile_version + '.' + makefile_patchlevel
86 else:
87 sys.stderr.write('Warning: Could not extract kernel version\n')
88 version = release = "unknown version"
Jani Nikula22cba312016-05-19 15:14:05 +030089
90# The language for content autogenerated by Sphinx. Refer to documentation
91# for a list of supported languages.
92#
93# This is also used if you do content translation via gettext catalogs.
94# Usually you set "language" from the command line for these cases.
95language = None
96
97# There are two options for replacing |today|: either, you set today to some
98# non-false value, then it is used:
99#today = ''
100# Else, today_fmt is used as the format for a strftime call.
101#today_fmt = '%B %d, %Y'
102
103# List of patterns, relative to source directory, that match files and
104# directories to ignore when looking for source files.
105exclude_patterns = ['output']
106
107# The reST default role (used for this markup: `text`) to use for all
108# documents.
109#default_role = None
110
111# If true, '()' will be appended to :func: etc. cross-reference text.
112#add_function_parentheses = True
113
114# If true, the current module name will be prepended to all description
115# unit titles (such as .. function::).
116#add_module_names = True
117
118# If true, sectionauthor and moduleauthor directives will be shown in the
119# output. They are ignored by default.
120#show_authors = False
121
122# The name of the Pygments (syntax highlighting) style to use.
123pygments_style = 'sphinx'
124
125# A list of ignored prefixes for module index sorting.
126#modindex_common_prefix = []
127
128# If true, keep warnings as "system message" paragraphs in the built documents.
129#keep_warnings = False
130
131# If true, `todo` and `todoList` produce output, else they produce nothing.
132todo_include_todos = False
133
134primary_domain = 'C'
135highlight_language = 'C'
136
137# -- Options for HTML output ----------------------------------------------
138
139# The theme to use for HTML and HTML Help pages. See the documentation for
140# a list of builtin themes.
141
142# The Read the Docs theme is available from
143# - https://github.com/snide/sphinx_rtd_theme
144# - https://pypi.python.org/pypi/sphinx_rtd_theme
145# - python-sphinx-rtd-theme package (on Debian)
146try:
147 import sphinx_rtd_theme
148 html_theme = 'sphinx_rtd_theme'
149 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
150except ImportError:
151 sys.stderr.write('Warning: The Sphinx \'sphinx_rtd_theme\' HTML theme was not found. Make sure you have the theme installed to produce pretty HTML output. Falling back to the default theme.\n')
152
153# Theme options are theme-specific and customize the look and feel of a theme
154# further. For a list of options available for each theme, see the
155# documentation.
156#html_theme_options = {}
157
158# Add any paths that contain custom themes here, relative to this directory.
159#html_theme_path = []
160
161# The name for this set of Sphinx documents. If None, it defaults to
162# "<project> v<release> documentation".
163#html_title = None
164
165# A shorter title for the navigation bar. Default is the same as html_title.
166#html_short_title = None
167
168# The name of an image file (relative to this directory) to place at the top
169# of the sidebar.
170#html_logo = None
171
172# The name of an image file (within the static path) to use as favicon of the
173# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
174# pixels large.
175#html_favicon = None
176
177# Add any paths that contain custom static files (such as style sheets) here,
178# relative to this directory. They are copied after the builtin static files,
179# so a file named "default.css" will overwrite the builtin "default.css".
Markus Heiserbc214672016-07-03 10:05:28 +0200180
181html_static_path = ['sphinx-static']
182
183html_context = {
184 'css_files': [
185 '_static/theme_overrides.css',
186 ],
187}
Jani Nikula22cba312016-05-19 15:14:05 +0300188
189# Add any extra paths that contain custom files (such as robots.txt or
190# .htaccess) here, relative to this directory. These files are copied
191# directly to the root of the documentation.
192#html_extra_path = []
193
194# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
195# using the given strftime format.
196#html_last_updated_fmt = '%b %d, %Y'
197
198# If true, SmartyPants will be used to convert quotes and dashes to
199# typographically correct entities.
200#html_use_smartypants = True
201
202# Custom sidebar templates, maps document names to template names.
203#html_sidebars = {}
204
205# Additional templates that should be rendered to pages, maps page names to
206# template names.
207#html_additional_pages = {}
208
209# If false, no module index is generated.
210#html_domain_indices = True
211
212# If false, no index is generated.
213#html_use_index = True
214
215# If true, the index is split into individual pages for each letter.
216#html_split_index = False
217
218# If true, links to the reST sources are added to the pages.
219#html_show_sourcelink = True
220
221# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
222#html_show_sphinx = True
223
224# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
225#html_show_copyright = True
226
227# If true, an OpenSearch description file will be output, and all pages will
228# contain a <link> tag referring to it. The value of this option must be the
229# base URL from which the finished HTML is served.
230#html_use_opensearch = ''
231
232# This is the file name suffix for HTML files (e.g. ".xhtml").
233#html_file_suffix = None
234
235# Language to be used for generating the HTML full-text search index.
236# Sphinx supports the following languages:
237# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
238# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr'
239#html_search_language = 'en'
240
241# A dictionary with options for the search language support, empty by default.
242# Now only 'ja' uses this config value
243#html_search_options = {'type': 'default'}
244
245# The name of a javascript file (relative to the configuration directory) that
246# implements a search results scorer. If empty, the default will be used.
247#html_search_scorer = 'scorer.js'
248
249# Output file base name for HTML help builder.
250htmlhelp_basename = 'TheLinuxKerneldoc'
251
252# -- Options for LaTeX output ---------------------------------------------
253
254latex_elements = {
255# The paper size ('letterpaper' or 'a4paper').
256#'papersize': 'letterpaper',
257
258# The font size ('10pt', '11pt' or '12pt').
259#'pointsize': '10pt',
260
261# Additional stuff for the LaTeX preamble.
262#'preamble': '',
263
264# Latex figure (float) alignment
265#'figure_align': 'htbp',
266}
267
268# Grouping the document tree into LaTeX files. List of tuples
269# (source start file, target name, title,
270# author, documentclass [howto, manual, or own class]).
271latex_documents = [
Jani Nikula3eb6cd62016-08-10 18:54:09 +0300272 ('kernel-documentation', 'kernel-documentation.tex', 'The Linux Kernel Documentation',
273 'The kernel development community', 'manual'),
274 ('gpu/index', 'gpu.tex', 'Linux GPU Driver Developer\'s Guide',
Jani Nikula22cba312016-05-19 15:14:05 +0300275 'The kernel development community', 'manual'),
276]
277
278# The name of an image file (relative to this directory) to place at the top of
279# the title page.
280#latex_logo = None
281
282# For "manual" documents, if this is true, then toplevel headings are parts,
283# not chapters.
284#latex_use_parts = False
285
286# If true, show page references after internal links.
287#latex_show_pagerefs = False
288
289# If true, show URL addresses after external links.
290#latex_show_urls = False
291
292# Documents to append as an appendix to all manuals.
293#latex_appendices = []
294
295# If false, no module index is generated.
296#latex_domain_indices = True
297
298
299# -- Options for manual page output ---------------------------------------
300
301# One entry per manual page. List of tuples
302# (source start file, name, description, authors, manual section).
303man_pages = [
304 (master_doc, 'thelinuxkernel', 'The Linux Kernel Documentation',
305 [author], 1)
306]
307
308# If true, show URL addresses after external links.
309#man_show_urls = False
310
311
312# -- Options for Texinfo output -------------------------------------------
313
314# Grouping the document tree into Texinfo files. List of tuples
315# (source start file, target name, title, author,
316# dir menu entry, description, category)
317texinfo_documents = [
318 (master_doc, 'TheLinuxKernel', 'The Linux Kernel Documentation',
319 author, 'TheLinuxKernel', 'One line description of project.',
320 'Miscellaneous'),
321]
322
323# Documents to append as an appendix to all manuals.
324#texinfo_appendices = []
325
326# If false, no module index is generated.
327#texinfo_domain_indices = True
328
329# How to display URL addresses: 'footnote', 'no', or 'inline'.
330#texinfo_show_urls = 'footnote'
331
332# If true, do not generate a @detailmenu in the "Top" node's menu.
333#texinfo_no_detailmenu = False
334
335
336# -- Options for Epub output ----------------------------------------------
337
338# Bibliographic Dublin Core info.
339epub_title = project
340epub_author = author
341epub_publisher = author
342epub_copyright = copyright
343
344# The basename for the epub file. It defaults to the project name.
345#epub_basename = project
346
347# The HTML theme for the epub output. Since the default themes are not
348# optimized for small screen space, using the same theme for HTML and epub
349# output is usually not wise. This defaults to 'epub', a theme designed to save
350# visual space.
351#epub_theme = 'epub'
352
353# The language of the text. It defaults to the language option
354# or 'en' if the language is not set.
355#epub_language = ''
356
357# The scheme of the identifier. Typical schemes are ISBN or URL.
358#epub_scheme = ''
359
360# The unique identifier of the text. This can be a ISBN number
361# or the project homepage.
362#epub_identifier = ''
363
364# A unique identification for the text.
365#epub_uid = ''
366
367# A tuple containing the cover image and cover page html template filenames.
368#epub_cover = ()
369
370# A sequence of (type, uri, title) tuples for the guide element of content.opf.
371#epub_guide = ()
372
373# HTML files that should be inserted before the pages created by sphinx.
374# The format is a list of tuples containing the path and title.
375#epub_pre_files = []
376
377# HTML files that should be inserted after the pages created by sphinx.
378# The format is a list of tuples containing the path and title.
379#epub_post_files = []
380
381# A list of files that should not be packed into the epub file.
382epub_exclude_files = ['search.html']
383
384# The depth of the table of contents in toc.ncx.
385#epub_tocdepth = 3
386
387# Allow duplicate toc entries.
388#epub_tocdup = True
389
390# Choose between 'default' and 'includehidden'.
391#epub_tocscope = 'default'
392
393# Fix unsupported image types using the Pillow.
394#epub_fix_images = False
395
396# Scale large images.
397#epub_max_image_width = 0
398
399# How to display URL addresses: 'footnote', 'no', or 'inline'.
400#epub_show_urls = 'inline'
401
402# If false, no index is generated.
403#epub_use_index = True
404
405#=======
406# rst2pdf
407#
408# Grouping the document tree into PDF files. List of tuples
409# (source start file, target name, title, author, options).
410#
411# See the Sphinx chapter of http://ralsina.me/static/manual.pdf
412#
413# FIXME: Do not add the index file here; the result will be too big. Adding
414# multiple PDF files here actually tries to get the cross-referencing right
415# *between* PDF files.
416pdf_documents = [
Mauro Carvalho Chehab520a2472016-07-15 07:42:08 -0300417 ('kernel-documentation', u'Kernel', u'Kernel', u'J. Random Bozo'),
Jani Nikula22cba312016-05-19 15:14:05 +0300418]
Jani Nikula24dcdeb2016-05-20 11:51:47 +0300419
420# kernel-doc extension configuration for running Sphinx directly (e.g. by Read
421# the Docs). In a normal build, these are supplied from the Makefile via command
422# line arguments.
423kerneldoc_bin = '../scripts/kernel-doc'
424kerneldoc_srctree = '..'
Markus Heiser606b9ac2016-08-13 16:12:42 +0200425
426# ------------------------------------------------------------------------------
427# Since loadConfig overwrites settings from the global namespace, it has to be
428# the last statement in the conf.py file
429# ------------------------------------------------------------------------------
430loadConfig(globals())