17330f729Sjoerg# -*- coding: utf-8 -*- 27330f729Sjoerg# 37330f729Sjoerg# Clang documentation build configuration file, created by 47330f729Sjoerg# sphinx-quickstart on Sun Dec 9 20:01:55 2012. 57330f729Sjoerg# 67330f729Sjoerg# This file is execfile()d with the current directory set to its containing dir. 77330f729Sjoerg# 87330f729Sjoerg# Note that not all possible configuration values are present in this 97330f729Sjoerg# autogenerated file. 107330f729Sjoerg# 117330f729Sjoerg# All configuration values have a default; values that are commented out 127330f729Sjoerg# serve to show the default. 137330f729Sjoerg 147330f729Sjoergfrom __future__ import absolute_import, division, print_function 157330f729Sjoergimport sys, os 167330f729Sjoergfrom datetime import date 177330f729Sjoerg 187330f729Sjoerg# If extensions (or modules to document with autodoc) are in another directory, 197330f729Sjoerg# add these directories to sys.path here. If the directory is relative to the 207330f729Sjoerg# documentation root, use os.path.abspath to make it absolute, like shown here. 217330f729Sjoerg#sys.path.insert(0, os.path.abspath('.')) 227330f729Sjoerg 237330f729Sjoerg# -- General configuration ----------------------------------------------------- 247330f729Sjoerg 257330f729Sjoerg# If your documentation needs a minimal Sphinx version, state it here. 267330f729Sjoerg#needs_sphinx = '1.0' 277330f729Sjoerg 287330f729Sjoerg# Add any Sphinx extension module names here, as strings. They can be extensions 297330f729Sjoerg# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. 307330f729Sjoergextensions = ['sphinx.ext.todo', 'sphinx.ext.mathjax'] 317330f729Sjoerg 327330f729Sjoerg# Add any paths that contain templates here, relative to this directory. 337330f729Sjoergtemplates_path = ['_templates'] 347330f729Sjoerg 357330f729Sjoerg# The suffix of source filenames. 367330f729Sjoergsource_suffix = '.rst' 377330f729Sjoerg 387330f729Sjoerg# The encoding of source files. 397330f729Sjoerg#source_encoding = 'utf-8-sig' 407330f729Sjoerg 417330f729Sjoerg# The master toctree document. 427330f729Sjoergmaster_doc = 'index' 437330f729Sjoerg 447330f729Sjoerg# General information about the project. 457330f729Sjoergproject = u'Clang' 467330f729Sjoergcopyright = u'2007-%d, The Clang Team' % date.today().year 477330f729Sjoerg 487330f729Sjoerg# The version info for the project you're documenting, acts as replacement for 497330f729Sjoerg# |version| and |release|, also used in various other places throughout the 507330f729Sjoerg# built documents. 517330f729Sjoerg# 527330f729Sjoerg# The short version. 53*e038c9c4Sjoergversion = '13' 547330f729Sjoerg# The full version, including alpha/beta/rc tags. 55*e038c9c4Sjoergrelease = '13' 567330f729Sjoerg 577330f729Sjoerg# The language for content autogenerated by Sphinx. Refer to documentation 587330f729Sjoerg# for a list of supported languages. 597330f729Sjoerg#language = None 607330f729Sjoerg 617330f729Sjoerg# There are two options for replacing |today|: either, you set today to some 627330f729Sjoerg# non-false value, then it is used: 637330f729Sjoerg#today = '' 647330f729Sjoerg# Else, today_fmt is used as the format for a strftime call. 657330f729Sjoerg#today_fmt = '%B %d, %Y' 667330f729Sjoerg 677330f729Sjoerg# List of patterns, relative to source directory, that match files and 687330f729Sjoerg# directories to ignore when looking for source files. 697330f729Sjoergexclude_patterns = ['_build'] 707330f729Sjoerg 717330f729Sjoerg# The reST default role (used for this markup: `text`) to use for all documents. 727330f729Sjoerg#default_role = None 737330f729Sjoerg 747330f729Sjoerg# If true, '()' will be appended to :func: etc. cross-reference text. 757330f729Sjoerg#add_function_parentheses = True 767330f729Sjoerg 777330f729Sjoerg# If true, the current module name will be prepended to all description 787330f729Sjoerg# unit titles (such as .. function::). 797330f729Sjoerg#add_module_names = True 807330f729Sjoerg 817330f729Sjoerg# If true, sectionauthor and moduleauthor directives will be shown in the 827330f729Sjoerg# output. They are ignored by default. 837330f729Sjoerg#show_authors = False 847330f729Sjoerg 857330f729Sjoerg# The name of the Pygments (syntax highlighting) style to use. 867330f729Sjoergpygments_style = 'friendly' 877330f729Sjoerg 887330f729Sjoerg# A list of ignored prefixes for module index sorting. 897330f729Sjoerg#modindex_common_prefix = [] 907330f729Sjoerg 917330f729Sjoerg 927330f729Sjoerg# -- Options for HTML output --------------------------------------------------- 937330f729Sjoerg 947330f729Sjoerg# The theme to use for HTML and HTML Help pages. See the documentation for 957330f729Sjoerg# a list of builtin themes. 967330f729Sjoerghtml_theme = 'haiku' 977330f729Sjoerg 987330f729Sjoerg# Theme options are theme-specific and customize the look and feel of a theme 997330f729Sjoerg# further. For a list of options available for each theme, see the 1007330f729Sjoerg# documentation. 1017330f729Sjoerg#html_theme_options = {} 1027330f729Sjoerg 1037330f729Sjoerg# Add any paths that contain custom themes here, relative to this directory. 1047330f729Sjoerg#html_theme_path = [] 1057330f729Sjoerg 1067330f729Sjoerg# The name for this set of Sphinx documents. If None, it defaults to 1077330f729Sjoerg# "<project> v<release> documentation". 1087330f729Sjoerg#html_title = None 1097330f729Sjoerg 1107330f729Sjoerg# A shorter title for the navigation bar. Default is the same as html_title. 1117330f729Sjoerg#html_short_title = None 1127330f729Sjoerg 1137330f729Sjoerg# The name of an image file (relative to this directory) to place at the top 1147330f729Sjoerg# of the sidebar. 1157330f729Sjoerg#html_logo = None 1167330f729Sjoerg 1177330f729Sjoerg# The name of an image file (within the static path) to use as favicon of the 1187330f729Sjoerg# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 1197330f729Sjoerg# pixels large. 1207330f729Sjoerg#html_favicon = None 1217330f729Sjoerg 1227330f729Sjoerg# Add any paths that contain custom static files (such as style sheets) here, 1237330f729Sjoerg# relative to this directory. They are copied after the builtin static files, 1247330f729Sjoerg# so a file named "default.css" will overwrite the builtin "default.css". 1257330f729Sjoerghtml_static_path = [] 1267330f729Sjoerg 1277330f729Sjoerg# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 1287330f729Sjoerg# using the given strftime format. 1297330f729Sjoerg#html_last_updated_fmt = '%b %d, %Y' 1307330f729Sjoerg 1317330f729Sjoerg# If true, SmartyPants will be used to convert quotes and dashes to 1327330f729Sjoerg# typographically correct entities. 1337330f729Sjoerg#html_use_smartypants = True 1347330f729Sjoerg 1357330f729Sjoerg# Custom sidebar templates, maps document names to template names. 1367330f729Sjoerg#html_sidebars = {} 1377330f729Sjoerg 1387330f729Sjoerg# Additional templates that should be rendered to pages, maps page names to 1397330f729Sjoerg# template names. 1407330f729Sjoerg#html_additional_pages = {} 1417330f729Sjoerg 1427330f729Sjoerg# If false, no module index is generated. 1437330f729Sjoerg#html_domain_indices = True 1447330f729Sjoerg 1457330f729Sjoerg# If false, no index is generated. 1467330f729Sjoerg#html_use_index = True 1477330f729Sjoerg 1487330f729Sjoerg# If true, the index is split into individual pages for each letter. 1497330f729Sjoerg#html_split_index = False 1507330f729Sjoerg 1517330f729Sjoerg# If true, links to the reST sources are added to the pages. 1527330f729Sjoerg#html_show_sourcelink = True 1537330f729Sjoerg 1547330f729Sjoerg# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. 1557330f729Sjoerg#html_show_sphinx = True 1567330f729Sjoerg 1577330f729Sjoerg# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. 1587330f729Sjoerg#html_show_copyright = True 1597330f729Sjoerg 1607330f729Sjoerg# If true, an OpenSearch description file will be output, and all pages will 1617330f729Sjoerg# contain a <link> tag referring to it. The value of this option must be the 1627330f729Sjoerg# base URL from which the finished HTML is served. 1637330f729Sjoerg#html_use_opensearch = '' 1647330f729Sjoerg 1657330f729Sjoerg# This is the file name suffix for HTML files (e.g. ".xhtml"). 1667330f729Sjoerg#html_file_suffix = None 1677330f729Sjoerg 1687330f729Sjoerg# Output file base name for HTML help builder. 1697330f729Sjoerghtmlhelp_basename = 'Clangdoc' 1707330f729Sjoerg 1717330f729Sjoerg 1727330f729Sjoerg# -- Options for LaTeX output -------------------------------------------------- 1737330f729Sjoerg 1747330f729Sjoerglatex_elements = { 1757330f729Sjoerg# The paper size ('letterpaper' or 'a4paper'). 1767330f729Sjoerg#'papersize': 'letterpaper', 1777330f729Sjoerg 1787330f729Sjoerg# The font size ('10pt', '11pt' or '12pt'). 1797330f729Sjoerg#'pointsize': '10pt', 1807330f729Sjoerg 1817330f729Sjoerg# Additional stuff for the LaTeX preamble. 1827330f729Sjoerg#'preamble': '', 1837330f729Sjoerg} 1847330f729Sjoerg 1857330f729Sjoerg# Grouping the document tree into LaTeX files. List of tuples 1867330f729Sjoerg# (source start file, target name, title, author, documentclass [howto/manual]). 1877330f729Sjoerglatex_documents = [ 1887330f729Sjoerg ('index', 'Clang.tex', u'Clang Documentation', 1897330f729Sjoerg u'The Clang Team', 'manual'), 1907330f729Sjoerg] 1917330f729Sjoerg 1927330f729Sjoerg# The name of an image file (relative to this directory) to place at the top of 1937330f729Sjoerg# the title page. 1947330f729Sjoerg#latex_logo = None 1957330f729Sjoerg 1967330f729Sjoerg# For "manual" documents, if this is true, then toplevel headings are parts, 1977330f729Sjoerg# not chapters. 1987330f729Sjoerg#latex_use_parts = False 1997330f729Sjoerg 2007330f729Sjoerg# If true, show page references after internal links. 2017330f729Sjoerg#latex_show_pagerefs = False 2027330f729Sjoerg 2037330f729Sjoerg# If true, show URL addresses after external links. 2047330f729Sjoerg#latex_show_urls = False 2057330f729Sjoerg 2067330f729Sjoerg# Documents to append as an appendix to all manuals. 2077330f729Sjoerg#latex_appendices = [] 2087330f729Sjoerg 2097330f729Sjoerg# If false, no module index is generated. 2107330f729Sjoerg#latex_domain_indices = True 2117330f729Sjoerg 2127330f729Sjoerg 2137330f729Sjoerg# -- Options for manual page output -------------------------------------------- 2147330f729Sjoerg 2157330f729Sjoerg# One entry per manual page. List of tuples 2167330f729Sjoerg# (source start file, name, description, authors, manual section). 2177330f729Sjoergman_pages = [] 2187330f729Sjoerg 2197330f729Sjoerg# Automatically derive the list of man pages from the contents of the command 2207330f729Sjoerg# guide subdirectory. This was copied from llvm/docs/conf.py. 2217330f729Sjoergbasedir = os.path.dirname(__file__) 2227330f729Sjoergman_page_authors = u'Maintained by the Clang / LLVM Team (<http://clang.llvm.org>)' 2237330f729Sjoergcommand_guide_subpath = 'CommandGuide' 2247330f729Sjoergcommand_guide_path = os.path.join(basedir, command_guide_subpath) 2257330f729Sjoergfor name in os.listdir(command_guide_path): 2267330f729Sjoerg # Ignore non-ReST files and the index page. 2277330f729Sjoerg if not name.endswith('.rst') or name in ('index.rst',): 2287330f729Sjoerg continue 2297330f729Sjoerg 2307330f729Sjoerg # Otherwise, automatically extract the description. 2317330f729Sjoerg file_subpath = os.path.join(command_guide_subpath, name) 2327330f729Sjoerg with open(os.path.join(command_guide_path, name)) as f: 2337330f729Sjoerg title = f.readline().rstrip('\n') 2347330f729Sjoerg header = f.readline().rstrip('\n') 2357330f729Sjoerg 2367330f729Sjoerg if len(header) != len(title): 2377330f729Sjoerg print(( 2387330f729Sjoerg "error: invalid header in %r (does not match title)" % ( 2397330f729Sjoerg file_subpath,)), file=sys.stderr) 2407330f729Sjoerg if ' - ' not in title: 2417330f729Sjoerg print(( 2427330f729Sjoerg ("error: invalid title in %r " 2437330f729Sjoerg "(expected '<name> - <description>')") % ( 2447330f729Sjoerg file_subpath,)), file=sys.stderr) 2457330f729Sjoerg 2467330f729Sjoerg # Split the name out of the title. 2477330f729Sjoerg name,description = title.split(' - ', 1) 2487330f729Sjoerg man_pages.append((file_subpath.replace('.rst',''), name, 2497330f729Sjoerg description, man_page_authors, 1)) 2507330f729Sjoerg 2517330f729Sjoerg 2527330f729Sjoerg# If true, show URL addresses after external links. 2537330f729Sjoerg#man_show_urls = False 2547330f729Sjoerg 2557330f729Sjoerg 2567330f729Sjoerg# -- Options for Texinfo output ------------------------------------------------ 2577330f729Sjoerg 2587330f729Sjoerg# Grouping the document tree into Texinfo files. List of tuples 2597330f729Sjoerg# (source start file, target name, title, author, 2607330f729Sjoerg# dir menu entry, description, category) 2617330f729Sjoergtexinfo_documents = [ 2627330f729Sjoerg ('index', 'Clang', u'Clang Documentation', 2637330f729Sjoerg u'The Clang Team', 'Clang', 'One line description of project.', 2647330f729Sjoerg 'Miscellaneous'), 2657330f729Sjoerg] 2667330f729Sjoerg 2677330f729Sjoerg# Documents to append as an appendix to all manuals. 2687330f729Sjoerg#texinfo_appendices = [] 2697330f729Sjoerg 2707330f729Sjoerg# If false, no module index is generated. 2717330f729Sjoerg#texinfo_domain_indices = True 2727330f729Sjoerg 2737330f729Sjoerg# How to display URL addresses: 'footnote', 'no', or 'inline'. 2747330f729Sjoerg#texinfo_show_urls = 'footnote' 275