]>
Commit | Line | Data |
---|---|---|
22cba31b JN |
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. | |
24dcdeb2 | 21 | sys.path.insert(0, os.path.abspath('sphinx')) |
606b9ac8 | 22 | from load_config import loadConfig |
22cba31b JN |
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. | |
627e32df | 32 | extensions = ['kernel-doc', 'rstFlatTable', 'kernel_include'] |
22cba31b | 33 | |
22cba31b JN |
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 | # | |
c13ce448 JN |
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" | |
22cba31b JN |
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". | |
bc214671 MH |
173 | |
174 | html_static_path = ['sphinx-static'] | |
175 | ||
176 | html_context = { | |
177 | 'css_files': [ | |
178 | '_static/theme_overrides.css', | |
179 | ], | |
180 | } | |
22cba31b JN |
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'). | |
caee5cde | 249 | 'papersize': 'a4paper', |
22cba31b JN |
250 | |
251 | # The font size ('10pt', '11pt' or '12pt'). | |
caee5cde | 252 | 'pointsize': '10pt', |
22cba31b JN |
253 | |
254 | # Latex figure (float) alignment | |
255 | #'figure_align': 'htbp', | |
caee5cde MCC |
256 | |
257 | # Additional stuff for the LaTeX preamble. | |
258 | 'preamble': ''' | |
259 | % Allow generate some pages in landscape | |
260 | \\usepackage{lscape} | |
261 | ''' | |
22cba31b JN |
262 | } |
263 | ||
264 | # Grouping the document tree into LaTeX files. List of tuples | |
265 | # (source start file, target name, title, | |
266 | # author, documentclass [howto, manual, or own class]). | |
267 | latex_documents = [ | |
3eb6cd68 JN |
268 | ('kernel-documentation', 'kernel-documentation.tex', 'The Linux Kernel Documentation', |
269 | 'The kernel development community', 'manual'), | |
270 | ('gpu/index', 'gpu.tex', 'Linux GPU Driver Developer\'s Guide', | |
22cba31b JN |
271 | 'The kernel development community', 'manual'), |
272 | ] | |
273 | ||
274 | # The name of an image file (relative to this directory) to place at the top of | |
275 | # the title page. | |
276 | #latex_logo = None | |
277 | ||
278 | # For "manual" documents, if this is true, then toplevel headings are parts, | |
279 | # not chapters. | |
280 | #latex_use_parts = False | |
281 | ||
282 | # If true, show page references after internal links. | |
283 | #latex_show_pagerefs = False | |
284 | ||
285 | # If true, show URL addresses after external links. | |
286 | #latex_show_urls = False | |
287 | ||
288 | # Documents to append as an appendix to all manuals. | |
289 | #latex_appendices = [] | |
290 | ||
291 | # If false, no module index is generated. | |
292 | #latex_domain_indices = True | |
293 | ||
294 | ||
295 | # -- Options for manual page output --------------------------------------- | |
296 | ||
297 | # One entry per manual page. List of tuples | |
298 | # (source start file, name, description, authors, manual section). | |
299 | man_pages = [ | |
300 | (master_doc, 'thelinuxkernel', 'The Linux Kernel Documentation', | |
301 | [author], 1) | |
302 | ] | |
303 | ||
304 | # If true, show URL addresses after external links. | |
305 | #man_show_urls = False | |
306 | ||
307 | ||
308 | # -- Options for Texinfo output ------------------------------------------- | |
309 | ||
310 | # Grouping the document tree into Texinfo files. List of tuples | |
311 | # (source start file, target name, title, author, | |
312 | # dir menu entry, description, category) | |
313 | texinfo_documents = [ | |
314 | (master_doc, 'TheLinuxKernel', 'The Linux Kernel Documentation', | |
315 | author, 'TheLinuxKernel', 'One line description of project.', | |
316 | 'Miscellaneous'), | |
317 | ] | |
318 | ||
319 | # Documents to append as an appendix to all manuals. | |
320 | #texinfo_appendices = [] | |
321 | ||
322 | # If false, no module index is generated. | |
323 | #texinfo_domain_indices = True | |
324 | ||
325 | # How to display URL addresses: 'footnote', 'no', or 'inline'. | |
326 | #texinfo_show_urls = 'footnote' | |
327 | ||
328 | # If true, do not generate a @detailmenu in the "Top" node's menu. | |
329 | #texinfo_no_detailmenu = False | |
330 | ||
331 | ||
332 | # -- Options for Epub output ---------------------------------------------- | |
333 | ||
334 | # Bibliographic Dublin Core info. | |
335 | epub_title = project | |
336 | epub_author = author | |
337 | epub_publisher = author | |
338 | epub_copyright = copyright | |
339 | ||
340 | # The basename for the epub file. It defaults to the project name. | |
341 | #epub_basename = project | |
342 | ||
343 | # The HTML theme for the epub output. Since the default themes are not | |
344 | # optimized for small screen space, using the same theme for HTML and epub | |
345 | # output is usually not wise. This defaults to 'epub', a theme designed to save | |
346 | # visual space. | |
347 | #epub_theme = 'epub' | |
348 | ||
349 | # The language of the text. It defaults to the language option | |
350 | # or 'en' if the language is not set. | |
351 | #epub_language = '' | |
352 | ||
353 | # The scheme of the identifier. Typical schemes are ISBN or URL. | |
354 | #epub_scheme = '' | |
355 | ||
356 | # The unique identifier of the text. This can be a ISBN number | |
357 | # or the project homepage. | |
358 | #epub_identifier = '' | |
359 | ||
360 | # A unique identification for the text. | |
361 | #epub_uid = '' | |
362 | ||
363 | # A tuple containing the cover image and cover page html template filenames. | |
364 | #epub_cover = () | |
365 | ||
366 | # A sequence of (type, uri, title) tuples for the guide element of content.opf. | |
367 | #epub_guide = () | |
368 | ||
369 | # HTML files that should be inserted before the pages created by sphinx. | |
370 | # The format is a list of tuples containing the path and title. | |
371 | #epub_pre_files = [] | |
372 | ||
373 | # HTML files that should be inserted after the pages created by sphinx. | |
374 | # The format is a list of tuples containing the path and title. | |
375 | #epub_post_files = [] | |
376 | ||
377 | # A list of files that should not be packed into the epub file. | |
378 | epub_exclude_files = ['search.html'] | |
379 | ||
380 | # The depth of the table of contents in toc.ncx. | |
381 | #epub_tocdepth = 3 | |
382 | ||
383 | # Allow duplicate toc entries. | |
384 | #epub_tocdup = True | |
385 | ||
386 | # Choose between 'default' and 'includehidden'. | |
387 | #epub_tocscope = 'default' | |
388 | ||
389 | # Fix unsupported image types using the Pillow. | |
390 | #epub_fix_images = False | |
391 | ||
392 | # Scale large images. | |
393 | #epub_max_image_width = 0 | |
394 | ||
395 | # How to display URL addresses: 'footnote', 'no', or 'inline'. | |
396 | #epub_show_urls = 'inline' | |
397 | ||
398 | # If false, no index is generated. | |
399 | #epub_use_index = True | |
400 | ||
401 | #======= | |
402 | # rst2pdf | |
403 | # | |
404 | # Grouping the document tree into PDF files. List of tuples | |
405 | # (source start file, target name, title, author, options). | |
406 | # | |
407 | # See the Sphinx chapter of http://ralsina.me/static/manual.pdf | |
408 | # | |
409 | # FIXME: Do not add the index file here; the result will be too big. Adding | |
410 | # multiple PDF files here actually tries to get the cross-referencing right | |
411 | # *between* PDF files. | |
412 | pdf_documents = [ | |
520a2477 | 413 | ('kernel-documentation', u'Kernel', u'Kernel', u'J. Random Bozo'), |
22cba31b | 414 | ] |
24dcdeb2 JN |
415 | |
416 | # kernel-doc extension configuration for running Sphinx directly (e.g. by Read | |
417 | # the Docs). In a normal build, these are supplied from the Makefile via command | |
418 | # line arguments. | |
419 | kerneldoc_bin = '../scripts/kernel-doc' | |
420 | kerneldoc_srctree = '..' | |
606b9ac8 MH |
421 | |
422 | # ------------------------------------------------------------------------------ | |
423 | # Since loadConfig overwrites settings from the global namespace, it has to be | |
424 | # the last statement in the conf.py file | |
425 | # ------------------------------------------------------------------------------ | |
426 | loadConfig(globals()) |