![]() |
|
|||
0001 # -*- coding: utf-8 -*- 0002 # 0003 # The Linux Kernel documentation build configuration file, created by 0004 # sphinx-quickstart on Fri Feb 12 13:51:46 2016. 0005 # 0006 # This file is execfile()d with the current directory set to its 0007 # containing dir. 0008 # 0009 # Note that not all possible configuration values are present in this 0010 # autogenerated file. 0011 # 0012 # All configuration values have a default; values that are commented out 0013 # serve to show the default. 0014 0015 import sys 0016 import os 0017 import sphinx 0018 0019 # Get Sphinx version 0020 major, minor, patch = sphinx.version_info[:3] 0021 0022 0023 # If extensions (or modules to document with autodoc) are in another directory, 0024 # add these directories to sys.path here. If the directory is relative to the 0025 # documentation root, use os.path.abspath to make it absolute, like shown here. 0026 sys.path.insert(0, os.path.abspath('sphinx')) 0027 from load_config import loadConfig 0028 0029 # -- General configuration ------------------------------------------------ 0030 0031 # If your documentation needs a minimal Sphinx version, state it here. 0032 needs_sphinx = '1.7' 0033 0034 # Add any Sphinx extension module names here, as strings. They can be 0035 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 0036 # ones. 0037 extensions = ['kerneldoc', 'rstFlatTable', 'kernel_include', 0038 'kfigure', 'sphinx.ext.ifconfig', 'automarkup', 0039 'maintainers_include', 'sphinx.ext.autosectionlabel', 0040 'kernel_abi', 'kernel_feat'] 0041 0042 if major >= 3: 0043 if (major > 3) or (minor > 0 or patch >= 2): 0044 # Sphinx c function parser is more pedantic with regards to type 0045 # checking. Due to that, having macros at c:function cause problems. 0046 # Those needed to be scaped by using c_id_attributes[] array 0047 c_id_attributes = [ 0048 # GCC Compiler types not parsed by Sphinx: 0049 "__restrict__", 0050 0051 # include/linux/compiler_types.h: 0052 "__iomem", 0053 "__kernel", 0054 "noinstr", 0055 "notrace", 0056 "__percpu", 0057 "__rcu", 0058 "__user", 0059 0060 # include/linux/compiler_attributes.h: 0061 "__alias", 0062 "__aligned", 0063 "__aligned_largest", 0064 "__always_inline", 0065 "__assume_aligned", 0066 "__cold", 0067 "__attribute_const__", 0068 "__copy", 0069 "__pure", 0070 "__designated_init", 0071 "__visible", 0072 "__printf", 0073 "__scanf", 0074 "__gnu_inline", 0075 "__malloc", 0076 "__mode", 0077 "__no_caller_saved_registers", 0078 "__noclone", 0079 "__nonstring", 0080 "__noreturn", 0081 "__packed", 0082 "__pure", 0083 "__section", 0084 "__always_unused", 0085 "__maybe_unused", 0086 "__used", 0087 "__weak", 0088 "noinline", 0089 "__fix_address", 0090 0091 # include/linux/memblock.h: 0092 "__init_memblock", 0093 "__meminit", 0094 0095 # include/linux/init.h: 0096 "__init", 0097 "__ref", 0098 0099 # include/linux/linkage.h: 0100 "asmlinkage", 0101 ] 0102 0103 else: 0104 extensions.append('cdomain') 0105 0106 # Ensure that autosectionlabel will produce unique names 0107 autosectionlabel_prefix_document = True 0108 autosectionlabel_maxdepth = 2 0109 0110 extensions.append("sphinx.ext.imgmath") 0111 0112 # Add any paths that contain templates here, relative to this directory. 0113 templates_path = ['_templates'] 0114 0115 # The suffix(es) of source filenames. 0116 # You can specify multiple suffix as a list of string: 0117 # source_suffix = ['.rst', '.md'] 0118 source_suffix = '.rst' 0119 0120 # The encoding of source files. 0121 #source_encoding = 'utf-8-sig' 0122 0123 # The master toctree document. 0124 master_doc = 'index' 0125 0126 # General information about the project. 0127 project = 'The Linux Kernel' 0128 copyright = 'The kernel development community' 0129 author = 'The kernel development community' 0130 0131 # The version info for the project you're documenting, acts as replacement for 0132 # |version| and |release|, also used in various other places throughout the 0133 # built documents. 0134 # 0135 # In a normal build, version and release are are set to KERNELVERSION and 0136 # KERNELRELEASE, respectively, from the Makefile via Sphinx command line 0137 # arguments. 0138 # 0139 # The following code tries to extract the information by reading the Makefile, 0140 # when Sphinx is run directly (e.g. by Read the Docs). 0141 try: 0142 makefile_version = None 0143 makefile_patchlevel = None 0144 for line in open('../Makefile'): 0145 key, val = [x.strip() for x in line.split('=', 2)] 0146 if key == 'VERSION': 0147 makefile_version = val 0148 elif key == 'PATCHLEVEL': 0149 makefile_patchlevel = val 0150 if makefile_version and makefile_patchlevel: 0151 break 0152 except: 0153 pass 0154 finally: 0155 if makefile_version and makefile_patchlevel: 0156 version = release = makefile_version + '.' + makefile_patchlevel 0157 else: 0158 version = release = "unknown version" 0159 0160 # The language for content autogenerated by Sphinx. Refer to documentation 0161 # for a list of supported languages. 0162 # 0163 # This is also used if you do content translation via gettext catalogs. 0164 # Usually you set "language" from the command line for these cases. 0165 language = 'en' 0166 0167 # There are two options for replacing |today|: either, you set today to some 0168 # non-false value, then it is used: 0169 #today = '' 0170 # Else, today_fmt is used as the format for a strftime call. 0171 #today_fmt = '%B %d, %Y' 0172 0173 # List of patterns, relative to source directory, that match files and 0174 # directories to ignore when looking for source files. 0175 exclude_patterns = ['output'] 0176 0177 # The reST default role (used for this markup: `text`) to use for all 0178 # documents. 0179 #default_role = None 0180 0181 # If true, '()' will be appended to :func: etc. cross-reference text. 0182 #add_function_parentheses = True 0183 0184 # If true, the current module name will be prepended to all description 0185 # unit titles (such as .. function::). 0186 #add_module_names = True 0187 0188 # If true, sectionauthor and moduleauthor directives will be shown in the 0189 # output. They are ignored by default. 0190 #show_authors = False 0191 0192 # The name of the Pygments (syntax highlighting) style to use. 0193 pygments_style = 'sphinx' 0194 0195 # A list of ignored prefixes for module index sorting. 0196 #modindex_common_prefix = [] 0197 0198 # If true, keep warnings as "system message" paragraphs in the built documents. 0199 #keep_warnings = False 0200 0201 # If true, `todo` and `todoList` produce output, else they produce nothing. 0202 todo_include_todos = False 0203 0204 primary_domain = 'c' 0205 highlight_language = 'none' 0206 0207 # -- Options for HTML output ---------------------------------------------- 0208 0209 # The theme to use for HTML and HTML Help pages. See the documentation for 0210 # a list of builtin themes. 0211 0212 # Default theme 0213 html_theme = 'sphinx_rtd_theme' 0214 html_css_files = [] 0215 0216 if "DOCS_THEME" in os.environ: 0217 html_theme = os.environ["DOCS_THEME"] 0218 0219 if html_theme == 'sphinx_rtd_theme' or html_theme == 'sphinx_rtd_dark_mode': 0220 # Read the Docs theme 0221 try: 0222 import sphinx_rtd_theme 0223 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] 0224 0225 # Add any paths that contain custom static files (such as style sheets) here, 0226 # relative to this directory. They are copied after the builtin static files, 0227 # so a file named "default.css" will overwrite the builtin "default.css". 0228 html_css_files = [ 0229 'theme_overrides.css', 0230 ] 0231 0232 # Read the Docs dark mode override theme 0233 if html_theme == 'sphinx_rtd_dark_mode': 0234 try: 0235 import sphinx_rtd_dark_mode 0236 extensions.append('sphinx_rtd_dark_mode') 0237 except ImportError: 0238 html_theme == 'sphinx_rtd_theme' 0239 0240 if html_theme == 'sphinx_rtd_theme': 0241 # Add color-specific RTD normal mode 0242 html_css_files.append('theme_rtd_colors.css') 0243 0244 except ImportError: 0245 html_theme = 'classic' 0246 0247 if "DOCS_CSS" in os.environ: 0248 css = os.environ["DOCS_CSS"].split(" ") 0249 0250 for l in css: 0251 html_css_files.append(l) 0252 0253 if major <= 1 and minor < 8: 0254 html_context = { 0255 'css_files': [], 0256 } 0257 0258 for l in html_css_files: 0259 html_context['css_files'].append('_static/' + l) 0260 0261 if html_theme == 'classic': 0262 html_theme_options = { 0263 'rightsidebar': False, 0264 'stickysidebar': True, 0265 'collapsiblesidebar': True, 0266 'externalrefs': False, 0267 0268 'footerbgcolor': "white", 0269 'footertextcolor': "white", 0270 'sidebarbgcolor': "white", 0271 'sidebarbtncolor': "black", 0272 'sidebartextcolor': "black", 0273 'sidebarlinkcolor': "#686bff", 0274 'relbarbgcolor': "#133f52", 0275 'relbartextcolor': "white", 0276 'relbarlinkcolor': "white", 0277 'bgcolor': "white", 0278 'textcolor': "black", 0279 'headbgcolor': "#f2f2f2", 0280 'headtextcolor': "#20435c", 0281 'headlinkcolor': "#c60f0f", 0282 'linkcolor': "#355f7c", 0283 'visitedlinkcolor': "#355f7c", 0284 'codebgcolor': "#3f3f3f", 0285 'codetextcolor': "white", 0286 0287 'bodyfont': "serif", 0288 'headfont': "sans-serif", 0289 } 0290 0291 sys.stderr.write("Using %s theme\n" % html_theme) 0292 0293 # Theme options are theme-specific and customize the look and feel of a theme 0294 # further. For a list of options available for each theme, see the 0295 # documentation. 0296 #html_theme_options = {} 0297 0298 # Add any paths that contain custom themes here, relative to this directory. 0299 #html_theme_path = [] 0300 0301 # The name for this set of Sphinx documents. If None, it defaults to 0302 # "<project> v<release> documentation". 0303 #html_title = None 0304 0305 # A shorter title for the navigation bar. Default is the same as html_title. 0306 #html_short_title = None 0307 0308 # The name of an image file (relative to this directory) to place at the top 0309 # of the sidebar. 0310 #html_logo = None 0311 0312 # The name of an image file (within the static path) to use as favicon of the 0313 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 0314 # pixels large. 0315 #html_favicon = None 0316 0317 # Add any paths that contain custom static files (such as style sheets) here, 0318 # relative to this directory. They are copied after the builtin static files, 0319 # so a file named "default.css" will overwrite the builtin "default.css". 0320 html_static_path = ['sphinx-static'] 0321 0322 # Add any extra paths that contain custom files (such as robots.txt or 0323 # .htaccess) here, relative to this directory. These files are copied 0324 # directly to the root of the documentation. 0325 #html_extra_path = [] 0326 0327 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 0328 # using the given strftime format. 0329 #html_last_updated_fmt = '%b %d, %Y' 0330 0331 # If true, SmartyPants will be used to convert quotes and dashes to 0332 # typographically correct entities. 0333 html_use_smartypants = False 0334 0335 # Custom sidebar templates, maps document names to template names. 0336 #html_sidebars = {} 0337 0338 # Additional templates that should be rendered to pages, maps page names to 0339 # template names. 0340 #html_additional_pages = {} 0341 0342 # If false, no module index is generated. 0343 #html_domain_indices = True 0344 0345 # If false, no index is generated. 0346 #html_use_index = True 0347 0348 # If true, the index is split into individual pages for each letter. 0349 #html_split_index = False 0350 0351 # If true, links to the reST sources are added to the pages. 0352 #html_show_sourcelink = True 0353 0354 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. 0355 #html_show_sphinx = True 0356 0357 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. 0358 #html_show_copyright = True 0359 0360 # If true, an OpenSearch description file will be output, and all pages will 0361 # contain a <link> tag referring to it. The value of this option must be the 0362 # base URL from which the finished HTML is served. 0363 #html_use_opensearch = '' 0364 0365 # This is the file name suffix for HTML files (e.g. ".xhtml"). 0366 #html_file_suffix = None 0367 0368 # Language to be used for generating the HTML full-text search index. 0369 # Sphinx supports the following languages: 0370 # 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja' 0371 # 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr' 0372 #html_search_language = 'en' 0373 0374 # A dictionary with options for the search language support, empty by default. 0375 # Now only 'ja' uses this config value 0376 #html_search_options = {'type': 'default'} 0377 0378 # The name of a javascript file (relative to the configuration directory) that 0379 # implements a search results scorer. If empty, the default will be used. 0380 #html_search_scorer = 'scorer.js' 0381 0382 # Output file base name for HTML help builder. 0383 htmlhelp_basename = 'TheLinuxKerneldoc' 0384 0385 # -- Options for LaTeX output --------------------------------------------- 0386 0387 latex_elements = { 0388 # The paper size ('letterpaper' or 'a4paper'). 0389 'papersize': 'a4paper', 0390 0391 # The font size ('10pt', '11pt' or '12pt'). 0392 'pointsize': '11pt', 0393 0394 # Latex figure (float) alignment 0395 #'figure_align': 'htbp', 0396 0397 # Don't mangle with UTF-8 chars 0398 'inputenc': '', 0399 'utf8extra': '', 0400 0401 # Set document margins 0402 'sphinxsetup': ''' 0403 hmargin=0.5in, vmargin=1in, 0404 parsedliteralwraps=true, 0405 verbatimhintsturnover=false, 0406 ''', 0407 0408 # For CJK One-half spacing, need to be in front of hyperref 0409 'extrapackages': r'\usepackage{setspace}', 0410 0411 # Additional stuff for the LaTeX preamble. 0412 'preamble': ''' 0413 % Use some font with UTF-8 support with XeLaTeX 0414 \\usepackage{fontspec} 0415 \\setsansfont{DejaVu Sans} 0416 \\setromanfont{DejaVu Serif} 0417 \\setmonofont{DejaVu Sans Mono} 0418 ''', 0419 } 0420 0421 # Fix reference escape troubles with Sphinx 1.4.x 0422 if major == 1: 0423 latex_elements['preamble'] += '\\renewcommand*{\\DUrole}[2]{ #2 }\n' 0424 0425 0426 # Load kerneldoc specific LaTeX settings 0427 latex_elements['preamble'] += ''' 0428 % Load kerneldoc specific LaTeX settings 0429 \\input{kerneldoc-preamble.sty} 0430 ''' 0431 0432 # With Sphinx 1.6, it is possible to change the Bg color directly 0433 # by using: 0434 # \definecolor{sphinxnoteBgColor}{RGB}{204,255,255} 0435 # \definecolor{sphinxwarningBgColor}{RGB}{255,204,204} 0436 # \definecolor{sphinxattentionBgColor}{RGB}{255,255,204} 0437 # \definecolor{sphinximportantBgColor}{RGB}{192,255,204} 0438 # 0439 # However, it require to use sphinx heavy box with: 0440 # 0441 # \renewenvironment{sphinxlightbox} {% 0442 # \\begin{sphinxheavybox} 0443 # } 0444 # \\end{sphinxheavybox} 0445 # } 0446 # 0447 # Unfortunately, the implementation is buggy: if a note is inside a 0448 # table, it isn't displayed well. So, for now, let's use boring 0449 # black and white notes. 0450 0451 # Grouping the document tree into LaTeX files. List of tuples 0452 # (source start file, target name, title, 0453 # author, documentclass [howto, manual, or own class]). 0454 # Sorted in alphabetical order 0455 latex_documents = [ 0456 ] 0457 0458 # Add all other index files from Documentation/ subdirectories 0459 for fn in os.listdir('.'): 0460 doc = os.path.join(fn, "index") 0461 if os.path.exists(doc + ".rst"): 0462 has = False 0463 for l in latex_documents: 0464 if l[0] == doc: 0465 has = True 0466 break 0467 if not has: 0468 latex_documents.append((doc, fn + '.tex', 0469 'Linux %s Documentation' % fn.capitalize(), 0470 'The kernel development community', 0471 'manual')) 0472 0473 # The name of an image file (relative to this directory) to place at the top of 0474 # the title page. 0475 #latex_logo = None 0476 0477 # For "manual" documents, if this is true, then toplevel headings are parts, 0478 # not chapters. 0479 #latex_use_parts = False 0480 0481 # If true, show page references after internal links. 0482 #latex_show_pagerefs = False 0483 0484 # If true, show URL addresses after external links. 0485 #latex_show_urls = False 0486 0487 # Documents to append as an appendix to all manuals. 0488 #latex_appendices = [] 0489 0490 # If false, no module index is generated. 0491 #latex_domain_indices = True 0492 0493 # Additional LaTeX stuff to be copied to build directory 0494 latex_additional_files = [ 0495 'sphinx/kerneldoc-preamble.sty', 0496 ] 0497 0498 0499 # -- Options for manual page output --------------------------------------- 0500 0501 # One entry per manual page. List of tuples 0502 # (source start file, name, description, authors, manual section). 0503 man_pages = [ 0504 (master_doc, 'thelinuxkernel', 'The Linux Kernel Documentation', 0505 [author], 1) 0506 ] 0507 0508 # If true, show URL addresses after external links. 0509 #man_show_urls = False 0510 0511 0512 # -- Options for Texinfo output ------------------------------------------- 0513 0514 # Grouping the document tree into Texinfo files. List of tuples 0515 # (source start file, target name, title, author, 0516 # dir menu entry, description, category) 0517 texinfo_documents = [ 0518 (master_doc, 'TheLinuxKernel', 'The Linux Kernel Documentation', 0519 author, 'TheLinuxKernel', 'One line description of project.', 0520 'Miscellaneous'), 0521 ] 0522 0523 # Documents to append as an appendix to all manuals. 0524 #texinfo_appendices = [] 0525 0526 # If false, no module index is generated. 0527 #texinfo_domain_indices = True 0528 0529 # How to display URL addresses: 'footnote', 'no', or 'inline'. 0530 #texinfo_show_urls = 'footnote' 0531 0532 # If true, do not generate a @detailmenu in the "Top" node's menu. 0533 #texinfo_no_detailmenu = False 0534 0535 0536 # -- Options for Epub output ---------------------------------------------- 0537 0538 # Bibliographic Dublin Core info. 0539 epub_title = project 0540 epub_author = author 0541 epub_publisher = author 0542 epub_copyright = copyright 0543 0544 # The basename for the epub file. It defaults to the project name. 0545 #epub_basename = project 0546 0547 # The HTML theme for the epub output. Since the default themes are not 0548 # optimized for small screen space, using the same theme for HTML and epub 0549 # output is usually not wise. This defaults to 'epub', a theme designed to save 0550 # visual space. 0551 #epub_theme = 'epub' 0552 0553 # The language of the text. It defaults to the language option 0554 # or 'en' if the language is not set. 0555 #epub_language = '' 0556 0557 # The scheme of the identifier. Typical schemes are ISBN or URL. 0558 #epub_scheme = '' 0559 0560 # The unique identifier of the text. This can be a ISBN number 0561 # or the project homepage. 0562 #epub_identifier = '' 0563 0564 # A unique identification for the text. 0565 #epub_uid = '' 0566 0567 # A tuple containing the cover image and cover page html template filenames. 0568 #epub_cover = () 0569 0570 # A sequence of (type, uri, title) tuples for the guide element of content.opf. 0571 #epub_guide = () 0572 0573 # HTML files that should be inserted before the pages created by sphinx. 0574 # The format is a list of tuples containing the path and title. 0575 #epub_pre_files = [] 0576 0577 # HTML files that should be inserted after the pages created by sphinx. 0578 # The format is a list of tuples containing the path and title. 0579 #epub_post_files = [] 0580 0581 # A list of files that should not be packed into the epub file. 0582 epub_exclude_files = ['search.html'] 0583 0584 # The depth of the table of contents in toc.ncx. 0585 #epub_tocdepth = 3 0586 0587 # Allow duplicate toc entries. 0588 #epub_tocdup = True 0589 0590 # Choose between 'default' and 'includehidden'. 0591 #epub_tocscope = 'default' 0592 0593 # Fix unsupported image types using the Pillow. 0594 #epub_fix_images = False 0595 0596 # Scale large images. 0597 #epub_max_image_width = 0 0598 0599 # How to display URL addresses: 'footnote', 'no', or 'inline'. 0600 #epub_show_urls = 'inline' 0601 0602 # If false, no index is generated. 0603 #epub_use_index = True 0604 0605 #======= 0606 # rst2pdf 0607 # 0608 # Grouping the document tree into PDF files. List of tuples 0609 # (source start file, target name, title, author, options). 0610 # 0611 # See the Sphinx chapter of https://ralsina.me/static/manual.pdf 0612 # 0613 # FIXME: Do not add the index file here; the result will be too big. Adding 0614 # multiple PDF files here actually tries to get the cross-referencing right 0615 # *between* PDF files. 0616 pdf_documents = [ 0617 ('kernel-documentation', u'Kernel', u'Kernel', u'J. Random Bozo'), 0618 ] 0619 0620 # kernel-doc extension configuration for running Sphinx directly (e.g. by Read 0621 # the Docs). In a normal build, these are supplied from the Makefile via command 0622 # line arguments. 0623 kerneldoc_bin = '../scripts/kernel-doc' 0624 kerneldoc_srctree = '..' 0625 0626 # ------------------------------------------------------------------------------ 0627 # Since loadConfig overwrites settings from the global namespace, it has to be 0628 # the last statement in the conf.py file 0629 # ------------------------------------------------------------------------------ 0630 loadConfig(globals())
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |