xref: /freebsd-src/contrib/llvm-project/lld/docs/conf.py (revision 06c3fb2749bda94cb5201f81ffdb8fa6c3161b2e)
10b57cec5SDimitry Andric# -*- coding: utf-8 -*-
20b57cec5SDimitry Andric#
30b57cec5SDimitry Andric# lld documentation build configuration file.
40b57cec5SDimitry Andric#
50b57cec5SDimitry Andric# This file is execfile()d with the current directory set to its containing dir.
60b57cec5SDimitry Andric#
70b57cec5SDimitry Andric# Note that not all possible configuration values are present in this
80b57cec5SDimitry Andric# autogenerated file.
90b57cec5SDimitry Andric#
100b57cec5SDimitry Andric# All configuration values have a default; values that are commented out
110b57cec5SDimitry Andric# serve to show the default.
120b57cec5SDimitry Andric
130b57cec5SDimitry Andricimport sys, os
140b57cec5SDimitry Andricfrom datetime import date
150b57cec5SDimitry Andric
160b57cec5SDimitry Andric# If extensions (or modules to document with autodoc) are in another directory,
170b57cec5SDimitry Andric# add these directories to sys.path here. If the directory is relative to the
180b57cec5SDimitry Andric# documentation root, use os.path.abspath to make it absolute, like shown here.
190b57cec5SDimitry Andric# sys.path.insert(0, os.path.abspath('.'))
200b57cec5SDimitry Andric
210b57cec5SDimitry Andric# -- General configuration -----------------------------------------------------
220b57cec5SDimitry Andric
230b57cec5SDimitry Andric# If your documentation needs a minimal Sphinx version, state it here.
240b57cec5SDimitry Andric# needs_sphinx = '1.0'
250b57cec5SDimitry Andric
260b57cec5SDimitry Andric# Add any Sphinx extension module names here, as strings. They can be extensions
270b57cec5SDimitry Andric# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
28*06c3fb27SDimitry Andricextensions = ["sphinx.ext.intersphinx", "sphinx.ext.todo"]
290b57cec5SDimitry Andric
300b57cec5SDimitry Andric# Add any paths that contain templates here, relative to this directory.
31*06c3fb27SDimitry Andrictemplates_path = ["_templates"]
320b57cec5SDimitry Andric
330b57cec5SDimitry Andric# The suffix of source filenames.
34*06c3fb27SDimitry Andricsource_suffix = ".rst"
350b57cec5SDimitry Andric
360b57cec5SDimitry Andric# The encoding of source files.
370b57cec5SDimitry Andric# source_encoding = 'utf-8-sig'
380b57cec5SDimitry Andric
390b57cec5SDimitry Andric# The master toctree document.
40*06c3fb27SDimitry Andricmaster_doc = "index"
410b57cec5SDimitry Andric
420b57cec5SDimitry Andric# General information about the project.
43*06c3fb27SDimitry Andricproject = "lld"
44*06c3fb27SDimitry Andriccopyright = "2011-%d, LLVM Project" % date.today().year
450b57cec5SDimitry Andric
460b57cec5SDimitry Andric# The language for content autogenerated by Sphinx. Refer to documentation
470b57cec5SDimitry Andric# for a list of supported languages.
480b57cec5SDimitry Andric# language = None
490b57cec5SDimitry Andric
500b57cec5SDimitry Andric# There are two options for replacing |today|: either, you set today to some
510b57cec5SDimitry Andric# non-false value, then it is used:
520b57cec5SDimitry Andric# today = ''
530b57cec5SDimitry Andric# Else, today_fmt is used as the format for a strftime call.
54*06c3fb27SDimitry Andrictoday_fmt = "%Y-%m-%d"
550b57cec5SDimitry Andric
560b57cec5SDimitry Andric# List of patterns, relative to source directory, that match files and
570b57cec5SDimitry Andric# directories to ignore when looking for source files.
58*06c3fb27SDimitry Andricexclude_patterns = ["_build"]
590b57cec5SDimitry Andric
600b57cec5SDimitry Andric# The reST default role (used for this markup: `text`) to use for all documents.
610b57cec5SDimitry Andric# default_role = None
620b57cec5SDimitry Andric
630b57cec5SDimitry Andric# If true, '()' will be appended to :func: etc. cross-reference text.
640b57cec5SDimitry Andric# add_function_parentheses = True
650b57cec5SDimitry Andric
660b57cec5SDimitry Andric# If true, the current module name will be prepended to all description
670b57cec5SDimitry Andric# unit titles (such as .. function::).
680b57cec5SDimitry Andric# add_module_names = True
690b57cec5SDimitry Andric
700b57cec5SDimitry Andric# If true, sectionauthor and moduleauthor directives will be shown in the
710b57cec5SDimitry Andric# output. They are ignored by default.
720b57cec5SDimitry Andricshow_authors = True
730b57cec5SDimitry Andric
740b57cec5SDimitry Andric# The name of the Pygments (syntax highlighting) style to use.
75*06c3fb27SDimitry Andricpygments_style = "friendly"
760b57cec5SDimitry Andric
770b57cec5SDimitry Andric# A list of ignored prefixes for module index sorting.
780b57cec5SDimitry Andric# modindex_common_prefix = []
790b57cec5SDimitry Andric
800b57cec5SDimitry Andric
810b57cec5SDimitry Andric# -- Options for HTML output ---------------------------------------------------
820b57cec5SDimitry Andric
830b57cec5SDimitry Andric# The theme to use for HTML and HTML Help pages.  See the documentation for
840b57cec5SDimitry Andric# a list of builtin themes.
85*06c3fb27SDimitry Andrichtml_theme = "llvm-theme"
860b57cec5SDimitry Andric
870b57cec5SDimitry Andric# Theme options are theme-specific and customize the look and feel of a theme
880b57cec5SDimitry Andric# further.  For a list of options available for each theme, see the
890b57cec5SDimitry Andric# documentation.
900b57cec5SDimitry Andric# html_theme_options = {}
910b57cec5SDimitry Andric
920b57cec5SDimitry Andric# Add any paths that contain custom themes here, relative to this directory.
930b57cec5SDimitry Andrichtml_theme_path = ["."]
940b57cec5SDimitry Andric
950b57cec5SDimitry Andric# The name for this set of Sphinx documents.  If None, it defaults to
960b57cec5SDimitry Andric# "<project> v<release> documentation".
970b57cec5SDimitry Andric# html_title = None
980b57cec5SDimitry Andric
990b57cec5SDimitry Andric# A shorter title for the navigation bar.  Default is the same as html_title.
1000b57cec5SDimitry Andric# html_short_title = None
1010b57cec5SDimitry Andric
1020b57cec5SDimitry Andric# The name of an image file (relative to this directory) to place at the top
1030b57cec5SDimitry Andric# of the sidebar.
1040b57cec5SDimitry Andric# html_logo = None
1050b57cec5SDimitry Andric
1060b57cec5SDimitry Andric# If given, this must be the name of an image file (path relative to the
1070b57cec5SDimitry Andric# configuration directory) that is the favicon of the docs. Modern browsers use
1080b57cec5SDimitry Andric# this as icon for tabs, windows and bookmarks. It should be a Windows-style
1090b57cec5SDimitry Andric# icon file (.ico), which is 16x16 or 32x32 pixels large. Default: None.  The
1100b57cec5SDimitry Andric# image file will be copied to the _static directory of the output HTML, but
1110b57cec5SDimitry Andric# only if the file does not already exist there.
112*06c3fb27SDimitry Andrichtml_favicon = "_static/favicon.ico"
1130b57cec5SDimitry Andric
1140b57cec5SDimitry Andric# Add any paths that contain custom static files (such as style sheets) here,
1150b57cec5SDimitry Andric# relative to this directory. They are copied after the builtin static files,
1160b57cec5SDimitry Andric# so a file named "default.css" will overwrite the builtin "default.css".
117*06c3fb27SDimitry Andrichtml_static_path = ["_static"]
1180b57cec5SDimitry Andric
1190b57cec5SDimitry Andric# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
1200b57cec5SDimitry Andric# using the given strftime format.
121*06c3fb27SDimitry Andrichtml_last_updated_fmt = "%Y-%m-%d"
1220b57cec5SDimitry Andric
1230b57cec5SDimitry Andric# If true, SmartyPants will be used to convert quotes and dashes to
1240b57cec5SDimitry Andric# typographically correct entities.
1250b57cec5SDimitry Andric# html_use_smartypants = True
1260b57cec5SDimitry Andric
1270b57cec5SDimitry Andric# Custom sidebar templates, maps document names to template names.
128*06c3fb27SDimitry Andrichtml_sidebars = {"index": ["indexsidebar.html"]}
1290b57cec5SDimitry Andric
1300b57cec5SDimitry Andric# Additional templates that should be rendered to pages, maps page names to
1310b57cec5SDimitry Andric# template names.
1320b57cec5SDimitry Andric# html_additional_pages = {'index': 'index.html'}
1330b57cec5SDimitry Andric
1340b57cec5SDimitry Andric# If false, no module index is generated.
1350b57cec5SDimitry Andric# html_domain_indices = True
1360b57cec5SDimitry Andric
1370b57cec5SDimitry Andric# If false, no index is generated.
1380b57cec5SDimitry Andric# html_use_index = True
1390b57cec5SDimitry Andric
1400b57cec5SDimitry Andric# If true, the index is split into individual pages for each letter.
1410b57cec5SDimitry Andric# html_split_index = False
1420b57cec5SDimitry Andric
1430b57cec5SDimitry Andric# If true, links to the reST sources are added to the pages.
1440b57cec5SDimitry Andrichtml_show_sourcelink = True
1450b57cec5SDimitry Andric
1460b57cec5SDimitry Andric# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
1470b57cec5SDimitry Andric# html_show_sphinx = True
1480b57cec5SDimitry Andric
1490b57cec5SDimitry Andric# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
1500b57cec5SDimitry Andric# html_show_copyright = True
1510b57cec5SDimitry Andric
1520b57cec5SDimitry Andric# If true, an OpenSearch description file will be output, and all pages will
1530b57cec5SDimitry Andric# contain a <link> tag referring to it.  The value of this option must be the
1540b57cec5SDimitry Andric# base URL from which the finished HTML is served.
1550b57cec5SDimitry Andric# html_use_opensearch = ''
1560b57cec5SDimitry Andric
1570b57cec5SDimitry Andric# This is the file name suffix for HTML files (e.g. ".xhtml").
1580b57cec5SDimitry Andric# html_file_suffix = None
1590b57cec5SDimitry Andric
1600b57cec5SDimitry Andric# Output file base name for HTML help builder.
161*06c3fb27SDimitry Andrichtmlhelp_basename = "llddoc"
1620b57cec5SDimitry Andric
1630b57cec5SDimitry Andric
1640b57cec5SDimitry Andric# -- Options for LaTeX output --------------------------------------------------
1650b57cec5SDimitry Andric
1660b57cec5SDimitry Andriclatex_elements = {
1670b57cec5SDimitry Andric    # The paper size ('letterpaper' or 'a4paper').
1680b57cec5SDimitry Andric    #'papersize': 'letterpaper',
1690b57cec5SDimitry Andric    # The font size ('10pt', '11pt' or '12pt').
1700b57cec5SDimitry Andric    #'pointsize': '10pt',
1710b57cec5SDimitry Andric    # Additional stuff for the LaTeX preamble.
1720b57cec5SDimitry Andric    #'preamble': '',
1730b57cec5SDimitry Andric}
1740b57cec5SDimitry Andric
1750b57cec5SDimitry Andric# Grouping the document tree into LaTeX files. List of tuples
1760b57cec5SDimitry Andric# (source start file, target name, title, author, documentclass [howto/manual]).
1770b57cec5SDimitry Andriclatex_documents = [
178*06c3fb27SDimitry Andric    ("contents", "lld.tex", "lld Documentation", "LLVM project", "manual"),
1790b57cec5SDimitry Andric]
1800b57cec5SDimitry Andric
1810b57cec5SDimitry Andric# The name of an image file (relative to this directory) to place at the top of
1820b57cec5SDimitry Andric# the title page.
1830b57cec5SDimitry Andric# latex_logo = None
1840b57cec5SDimitry Andric
1850b57cec5SDimitry Andric# For "manual" documents, if this is true, then toplevel headings are parts,
1860b57cec5SDimitry Andric# not chapters.
1870b57cec5SDimitry Andric# latex_use_parts = False
1880b57cec5SDimitry Andric
1890b57cec5SDimitry Andric# If true, show page references after internal links.
1900b57cec5SDimitry Andric# latex_show_pagerefs = False
1910b57cec5SDimitry Andric
1920b57cec5SDimitry Andric# If true, show URL addresses after external links.
1930b57cec5SDimitry Andric# latex_show_urls = False
1940b57cec5SDimitry Andric
1950b57cec5SDimitry Andric# Documents to append as an appendix to all manuals.
1960b57cec5SDimitry Andric# latex_appendices = []
1970b57cec5SDimitry Andric
1980b57cec5SDimitry Andric# If false, no module index is generated.
1990b57cec5SDimitry Andric# latex_domain_indices = True
2000b57cec5SDimitry Andric
2010b57cec5SDimitry Andric
2020b57cec5SDimitry Andric# -- Options for manual page output --------------------------------------------
2030b57cec5SDimitry Andric
2040b57cec5SDimitry Andric# One entry per manual page. List of tuples
2050b57cec5SDimitry Andric# (source start file, name, description, authors, manual section).
206*06c3fb27SDimitry Andricman_pages = [("contents", "lld", "lld Documentation", ["LLVM project"], 1)]
2070b57cec5SDimitry Andric
2080b57cec5SDimitry Andric# If true, show URL addresses after external links.
2090b57cec5SDimitry Andric# man_show_urls = False
2100b57cec5SDimitry Andric
2110b57cec5SDimitry Andric
2120b57cec5SDimitry Andric# -- Options for Texinfo output ------------------------------------------------
2130b57cec5SDimitry Andric
2140b57cec5SDimitry Andric# Grouping the document tree into Texinfo files. List of tuples
2150b57cec5SDimitry Andric# (source start file, target name, title, author,
2160b57cec5SDimitry Andric#  dir menu entry, description, category)
2170b57cec5SDimitry Andrictexinfo_documents = [
218*06c3fb27SDimitry Andric    (
219*06c3fb27SDimitry Andric        "contents",
220*06c3fb27SDimitry Andric        "lld",
221*06c3fb27SDimitry Andric        "lld Documentation",
222*06c3fb27SDimitry Andric        "LLVM project",
223*06c3fb27SDimitry Andric        "lld",
224*06c3fb27SDimitry Andric        "One line description of project.",
225*06c3fb27SDimitry Andric        "Miscellaneous",
226*06c3fb27SDimitry Andric    ),
2270b57cec5SDimitry Andric]
2280b57cec5SDimitry Andric
2290b57cec5SDimitry Andric# Documents to append as an appendix to all manuals.
2300b57cec5SDimitry Andric# texinfo_appendices = []
2310b57cec5SDimitry Andric
2320b57cec5SDimitry Andric# If false, no module index is generated.
2330b57cec5SDimitry Andric# texinfo_domain_indices = True
2340b57cec5SDimitry Andric
2350b57cec5SDimitry Andric# How to display URL addresses: 'footnote', 'no', or 'inline'.
2360b57cec5SDimitry Andric# texinfo_show_urls = 'footnote'
2370b57cec5SDimitry Andric
2380b57cec5SDimitry Andric
239480093f4SDimitry Andric# FIXME: Define intersphinx configuration.
2400b57cec5SDimitry Andricintersphinx_mapping = {}
2410b57cec5SDimitry Andric
2420b57cec5SDimitry Andric
2430b57cec5SDimitry Andric# -- Options for extensions ----------------------------------------------------
2440b57cec5SDimitry Andric
2450b57cec5SDimitry Andric# Enable this if you want TODOs to show up in the generated documentation.
2460b57cec5SDimitry Andrictodo_include_todos = True
247