Mario Six | 78a88f7 | 2018-07-10 08:40:17 +0200 | [diff] [blame] | 1 | # -*- coding: utf-8 -*- |
| 2 | # |
| 3 | # The U-Boot 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 | import sphinx |
| 18 | |
Heinrich Schuchardt | 98f01cf | 2020-12-31 23:16:46 +0100 | [diff] [blame] | 19 | from subprocess import check_output |
| 20 | |
Mario Six | 78a88f7 | 2018-07-10 08:40:17 +0200 | [diff] [blame] | 21 | # Get Sphinx version |
| 22 | major, minor, patch = sphinx.version_info[:3] |
| 23 | |
Heinrich Schuchardt | df86796 | 2024-07-16 21:04:23 +0200 | [diff] [blame^] | 24 | # Set canonical URL from the Read the Docs Domain |
| 25 | html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "") |
| 26 | |
| 27 | # Tell Jinja2 templates the build is running on Read the Docs |
| 28 | if os.environ.get("READTHEDOCS", "") == "True": |
| 29 | html_context["READTHEDOCS"] = True |
Mario Six | 78a88f7 | 2018-07-10 08:40:17 +0200 | [diff] [blame] | 30 | |
| 31 | # If extensions (or modules to document with autodoc) are in another directory, |
| 32 | # add these directories to sys.path here. If the directory is relative to the |
| 33 | # documentation root, use os.path.abspath to make it absolute, like shown here. |
| 34 | sys.path.insert(0, os.path.abspath('sphinx')) |
| 35 | from load_config import loadConfig |
| 36 | |
| 37 | # -- General configuration ------------------------------------------------ |
| 38 | |
| 39 | # If your documentation needs a minimal Sphinx version, state it here. |
Heinrich Schuchardt | b2a1d6b | 2021-08-05 20:13:41 +0200 | [diff] [blame] | 40 | needs_sphinx = '2.4.4' |
Mario Six | 78a88f7 | 2018-07-10 08:40:17 +0200 | [diff] [blame] | 41 | |
| 42 | # Add any Sphinx extension module names here, as strings. They can be |
| 43 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
| 44 | # ones. |
Heinrich Schuchardt | 98f01cf | 2020-12-31 23:16:46 +0100 | [diff] [blame] | 45 | extensions = ['kerneldoc', 'rstFlatTable', 'kernel_include', |
| 46 | 'kfigure', 'sphinx.ext.ifconfig', # 'automarkup', |
| 47 | 'maintainers_include', 'sphinx.ext.autosectionlabel', |
Nishanth Menon | 1cfcc22 | 2023-08-24 10:40:35 -0500 | [diff] [blame] | 48 | 'kernel_abi', 'kernel_feat', 'sphinx-prompt'] |
Heinrich Schuchardt | ae2b48e | 2020-11-30 09:52:57 +0100 | [diff] [blame] | 49 | |
| 50 | # |
Heinrich Schuchardt | 98f01cf | 2020-12-31 23:16:46 +0100 | [diff] [blame] | 51 | # cdomain is badly broken in Sphinx 3+. Leaving it out generates *most* |
| 52 | # of the docs correctly, but not all. Scream bloody murder but allow |
| 53 | # the process to proceed; hopefully somebody will fix this properly soon. |
Heinrich Schuchardt | ae2b48e | 2020-11-30 09:52:57 +0100 | [diff] [blame] | 54 | # |
| 55 | if major >= 3: |
| 56 | if (major > 3) or (minor > 0 or patch >= 2): |
Heinrich Schuchardt | ae2b48e | 2020-11-30 09:52:57 +0100 | [diff] [blame] | 57 | # Sphinx c function parser is more pedantic with regards to type |
| 58 | # checking. Due to that, having macros at c:function cause problems. |
Heinrich Schuchardt | 98f01cf | 2020-12-31 23:16:46 +0100 | [diff] [blame] | 59 | # Those needed to be scaped by using c_id_attributes[] array |
Heinrich Schuchardt | ae2b48e | 2020-11-30 09:52:57 +0100 | [diff] [blame] | 60 | c_id_attributes = [ |
Heinrich Schuchardt | 98f01cf | 2020-12-31 23:16:46 +0100 | [diff] [blame] | 61 | # GCC Compiler types not parsed by Sphinx: |
| 62 | "__restrict__", |
Heinrich Schuchardt | ae2b48e | 2020-11-30 09:52:57 +0100 | [diff] [blame] | 63 | |
Heinrich Schuchardt | 98f01cf | 2020-12-31 23:16:46 +0100 | [diff] [blame] | 64 | # include/linux/compiler_types.h: |
| 65 | "__iomem", |
| 66 | "__kernel", |
| 67 | "noinstr", |
| 68 | "notrace", |
| 69 | "__percpu", |
| 70 | "__rcu", |
| 71 | "__user", |
| 72 | |
| 73 | # include/linux/compiler_attributes.h: |
| 74 | "__alias", |
| 75 | "__aligned", |
| 76 | "__aligned_largest", |
| 77 | "__always_inline", |
| 78 | "__assume_aligned", |
| 79 | "__cold", |
| 80 | "__attribute_const__", |
| 81 | "__copy", |
| 82 | "__pure", |
| 83 | "__designated_init", |
| 84 | "__visible", |
| 85 | "__printf", |
| 86 | "__scanf", |
| 87 | "__gnu_inline", |
| 88 | "__malloc", |
| 89 | "__mode", |
| 90 | "__no_caller_saved_registers", |
| 91 | "__noclone", |
| 92 | "__nonstring", |
| 93 | "__noreturn", |
| 94 | "__packed", |
| 95 | "__pure", |
| 96 | "__section", |
| 97 | "__always_unused", |
Heinrich Schuchardt | ae2b48e | 2020-11-30 09:52:57 +0100 | [diff] [blame] | 98 | "__maybe_unused", |
Heinrich Schuchardt | 98f01cf | 2020-12-31 23:16:46 +0100 | [diff] [blame] | 99 | "__used", |
| 100 | "__weak", |
| 101 | "noinline", |
Heinrich Schuchardt | ae2b48e | 2020-11-30 09:52:57 +0100 | [diff] [blame] | 102 | |
| 103 | # include/efi.h |
| 104 | "EFIAPI", |
| 105 | |
| 106 | # include/efi_loader.h |
| 107 | "__efi_runtime", |
Heinrich Schuchardt | 98f01cf | 2020-12-31 23:16:46 +0100 | [diff] [blame] | 108 | |
| 109 | # include/linux/memblock.h: |
| 110 | "__init_memblock", |
| 111 | "__meminit", |
| 112 | |
| 113 | # include/linux/init.h: |
| 114 | "__init", |
| 115 | "__ref", |
| 116 | |
| 117 | # include/linux/linkage.h: |
| 118 | "asmlinkage", |
Heinrich Schuchardt | ae2b48e | 2020-11-30 09:52:57 +0100 | [diff] [blame] | 119 | ] |
| 120 | |
| 121 | else: |
| 122 | extensions.append('cdomain') |
Heinrich Schuchardt | 98f01cf | 2020-12-31 23:16:46 +0100 | [diff] [blame] | 123 | |
| 124 | # Ensure that autosectionlabel will produce unique names |
| 125 | autosectionlabel_prefix_document = True |
| 126 | autosectionlabel_maxdepth = 2 |
Mario Six | 78a88f7 | 2018-07-10 08:40:17 +0200 | [diff] [blame] | 127 | |
Heinrich Schuchardt | b2a1d6b | 2021-08-05 20:13:41 +0200 | [diff] [blame] | 128 | extensions.append("sphinx.ext.imgmath") |
Mario Six | 78a88f7 | 2018-07-10 08:40:17 +0200 | [diff] [blame] | 129 | |
| 130 | # Add any paths that contain templates here, relative to this directory. |
| 131 | templates_path = ['_templates'] |
| 132 | |
| 133 | # The suffix(es) of source filenames. |
| 134 | # You can specify multiple suffix as a list of string: |
| 135 | # source_suffix = ['.rst', '.md'] |
| 136 | source_suffix = '.rst' |
| 137 | |
| 138 | # The encoding of source files. |
| 139 | #source_encoding = 'utf-8-sig' |
| 140 | |
| 141 | # The master toctree document. |
| 142 | master_doc = 'index' |
| 143 | |
| 144 | # General information about the project. |
Heinrich Schuchardt | 611e7f8 | 2021-02-16 18:20:54 +0100 | [diff] [blame] | 145 | project = 'Das U-Boot' |
| 146 | copyright = 'The U-Boot development community' |
| 147 | author = 'The U-Boot development community' |
Mario Six | 78a88f7 | 2018-07-10 08:40:17 +0200 | [diff] [blame] | 148 | |
| 149 | # The version info for the project you're documenting, acts as replacement for |
| 150 | # |version| and |release|, also used in various other places throughout the |
| 151 | # built documents. |
| 152 | # |
| 153 | # In a normal build, version and release are are set to KERNELVERSION and |
| 154 | # KERNELRELEASE, respectively, from the Makefile via Sphinx command line |
| 155 | # arguments. |
| 156 | # |
| 157 | # The following code tries to extract the information by reading the Makefile, |
| 158 | # when Sphinx is run directly (e.g. by Read the Docs). |
| 159 | try: |
| 160 | makefile_version = None |
| 161 | makefile_patchlevel = None |
| 162 | for line in open('../Makefile'): |
| 163 | key, val = [x.strip() for x in line.split('=', 2)] |
| 164 | if key == 'VERSION': |
| 165 | makefile_version = val |
| 166 | elif key == 'PATCHLEVEL': |
| 167 | makefile_patchlevel = val |
| 168 | if makefile_version and makefile_patchlevel: |
| 169 | break |
| 170 | except: |
| 171 | pass |
| 172 | finally: |
| 173 | if makefile_version and makefile_patchlevel: |
| 174 | version = release = makefile_version + '.' + makefile_patchlevel |
| 175 | else: |
| 176 | version = release = "unknown version" |
| 177 | |
| 178 | # The language for content autogenerated by Sphinx. Refer to documentation |
| 179 | # for a list of supported languages. |
| 180 | # |
| 181 | # This is also used if you do content translation via gettext catalogs. |
| 182 | # Usually you set "language" from the command line for these cases. |
Quentin Schulz | 2b94359 | 2022-11-07 14:49:31 +0100 | [diff] [blame] | 183 | language = 'en' |
Mario Six | 78a88f7 | 2018-07-10 08:40:17 +0200 | [diff] [blame] | 184 | |
| 185 | # There are two options for replacing |today|: either, you set today to some |
| 186 | # non-false value, then it is used: |
| 187 | #today = '' |
| 188 | # Else, today_fmt is used as the format for a strftime call. |
| 189 | #today_fmt = '%B %d, %Y' |
| 190 | |
| 191 | # List of patterns, relative to source directory, that match files and |
| 192 | # directories to ignore when looking for source files. |
| 193 | exclude_patterns = ['output'] |
| 194 | |
| 195 | # The reST default role (used for this markup: `text`) to use for all |
| 196 | # documents. |
| 197 | #default_role = None |
| 198 | |
| 199 | # If true, '()' will be appended to :func: etc. cross-reference text. |
| 200 | #add_function_parentheses = True |
| 201 | |
| 202 | # If true, the current module name will be prepended to all description |
| 203 | # unit titles (such as .. function::). |
| 204 | #add_module_names = True |
| 205 | |
| 206 | # If true, sectionauthor and moduleauthor directives will be shown in the |
| 207 | # output. They are ignored by default. |
| 208 | #show_authors = False |
| 209 | |
| 210 | # The name of the Pygments (syntax highlighting) style to use. |
| 211 | pygments_style = 'sphinx' |
| 212 | |
| 213 | # A list of ignored prefixes for module index sorting. |
| 214 | #modindex_common_prefix = [] |
| 215 | |
| 216 | # If true, keep warnings as "system message" paragraphs in the built documents. |
| 217 | #keep_warnings = False |
| 218 | |
| 219 | # If true, `todo` and `todoList` produce output, else they produce nothing. |
| 220 | todo_include_todos = False |
| 221 | |
| 222 | primary_domain = 'c' |
| 223 | highlight_language = 'none' |
| 224 | |
| 225 | # -- Options for HTML output ---------------------------------------------- |
| 226 | |
| 227 | # The theme to use for HTML and HTML Help pages. See the documentation for |
| 228 | # a list of builtin themes. |
| 229 | |
| 230 | # The Read the Docs theme is available from |
| 231 | # - https://github.com/snide/sphinx_rtd_theme |
| 232 | # - https://pypi.python.org/pypi/sphinx_rtd_theme |
| 233 | # - python-sphinx-rtd-theme package (on Debian) |
| 234 | try: |
| 235 | import sphinx_rtd_theme |
| 236 | html_theme = 'sphinx_rtd_theme' |
Heinrich Schuchardt | 31a221d | 2024-01-14 14:18:20 +0100 | [diff] [blame] | 237 | extensions.append('sphinx_rtd_theme') |
Mario Six | 78a88f7 | 2018-07-10 08:40:17 +0200 | [diff] [blame] | 238 | except ImportError: |
| 239 | 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') |
| 240 | |
| 241 | # Theme options are theme-specific and customize the look and feel of a theme |
| 242 | # further. For a list of options available for each theme, see the |
| 243 | # documentation. |
| 244 | #html_theme_options = {} |
| 245 | |
| 246 | # Add any paths that contain custom themes here, relative to this directory. |
| 247 | #html_theme_path = [] |
| 248 | |
| 249 | # The name for this set of Sphinx documents. If None, it defaults to |
| 250 | # "<project> v<release> documentation". |
| 251 | #html_title = None |
| 252 | |
| 253 | # A shorter title for the navigation bar. Default is the same as html_title. |
| 254 | #html_short_title = None |
| 255 | |
| 256 | # The name of an image file (relative to this directory) to place at the top |
| 257 | # of the sidebar. |
Heinrich Schuchardt | 611e7f8 | 2021-02-16 18:20:54 +0100 | [diff] [blame] | 258 | html_logo = '../tools/logos/u-boot_logo.svg' |
Mario Six | 78a88f7 | 2018-07-10 08:40:17 +0200 | [diff] [blame] | 259 | |
| 260 | # The name of an image file (within the static path) to use as favicon of the |
| 261 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 |
| 262 | # pixels large. |
| 263 | #html_favicon = None |
| 264 | |
| 265 | # Add any paths that contain custom static files (such as style sheets) here, |
| 266 | # relative to this directory. They are copied after the builtin static files, |
| 267 | # so a file named "default.css" will overwrite the builtin "default.css". |
| 268 | |
| 269 | html_static_path = ['sphinx-static'] |
| 270 | |
| 271 | html_context = { |
| 272 | 'css_files': [ |
| 273 | '_static/theme_overrides.css', |
| 274 | ], |
| 275 | } |
| 276 | |
| 277 | # Add any extra paths that contain custom files (such as robots.txt or |
| 278 | # .htaccess) here, relative to this directory. These files are copied |
| 279 | # directly to the root of the documentation. |
| 280 | #html_extra_path = [] |
| 281 | |
| 282 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, |
| 283 | # using the given strftime format. |
| 284 | #html_last_updated_fmt = '%b %d, %Y' |
| 285 | |
| 286 | # If true, SmartyPants will be used to convert quotes and dashes to |
| 287 | # typographically correct entities. |
Heinrich Schuchardt | 98f01cf | 2020-12-31 23:16:46 +0100 | [diff] [blame] | 288 | html_use_smartypants = False |
Mario Six | 78a88f7 | 2018-07-10 08:40:17 +0200 | [diff] [blame] | 289 | |
| 290 | # Custom sidebar templates, maps document names to template names. |
| 291 | #html_sidebars = {} |
| 292 | |
| 293 | # Additional templates that should be rendered to pages, maps page names to |
| 294 | # template names. |
| 295 | #html_additional_pages = {} |
| 296 | |
| 297 | # If false, no module index is generated. |
| 298 | #html_domain_indices = True |
| 299 | |
| 300 | # If false, no index is generated. |
| 301 | #html_use_index = True |
| 302 | |
| 303 | # If true, the index is split into individual pages for each letter. |
| 304 | #html_split_index = False |
| 305 | |
| 306 | # If true, links to the reST sources are added to the pages. |
| 307 | #html_show_sourcelink = True |
| 308 | |
| 309 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. |
| 310 | #html_show_sphinx = True |
| 311 | |
| 312 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. |
| 313 | #html_show_copyright = True |
| 314 | |
| 315 | # If true, an OpenSearch description file will be output, and all pages will |
| 316 | # contain a <link> tag referring to it. The value of this option must be the |
| 317 | # base URL from which the finished HTML is served. |
| 318 | #html_use_opensearch = '' |
| 319 | |
| 320 | # This is the file name suffix for HTML files (e.g. ".xhtml"). |
| 321 | #html_file_suffix = None |
| 322 | |
| 323 | # Language to be used for generating the HTML full-text search index. |
| 324 | # Sphinx supports the following languages: |
| 325 | # 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja' |
| 326 | # 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr' |
| 327 | #html_search_language = 'en' |
| 328 | |
| 329 | # A dictionary with options for the search language support, empty by default. |
| 330 | # Now only 'ja' uses this config value |
| 331 | #html_search_options = {'type': 'default'} |
| 332 | |
| 333 | # The name of a javascript file (relative to the configuration directory) that |
| 334 | # implements a search results scorer. If empty, the default will be used. |
| 335 | #html_search_scorer = 'scorer.js' |
| 336 | |
| 337 | # Output file base name for HTML help builder. |
Heinrich Schuchardt | 611e7f8 | 2021-02-16 18:20:54 +0100 | [diff] [blame] | 338 | htmlhelp_basename = 'TheUBootdoc' |
Mario Six | 78a88f7 | 2018-07-10 08:40:17 +0200 | [diff] [blame] | 339 | |
| 340 | # -- Options for LaTeX output --------------------------------------------- |
| 341 | |
| 342 | latex_elements = { |
Heinrich Schuchardt | 00e80da | 2021-08-05 20:18:06 +0200 | [diff] [blame] | 343 | # The paper size ('letterpaper' or 'a4paper'). |
| 344 | 'papersize': 'a4paper', |
Mario Six | 78a88f7 | 2018-07-10 08:40:17 +0200 | [diff] [blame] | 345 | |
Heinrich Schuchardt | 00e80da | 2021-08-05 20:18:06 +0200 | [diff] [blame] | 346 | # The font size ('10pt', '11pt' or '12pt'). |
| 347 | 'pointsize': '11pt', |
Mario Six | 78a88f7 | 2018-07-10 08:40:17 +0200 | [diff] [blame] | 348 | |
Heinrich Schuchardt | 00e80da | 2021-08-05 20:18:06 +0200 | [diff] [blame] | 349 | # Latex figure (float) alignment |
| 350 | #'figure_align': 'htbp', |
Mario Six | 78a88f7 | 2018-07-10 08:40:17 +0200 | [diff] [blame] | 351 | |
Heinrich Schuchardt | 00e80da | 2021-08-05 20:18:06 +0200 | [diff] [blame] | 352 | # Don't mangle with UTF-8 chars |
| 353 | 'inputenc': '', |
| 354 | 'utf8extra': '', |
Mario Six | 78a88f7 | 2018-07-10 08:40:17 +0200 | [diff] [blame] | 355 | |
Heinrich Schuchardt | 00e80da | 2021-08-05 20:18:06 +0200 | [diff] [blame] | 356 | # Set document margins |
| 357 | 'sphinxsetup': ''' |
| 358 | hmargin=0.5in, vmargin=1in, |
| 359 | parsedliteralwraps=true, |
| 360 | verbatimhintsturnover=false, |
| 361 | ''', |
| 362 | |
| 363 | # Additional stuff for the LaTeX preamble. |
Mario Six | 78a88f7 | 2018-07-10 08:40:17 +0200 | [diff] [blame] | 364 | 'preamble': ''' |
Heinrich Schuchardt | 00e80da | 2021-08-05 20:18:06 +0200 | [diff] [blame] | 365 | % Use some font with UTF-8 support with XeLaTeX |
Mario Six | 78a88f7 | 2018-07-10 08:40:17 +0200 | [diff] [blame] | 366 | \\usepackage{fontspec} |
Heinrich Schuchardt | 98f01cf | 2020-12-31 23:16:46 +0100 | [diff] [blame] | 367 | \\setsansfont{DejaVu Sans} |
| 368 | \\setromanfont{DejaVu Serif} |
Mario Six | 78a88f7 | 2018-07-10 08:40:17 +0200 | [diff] [blame] | 369 | \\setmonofont{DejaVu Sans Mono} |
Heinrich Schuchardt | 00e80da | 2021-08-05 20:18:06 +0200 | [diff] [blame] | 370 | ''', |
Mario Six | 78a88f7 | 2018-07-10 08:40:17 +0200 | [diff] [blame] | 371 | } |
| 372 | |
Heinrich Schuchardt | 98f01cf | 2020-12-31 23:16:46 +0100 | [diff] [blame] | 373 | # At least one book (translations) may have Asian characters |
| 374 | # with are only displayed if xeCJK is used |
| 375 | |
| 376 | cjk_cmd = check_output(['fc-list', '--format="%{family[0]}\n"']).decode('utf-8', 'ignore') |
| 377 | if cjk_cmd.find("Noto Sans CJK SC") >= 0: |
| 378 | print ("enabling CJK for LaTeX builder") |
| 379 | latex_elements['preamble'] += ''' |
| 380 | % This is needed for translations |
| 381 | \\usepackage{xeCJK} |
| 382 | \\setCJKmainfont{Noto Sans CJK SC} |
| 383 | ''' |
| 384 | |
Mario Six | 78a88f7 | 2018-07-10 08:40:17 +0200 | [diff] [blame] | 385 | # With Sphinx 1.6, it is possible to change the Bg color directly |
| 386 | # by using: |
| 387 | # \definecolor{sphinxnoteBgColor}{RGB}{204,255,255} |
| 388 | # \definecolor{sphinxwarningBgColor}{RGB}{255,204,204} |
| 389 | # \definecolor{sphinxattentionBgColor}{RGB}{255,255,204} |
| 390 | # \definecolor{sphinximportantBgColor}{RGB}{192,255,204} |
| 391 | # |
| 392 | # However, it require to use sphinx heavy box with: |
| 393 | # |
| 394 | # \renewenvironment{sphinxlightbox} {% |
| 395 | # \\begin{sphinxheavybox} |
| 396 | # } |
| 397 | # \\end{sphinxheavybox} |
| 398 | # } |
| 399 | # |
| 400 | # Unfortunately, the implementation is buggy: if a note is inside a |
| 401 | # table, it isn't displayed well. So, for now, let's use boring |
| 402 | # black and white notes. |
| 403 | |
| 404 | # Grouping the document tree into LaTeX files. List of tuples |
| 405 | # (source start file, target name, title, |
| 406 | # author, documentclass [howto, manual, or own class]). |
| 407 | # Sorted in alphabetical order |
| 408 | latex_documents = [ |
Heinrich Schuchardt | 611e7f8 | 2021-02-16 18:20:54 +0100 | [diff] [blame] | 409 | ('index', 'u-boot-hacker-manual.tex', 'U-Boot Hacker Manual', |
| 410 | 'The U-Boot development community', 'manual'), |
Mario Six | 78a88f7 | 2018-07-10 08:40:17 +0200 | [diff] [blame] | 411 | ] |
| 412 | |
Heinrich Schuchardt | 98f01cf | 2020-12-31 23:16:46 +0100 | [diff] [blame] | 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', |
Heinrich Schuchardt | 611e7f8 | 2021-02-16 18:20:54 +0100 | [diff] [blame] | 424 | 'U-Boot %s Documentation' % fn.capitalize(), |
| 425 | 'The U-Boot development community', |
Heinrich Schuchardt | 98f01cf | 2020-12-31 23:16:46 +0100 | [diff] [blame] | 426 | 'manual')) |
| 427 | |
Mario Six | 78a88f7 | 2018-07-10 08:40:17 +0200 | [diff] [blame] | 428 | # The name of an image file (relative to this directory) to place at the top of |
| 429 | # the title page. |
| 430 | #latex_logo = None |
| 431 | |
| 432 | # For "manual" documents, if this is true, then toplevel headings are parts, |
| 433 | # not chapters. |
| 434 | #latex_use_parts = False |
| 435 | |
| 436 | # If true, show page references after internal links. |
| 437 | #latex_show_pagerefs = False |
| 438 | |
| 439 | # If true, show URL addresses after external links. |
| 440 | #latex_show_urls = False |
| 441 | |
| 442 | # Documents to append as an appendix to all manuals. |
| 443 | #latex_appendices = [] |
| 444 | |
| 445 | # If false, no module index is generated. |
| 446 | #latex_domain_indices = True |
| 447 | |
| 448 | |
| 449 | # -- Options for manual page output --------------------------------------- |
| 450 | |
| 451 | # One entry per manual page. List of tuples |
| 452 | # (source start file, name, description, authors, manual section). |
| 453 | man_pages = [ |
Maxim Cournoyer | 7fa4c27 | 2022-12-18 21:48:08 -0500 | [diff] [blame] | 454 | (master_doc, 'u-boot', 'The U-Boot Documentation', |
Mario Six | 78a88f7 | 2018-07-10 08:40:17 +0200 | [diff] [blame] | 455 | [author], 1) |
| 456 | ] |
| 457 | |
| 458 | # If true, show URL addresses after external links. |
| 459 | #man_show_urls = False |
| 460 | |
| 461 | |
| 462 | # -- Options for Texinfo output ------------------------------------------- |
| 463 | |
| 464 | # Grouping the document tree into Texinfo files. List of tuples |
| 465 | # (source start file, target name, title, author, |
| 466 | # dir menu entry, description, category) |
| 467 | texinfo_documents = [ |
Maxim Cournoyer | 7fa4c27 | 2022-12-18 21:48:08 -0500 | [diff] [blame] | 468 | (master_doc, 'u-boot', 'The U-Boot Documentation', |
| 469 | author, 'U-Boot', 'Boot loader for embedded systems', |
Mario Six | 78a88f7 | 2018-07-10 08:40:17 +0200 | [diff] [blame] | 470 | 'Miscellaneous'), |
| 471 | ] |
| 472 | |
| 473 | # Documents to append as an appendix to all manuals. |
| 474 | #texinfo_appendices = [] |
| 475 | |
| 476 | # If false, no module index is generated. |
| 477 | #texinfo_domain_indices = True |
| 478 | |
| 479 | # How to display URL addresses: 'footnote', 'no', or 'inline'. |
| 480 | #texinfo_show_urls = 'footnote' |
| 481 | |
| 482 | # If true, do not generate a @detailmenu in the "Top" node's menu. |
| 483 | #texinfo_no_detailmenu = False |
| 484 | |
| 485 | |
| 486 | # -- Options for Epub output ---------------------------------------------- |
| 487 | |
| 488 | # Bibliographic Dublin Core info. |
| 489 | epub_title = project |
| 490 | epub_author = author |
| 491 | epub_publisher = author |
| 492 | epub_copyright = copyright |
| 493 | |
| 494 | # The basename for the epub file. It defaults to the project name. |
| 495 | #epub_basename = project |
| 496 | |
| 497 | # The HTML theme for the epub output. Since the default themes are not |
| 498 | # optimized for small screen space, using the same theme for HTML and epub |
| 499 | # output is usually not wise. This defaults to 'epub', a theme designed to save |
| 500 | # visual space. |
| 501 | #epub_theme = 'epub' |
| 502 | |
| 503 | # The language of the text. It defaults to the language option |
| 504 | # or 'en' if the language is not set. |
| 505 | #epub_language = '' |
| 506 | |
| 507 | # The scheme of the identifier. Typical schemes are ISBN or URL. |
| 508 | #epub_scheme = '' |
| 509 | |
| 510 | # The unique identifier of the text. This can be a ISBN number |
| 511 | # or the project homepage. |
| 512 | #epub_identifier = '' |
| 513 | |
| 514 | # A unique identification for the text. |
| 515 | #epub_uid = '' |
| 516 | |
| 517 | # A tuple containing the cover image and cover page html template filenames. |
| 518 | #epub_cover = () |
| 519 | |
| 520 | # A sequence of (type, uri, title) tuples for the guide element of content.opf. |
| 521 | #epub_guide = () |
| 522 | |
| 523 | # HTML files that should be inserted before the pages created by sphinx. |
| 524 | # The format is a list of tuples containing the path and title. |
| 525 | #epub_pre_files = [] |
| 526 | |
| 527 | # HTML files that should be inserted after the pages created by sphinx. |
| 528 | # The format is a list of tuples containing the path and title. |
| 529 | #epub_post_files = [] |
| 530 | |
| 531 | # A list of files that should not be packed into the epub file. |
| 532 | epub_exclude_files = ['search.html'] |
| 533 | |
| 534 | # The depth of the table of contents in toc.ncx. |
| 535 | #epub_tocdepth = 3 |
| 536 | |
| 537 | # Allow duplicate toc entries. |
| 538 | #epub_tocdup = True |
| 539 | |
| 540 | # Choose between 'default' and 'includehidden'. |
| 541 | #epub_tocscope = 'default' |
| 542 | |
| 543 | # Fix unsupported image types using the Pillow. |
| 544 | #epub_fix_images = False |
| 545 | |
| 546 | # Scale large images. |
| 547 | #epub_max_image_width = 0 |
| 548 | |
| 549 | # How to display URL addresses: 'footnote', 'no', or 'inline'. |
| 550 | #epub_show_urls = 'inline' |
| 551 | |
| 552 | # If false, no index is generated. |
| 553 | #epub_use_index = True |
| 554 | |
| 555 | #======= |
| 556 | # rst2pdf |
| 557 | # |
| 558 | # Grouping the document tree into PDF files. List of tuples |
| 559 | # (source start file, target name, title, author, options). |
| 560 | # |
Heinrich Schuchardt | 98f01cf | 2020-12-31 23:16:46 +0100 | [diff] [blame] | 561 | # See the Sphinx chapter of https://ralsina.me/static/manual.pdf |
Mario Six | 78a88f7 | 2018-07-10 08:40:17 +0200 | [diff] [blame] | 562 | # |
| 563 | # FIXME: Do not add the index file here; the result will be too big. Adding |
| 564 | # multiple PDF files here actually tries to get the cross-referencing right |
| 565 | # *between* PDF files. |
| 566 | pdf_documents = [ |
Heinrich Schuchardt | 611e7f8 | 2021-02-16 18:20:54 +0100 | [diff] [blame] | 567 | ('uboot-documentation', u'U-Boot', u'U-Boot', u'J. Random Bozo'), |
Mario Six | 78a88f7 | 2018-07-10 08:40:17 +0200 | [diff] [blame] | 568 | ] |
| 569 | |
| 570 | # kernel-doc extension configuration for running Sphinx directly (e.g. by Read |
| 571 | # the Docs). In a normal build, these are supplied from the Makefile via command |
| 572 | # line arguments. |
| 573 | kerneldoc_bin = '../scripts/kernel-doc' |
| 574 | kerneldoc_srctree = '..' |
| 575 | |
| 576 | # ------------------------------------------------------------------------------ |
| 577 | # Since loadConfig overwrites settings from the global namespace, it has to be |
| 578 | # the last statement in the conf.py file |
| 579 | # ------------------------------------------------------------------------------ |
| 580 | loadConfig(globals()) |