175083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# -*- coding: utf-8 -*- 275083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# 375083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# LLVM documentation build configuration file. 475083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# 575083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# This file is execfile()d with the current directory set to its containing dir. 675083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# 775083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# Note that not all possible configuration values are present in this 875083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# autogenerated file. 975083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# 1075083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# All configuration values have a default; values that are commented out 1175083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# serve to show the default. 1275083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 1375083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbarimport sys, os 1475083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 1575083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# If extensions (or modules to document with autodoc) are in another directory, 1675083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# add these directories to sys.path here. If the directory is relative to the 1775083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# documentation root, use os.path.abspath to make it absolute, like shown here. 1875083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar#sys.path.insert(0, os.path.abspath('.')) 1975083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 2075083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# -- General configuration ----------------------------------------------------- 2175083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 2275083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# If your documentation needs a minimal Sphinx version, state it here. 2375083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar#needs_sphinx = '1.0' 2475083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 2575083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# Add any Sphinx extension module names here, as strings. They can be extensions 2675083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. 2775083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbarextensions = ['sphinx.ext.intersphinx', 'sphinx.ext.todo'] 2875083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 2975083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# Add any paths that contain templates here, relative to this directory. 3075083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbartemplates_path = ['_templates'] 3175083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 3275083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# The suffix of source filenames. 3375083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbarsource_suffix = '.rst' 3475083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 3575083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# The encoding of source files. 3675083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar#source_encoding = 'utf-8-sig' 3775083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 3875083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# The master toctree document. 3921e993c1b1083ef91441a363997d0efc8e646191Daniel Dunbarmaster_doc = 'index' 4075083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 4175083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# General information about the project. 4275083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbarproject = u'LLVM' 4336b56886974eae4f9c5ebc96befd3e7bfe5de338Stephen Hinescopyright = u'2003-2014, LLVM Project' 4475083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 4575083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# The version info for the project you're documenting, acts as replacement for 4675083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# |version| and |release|, also used in various other places throughout the 4775083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# built documents. 4875083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# 4975083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# The short X.Y version. 500c25b8f07e4ff033bf630d48cac28fedee1f4c55Bill Wendlingversion = '3.4' 5175083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# The full version, including alpha/beta/rc tags. 520c25b8f07e4ff033bf630d48cac28fedee1f4c55Bill Wendlingrelease = '3.4' 5375083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 5475083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# The language for content autogenerated by Sphinx. Refer to documentation 5575083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# for a list of supported languages. 5675083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar#language = None 5775083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 5875083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# There are two options for replacing |today|: either, you set today to some 5975083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# non-false value, then it is used: 6075083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar#today = '' 6175083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# Else, today_fmt is used as the format for a strftime call. 6275083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbartoday_fmt = '%Y-%m-%d' 6375083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 6475083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# List of patterns, relative to source directory, that match files and 6575083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# directories to ignore when looking for source files. 6675083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbarexclude_patterns = ['_build'] 6775083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 6875083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# The reST default role (used for this markup: `text`) to use for all documents. 6975083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar#default_role = None 7075083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 7175083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# If true, '()' will be appended to :func: etc. cross-reference text. 7275083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar#add_function_parentheses = True 7375083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 7475083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# If true, the current module name will be prepended to all description 7575083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# unit titles (such as .. function::). 7675083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar#add_module_names = True 7775083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 7875083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# If true, sectionauthor and moduleauthor directives will be shown in the 7975083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# output. They are ignored by default. 8075083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbarshow_authors = True 8175083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 8275083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# The name of the Pygments (syntax highlighting) style to use. 8375083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbarpygments_style = 'friendly' 8475083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 8575083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# A list of ignored prefixes for module index sorting. 8675083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar#modindex_common_prefix = [] 8775083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 8875083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 8975083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# -- Options for HTML output --------------------------------------------------- 9075083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 9175083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# The theme to use for HTML and HTML Help pages. See the documentation for 9275083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# a list of builtin themes. 9375083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbarhtml_theme = 'llvm-theme' 9475083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 9575083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# Theme options are theme-specific and customize the look and feel of a theme 9675083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# further. For a list of options available for each theme, see the 9775083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# documentation. 98097982eca6bff8a130bc32ed7d94b153eedfec26Sean Silvahtml_theme_options = { "nosidebar": True } 9975083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 10075083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# Add any paths that contain custom themes here, relative to this directory. 101aadf71570256992a7baf794964499a17b89e3997Michael J. Spencerhtml_theme_path = ["_themes"] 10275083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 10375083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# The name for this set of Sphinx documents. If None, it defaults to 10475083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# "<project> v<release> documentation". 10575083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar#html_title = None 10675083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 10775083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# A shorter title for the navigation bar. Default is the same as html_title. 10875083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar#html_short_title = None 10975083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 11075083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# The name of an image file (relative to this directory) to place at the top 11175083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# of the sidebar. 11275083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar#html_logo = None 11375083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 11475083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# The name of an image file (within the static path) to use as favicon of the 11575083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 11675083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# pixels large. 11775083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar#html_favicon = None 11875083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 11975083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# Add any paths that contain custom static files (such as style sheets) here, 12075083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# relative to this directory. They are copied after the builtin static files, 12175083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# so a file named "default.css" will overwrite the builtin "default.css". 122adea497673dab74b08fa2546e69619f1abe55662Daniel Dunbarhtml_static_path = ['_static'] 12375083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 12475083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 12575083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# using the given strftime format. 12675083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbarhtml_last_updated_fmt = '%Y-%m-%d' 12775083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 12875083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# If true, SmartyPants will be used to convert quotes and dashes to 12975083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# typographically correct entities. 13075083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar#html_use_smartypants = True 13175083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 13275083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# Custom sidebar templates, maps document names to template names. 13375083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbarhtml_sidebars = {'index': 'indexsidebar.html'} 13475083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 13575083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# Additional templates that should be rendered to pages, maps page names to 13675083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# template names. 137aadf71570256992a7baf794964499a17b89e3997Michael J. Spencer#html_additional_pages = {} 13875083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 13975083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# If false, no module index is generated. 14075083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar#html_domain_indices = True 14175083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 14275083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# If false, no index is generated. 14375083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar#html_use_index = True 14475083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 14575083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# If true, the index is split into individual pages for each letter. 14675083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar#html_split_index = False 14775083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 14875083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# If true, links to the reST sources are added to the pages. 14975083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbarhtml_show_sourcelink = True 15075083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 15175083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. 15275083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar#html_show_sphinx = True 15375083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 15475083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. 15575083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar#html_show_copyright = True 15675083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 15775083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# If true, an OpenSearch description file will be output, and all pages will 15875083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# contain a <link> tag referring to it. The value of this option must be the 15975083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# base URL from which the finished HTML is served. 16075083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar#html_use_opensearch = '' 16175083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 16275083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# This is the file name suffix for HTML files (e.g. ".xhtml"). 16375083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar#html_file_suffix = None 16475083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 16575083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# Output file base name for HTML help builder. 16675083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbarhtmlhelp_basename = 'LLVMdoc' 16775083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 16875083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 16975083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# -- Options for LaTeX output -------------------------------------------------- 17075083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 17175083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbarlatex_elements = { 17275083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# The paper size ('letterpaper' or 'a4paper'). 17375083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar#'papersize': 'letterpaper', 17475083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 17575083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# The font size ('10pt', '11pt' or '12pt'). 17675083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar#'pointsize': '10pt', 17775083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 17875083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# Additional stuff for the LaTeX preamble. 17975083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar#'preamble': '', 18075083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar} 18175083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 18275083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# Grouping the document tree into LaTeX files. List of tuples 18375083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# (source start file, target name, title, author, documentclass [howto/manual]). 18475083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbarlatex_documents = [ 18521e993c1b1083ef91441a363997d0efc8e646191Daniel Dunbar ('index', 'LLVM.tex', u'LLVM Documentation', 18675083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar u'LLVM project', 'manual'), 18775083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar] 18875083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 18975083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# The name of an image file (relative to this directory) to place at the top of 19075083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# the title page. 19175083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar#latex_logo = None 19275083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 19375083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# For "manual" documents, if this is true, then toplevel headings are parts, 19475083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# not chapters. 19575083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar#latex_use_parts = False 19675083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 19775083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# If true, show page references after internal links. 19875083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar#latex_show_pagerefs = False 19975083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 20075083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# If true, show URL addresses after external links. 20175083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar#latex_show_urls = False 20275083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 20375083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# Documents to append as an appendix to all manuals. 20475083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar#latex_appendices = [] 20575083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 20675083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# If false, no module index is generated. 20775083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar#latex_domain_indices = True 20875083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 20975083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 21075083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# -- Options for manual page output -------------------------------------------- 21175083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 21275083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# One entry per manual page. List of tuples 21375083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# (source start file, name, description, authors, manual section). 214cbfc61bec18c1af449916a01fbfa98f58e4b28a5Daniel Dunbarman_pages = [] 215cbfc61bec18c1af449916a01fbfa98f58e4b28a5Daniel Dunbar 216cbfc61bec18c1af449916a01fbfa98f58e4b28a5Daniel Dunbar# Automatically derive the list of man pages from the contents of the command 217cbfc61bec18c1af449916a01fbfa98f58e4b28a5Daniel Dunbar# guide subdirectory. 218aadf71570256992a7baf794964499a17b89e3997Michael J. Spencerbasedir = os.path.dirname(__file__) 219cbfc61bec18c1af449916a01fbfa98f58e4b28a5Daniel Dunbarman_page_authors = "Maintained by The LLVM Team (http://llvm.org/)." 220cbfc61bec18c1af449916a01fbfa98f58e4b28a5Daniel Dunbarcommand_guide_subpath = 'CommandGuide' 221cbfc61bec18c1af449916a01fbfa98f58e4b28a5Daniel Dunbarcommand_guide_path = os.path.join(basedir, command_guide_subpath) 222cbfc61bec18c1af449916a01fbfa98f58e4b28a5Daniel Dunbarfor name in os.listdir(command_guide_path): 223cbfc61bec18c1af449916a01fbfa98f58e4b28a5Daniel Dunbar # Ignore non-ReST files and the index page. 224cbfc61bec18c1af449916a01fbfa98f58e4b28a5Daniel Dunbar if not name.endswith('.rst') or name in ('index.rst',): 225cbfc61bec18c1af449916a01fbfa98f58e4b28a5Daniel Dunbar continue 226cbfc61bec18c1af449916a01fbfa98f58e4b28a5Daniel Dunbar 227cbfc61bec18c1af449916a01fbfa98f58e4b28a5Daniel Dunbar # Otherwise, automatically extract the description. 228cbfc61bec18c1af449916a01fbfa98f58e4b28a5Daniel Dunbar file_subpath = os.path.join(command_guide_subpath, name) 229cbfc61bec18c1af449916a01fbfa98f58e4b28a5Daniel Dunbar with open(os.path.join(command_guide_path, name)) as f: 23096da080b88472efa098e8a004bd205713c89e513Bill Wendling title = f.readline().rstrip('\n') 23196da080b88472efa098e8a004bd205713c89e513Bill Wendling header = f.readline().rstrip('\n') 232cbfc61bec18c1af449916a01fbfa98f58e4b28a5Daniel Dunbar 233cbfc61bec18c1af449916a01fbfa98f58e4b28a5Daniel Dunbar if len(header) != len(title): 234cbfc61bec18c1af449916a01fbfa98f58e4b28a5Daniel Dunbar print >>sys.stderr, ( 235cbfc61bec18c1af449916a01fbfa98f58e4b28a5Daniel Dunbar "error: invalid header in %r (does not match title)" % ( 236cbfc61bec18c1af449916a01fbfa98f58e4b28a5Daniel Dunbar file_subpath,)) 237cbfc61bec18c1af449916a01fbfa98f58e4b28a5Daniel Dunbar if ' - ' not in title: 238cbfc61bec18c1af449916a01fbfa98f58e4b28a5Daniel Dunbar print >>sys.stderr, ( 239cbfc61bec18c1af449916a01fbfa98f58e4b28a5Daniel Dunbar ("error: invalid title in %r " 240cbfc61bec18c1af449916a01fbfa98f58e4b28a5Daniel Dunbar "(expected '<name> - <description>')") % ( 241cbfc61bec18c1af449916a01fbfa98f58e4b28a5Daniel Dunbar file_subpath,)) 242cbfc61bec18c1af449916a01fbfa98f58e4b28a5Daniel Dunbar 243cbfc61bec18c1af449916a01fbfa98f58e4b28a5Daniel Dunbar # Split the name out of the title. 244cbfc61bec18c1af449916a01fbfa98f58e4b28a5Daniel Dunbar name,description = title.split(' - ', 1) 245cbfc61bec18c1af449916a01fbfa98f58e4b28a5Daniel Dunbar man_pages.append((file_subpath.replace('.rst',''), name, 246cbfc61bec18c1af449916a01fbfa98f58e4b28a5Daniel Dunbar description, man_page_authors, 1)) 24775083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 24875083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# If true, show URL addresses after external links. 24975083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar#man_show_urls = False 25075083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar 25175083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbar# FIXME: Define intersphinx configration. 25275083ebc09a3dd47099e3912ac090dbc907f3eafDaniel Dunbarintersphinx_mapping = {} 253