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