1*9880d681SAndroid Build Coastguard Worker# -*- coding: utf-8 -*- 2*9880d681SAndroid Build Coastguard Worker# 3*9880d681SAndroid Build Coastguard Worker# LLVM documentation build configuration file. 4*9880d681SAndroid Build Coastguard Worker# 5*9880d681SAndroid Build Coastguard Worker# This file is execfile()d with the current directory set to its containing dir. 6*9880d681SAndroid Build Coastguard Worker# 7*9880d681SAndroid Build Coastguard Worker# Note that not all possible configuration values are present in this 8*9880d681SAndroid Build Coastguard Worker# autogenerated file. 9*9880d681SAndroid Build Coastguard Worker# 10*9880d681SAndroid Build Coastguard Worker# All configuration values have a default; values that are commented out 11*9880d681SAndroid Build Coastguard Worker# serve to show the default. 12*9880d681SAndroid Build Coastguard Worker 13*9880d681SAndroid Build Coastguard Workerimport sys, os 14*9880d681SAndroid Build Coastguard Workerfrom datetime import date 15*9880d681SAndroid Build Coastguard Worker 16*9880d681SAndroid Build Coastguard Worker# If extensions (or modules to document with autodoc) are in another directory, 17*9880d681SAndroid Build Coastguard Worker# add these directories to sys.path here. If the directory is relative to the 18*9880d681SAndroid Build Coastguard Worker# documentation root, use os.path.abspath to make it absolute, like shown here. 19*9880d681SAndroid Build Coastguard Worker#sys.path.insert(0, os.path.abspath('.')) 20*9880d681SAndroid Build Coastguard Worker 21*9880d681SAndroid Build Coastguard Worker# -- General configuration ----------------------------------------------------- 22*9880d681SAndroid Build Coastguard Worker 23*9880d681SAndroid Build Coastguard Worker# If your documentation needs a minimal Sphinx version, state it here. 24*9880d681SAndroid Build Coastguard Worker#needs_sphinx = '1.0' 25*9880d681SAndroid Build Coastguard Worker 26*9880d681SAndroid Build Coastguard Worker# Add any Sphinx extension module names here, as strings. They can be extensions 27*9880d681SAndroid Build Coastguard Worker# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. 28*9880d681SAndroid Build Coastguard Workerextensions = ['sphinx.ext.intersphinx', 'sphinx.ext.todo'] 29*9880d681SAndroid Build Coastguard Worker 30*9880d681SAndroid Build Coastguard Worker# Add any paths that contain templates here, relative to this directory. 31*9880d681SAndroid Build Coastguard Workertemplates_path = ['_templates'] 32*9880d681SAndroid Build Coastguard Worker 33*9880d681SAndroid Build Coastguard Worker# The suffix of source filenames. 34*9880d681SAndroid Build Coastguard Workersource_suffix = '.rst' 35*9880d681SAndroid Build Coastguard Worker 36*9880d681SAndroid Build Coastguard Worker# The encoding of source files. 37*9880d681SAndroid Build Coastguard Worker#source_encoding = 'utf-8-sig' 38*9880d681SAndroid Build Coastguard Worker 39*9880d681SAndroid Build Coastguard Worker# The master toctree document. 40*9880d681SAndroid Build Coastguard Workermaster_doc = 'index' 41*9880d681SAndroid Build Coastguard Worker 42*9880d681SAndroid Build Coastguard Worker# General information about the project. 43*9880d681SAndroid Build Coastguard Workerproject = u'LLVM' 44*9880d681SAndroid Build Coastguard Workercopyright = u'2003-%d, LLVM Project' % date.today().year 45*9880d681SAndroid Build Coastguard Worker 46*9880d681SAndroid Build Coastguard Worker# The version info for the project you're documenting, acts as replacement for 47*9880d681SAndroid Build Coastguard Worker# |version| and |release|, also used in various other places throughout the 48*9880d681SAndroid Build Coastguard Worker# built documents. 49*9880d681SAndroid Build Coastguard Worker# 50*9880d681SAndroid Build Coastguard Worker# The short X.Y version. 51*9880d681SAndroid Build Coastguard Workerversion = '3.9' 52*9880d681SAndroid Build Coastguard Worker# The full version, including alpha/beta/rc tags. 53*9880d681SAndroid Build Coastguard Workerrelease = '3.9' 54*9880d681SAndroid Build Coastguard Worker 55*9880d681SAndroid Build Coastguard Worker# The language for content autogenerated by Sphinx. Refer to documentation 56*9880d681SAndroid Build Coastguard Worker# for a list of supported languages. 57*9880d681SAndroid Build Coastguard Worker#language = None 58*9880d681SAndroid Build Coastguard Worker 59*9880d681SAndroid Build Coastguard Worker# There are two options for replacing |today|: either, you set today to some 60*9880d681SAndroid Build Coastguard Worker# non-false value, then it is used: 61*9880d681SAndroid Build Coastguard Worker#today = '' 62*9880d681SAndroid Build Coastguard Worker# Else, today_fmt is used as the format for a strftime call. 63*9880d681SAndroid Build Coastguard Workertoday_fmt = '%Y-%m-%d' 64*9880d681SAndroid Build Coastguard Worker 65*9880d681SAndroid Build Coastguard Worker# List of patterns, relative to source directory, that match files and 66*9880d681SAndroid Build Coastguard Worker# directories to ignore when looking for source files. 67*9880d681SAndroid Build Coastguard Workerexclude_patterns = ['_build'] 68*9880d681SAndroid Build Coastguard Worker 69*9880d681SAndroid Build Coastguard Worker# The reST default role (used for this markup: `text`) to use for all documents. 70*9880d681SAndroid Build Coastguard Worker#default_role = None 71*9880d681SAndroid Build Coastguard Worker 72*9880d681SAndroid Build Coastguard Worker# If true, '()' will be appended to :func: etc. cross-reference text. 73*9880d681SAndroid Build Coastguard Worker#add_function_parentheses = True 74*9880d681SAndroid Build Coastguard Worker 75*9880d681SAndroid Build Coastguard Worker# If true, the current module name will be prepended to all description 76*9880d681SAndroid Build Coastguard Worker# unit titles (such as .. function::). 77*9880d681SAndroid Build Coastguard Worker#add_module_names = True 78*9880d681SAndroid Build Coastguard Worker 79*9880d681SAndroid Build Coastguard Worker# If true, sectionauthor and moduleauthor directives will be shown in the 80*9880d681SAndroid Build Coastguard Worker# output. They are ignored by default. 81*9880d681SAndroid Build Coastguard Workershow_authors = True 82*9880d681SAndroid Build Coastguard Worker 83*9880d681SAndroid Build Coastguard Worker# The name of the Pygments (syntax highlighting) style to use. 84*9880d681SAndroid Build Coastguard Workerpygments_style = 'friendly' 85*9880d681SAndroid Build Coastguard Worker 86*9880d681SAndroid Build Coastguard Worker# A list of ignored prefixes for module index sorting. 87*9880d681SAndroid Build Coastguard Worker#modindex_common_prefix = [] 88*9880d681SAndroid Build Coastguard Worker 89*9880d681SAndroid Build Coastguard Worker 90*9880d681SAndroid Build Coastguard Worker# -- Options for HTML output --------------------------------------------------- 91*9880d681SAndroid Build Coastguard Worker 92*9880d681SAndroid Build Coastguard Worker# The theme to use for HTML and HTML Help pages. See the documentation for 93*9880d681SAndroid Build Coastguard Worker# a list of builtin themes. 94*9880d681SAndroid Build Coastguard Workerhtml_theme = 'llvm-theme' 95*9880d681SAndroid Build Coastguard Worker 96*9880d681SAndroid Build Coastguard Worker# Theme options are theme-specific and customize the look and feel of a theme 97*9880d681SAndroid Build Coastguard Worker# further. For a list of options available for each theme, see the 98*9880d681SAndroid Build Coastguard Worker# documentation. 99*9880d681SAndroid Build Coastguard Workerhtml_theme_options = { "nosidebar": True } 100*9880d681SAndroid Build Coastguard Worker 101*9880d681SAndroid Build Coastguard Worker# Add any paths that contain custom themes here, relative to this directory. 102*9880d681SAndroid Build Coastguard Workerhtml_theme_path = ["_themes"] 103*9880d681SAndroid Build Coastguard Worker 104*9880d681SAndroid Build Coastguard Worker# The name for this set of Sphinx documents. If None, it defaults to 105*9880d681SAndroid Build Coastguard Worker# "<project> v<release> documentation". 106*9880d681SAndroid Build Coastguard Worker#html_title = None 107*9880d681SAndroid Build Coastguard Worker 108*9880d681SAndroid Build Coastguard Worker# A shorter title for the navigation bar. Default is the same as html_title. 109*9880d681SAndroid Build Coastguard Worker#html_short_title = None 110*9880d681SAndroid Build Coastguard Worker 111*9880d681SAndroid Build Coastguard Worker# The name of an image file (relative to this directory) to place at the top 112*9880d681SAndroid Build Coastguard Worker# of the sidebar. 113*9880d681SAndroid Build Coastguard Worker#html_logo = None 114*9880d681SAndroid Build Coastguard Worker 115*9880d681SAndroid Build Coastguard Worker# The name of an image file (within the static path) to use as favicon of the 116*9880d681SAndroid Build Coastguard Worker# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 117*9880d681SAndroid Build Coastguard Worker# pixels large. 118*9880d681SAndroid Build Coastguard Worker#html_favicon = None 119*9880d681SAndroid Build Coastguard Worker 120*9880d681SAndroid Build Coastguard Worker# Add any paths that contain custom static files (such as style sheets) here, 121*9880d681SAndroid Build Coastguard Worker# relative to this directory. They are copied after the builtin static files, 122*9880d681SAndroid Build Coastguard Worker# so a file named "default.css" will overwrite the builtin "default.css". 123*9880d681SAndroid Build Coastguard Workerhtml_static_path = ['_static'] 124*9880d681SAndroid Build Coastguard Worker 125*9880d681SAndroid Build Coastguard Worker# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 126*9880d681SAndroid Build Coastguard Worker# using the given strftime format. 127*9880d681SAndroid Build Coastguard Workerhtml_last_updated_fmt = '%Y-%m-%d' 128*9880d681SAndroid Build Coastguard Worker 129*9880d681SAndroid Build Coastguard Worker# If true, SmartyPants will be used to convert quotes and dashes to 130*9880d681SAndroid Build Coastguard Worker# typographically correct entities. 131*9880d681SAndroid Build Coastguard Worker#html_use_smartypants = True 132*9880d681SAndroid Build Coastguard Worker 133*9880d681SAndroid Build Coastguard Worker# Custom sidebar templates, maps document names to template names. 134*9880d681SAndroid Build Coastguard Workerhtml_sidebars = {'index': 'indexsidebar.html'} 135*9880d681SAndroid Build Coastguard Worker 136*9880d681SAndroid Build Coastguard Worker# Additional templates that should be rendered to pages, maps page names to 137*9880d681SAndroid Build Coastguard Worker# template names. 138*9880d681SAndroid Build Coastguard Worker#html_additional_pages = {} 139*9880d681SAndroid Build Coastguard Worker 140*9880d681SAndroid Build Coastguard Worker# If false, no module index is generated. 141*9880d681SAndroid Build Coastguard Worker#html_domain_indices = True 142*9880d681SAndroid Build Coastguard Worker 143*9880d681SAndroid Build Coastguard Worker# If false, no index is generated. 144*9880d681SAndroid Build Coastguard Worker#html_use_index = True 145*9880d681SAndroid Build Coastguard Worker 146*9880d681SAndroid Build Coastguard Worker# If true, the index is split into individual pages for each letter. 147*9880d681SAndroid Build Coastguard Worker#html_split_index = False 148*9880d681SAndroid Build Coastguard Worker 149*9880d681SAndroid Build Coastguard Worker# If true, links to the reST sources are added to the pages. 150*9880d681SAndroid Build Coastguard Workerhtml_show_sourcelink = True 151*9880d681SAndroid Build Coastguard Worker 152*9880d681SAndroid Build Coastguard Worker# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. 153*9880d681SAndroid Build Coastguard Worker#html_show_sphinx = True 154*9880d681SAndroid Build Coastguard Worker 155*9880d681SAndroid Build Coastguard Worker# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. 156*9880d681SAndroid Build Coastguard Worker#html_show_copyright = True 157*9880d681SAndroid Build Coastguard Worker 158*9880d681SAndroid Build Coastguard Worker# If true, an OpenSearch description file will be output, and all pages will 159*9880d681SAndroid Build Coastguard Worker# contain a <link> tag referring to it. The value of this option must be the 160*9880d681SAndroid Build Coastguard Worker# base URL from which the finished HTML is served. 161*9880d681SAndroid Build Coastguard Worker#html_use_opensearch = '' 162*9880d681SAndroid Build Coastguard Worker 163*9880d681SAndroid Build Coastguard Worker# This is the file name suffix for HTML files (e.g. ".xhtml"). 164*9880d681SAndroid Build Coastguard Worker#html_file_suffix = None 165*9880d681SAndroid Build Coastguard Worker 166*9880d681SAndroid Build Coastguard Worker# Output file base name for HTML help builder. 167*9880d681SAndroid Build Coastguard Workerhtmlhelp_basename = 'LLVMdoc' 168*9880d681SAndroid Build Coastguard Worker 169*9880d681SAndroid Build Coastguard Worker 170*9880d681SAndroid Build Coastguard Worker# -- Options for LaTeX output -------------------------------------------------- 171*9880d681SAndroid Build Coastguard Worker 172*9880d681SAndroid Build Coastguard Workerlatex_elements = { 173*9880d681SAndroid Build Coastguard Worker# The paper size ('letterpaper' or 'a4paper'). 174*9880d681SAndroid Build Coastguard Worker#'papersize': 'letterpaper', 175*9880d681SAndroid Build Coastguard Worker 176*9880d681SAndroid Build Coastguard Worker# The font size ('10pt', '11pt' or '12pt'). 177*9880d681SAndroid Build Coastguard Worker#'pointsize': '10pt', 178*9880d681SAndroid Build Coastguard Worker 179*9880d681SAndroid Build Coastguard Worker# Additional stuff for the LaTeX preamble. 180*9880d681SAndroid Build Coastguard Worker#'preamble': '', 181*9880d681SAndroid Build Coastguard Worker} 182*9880d681SAndroid Build Coastguard Worker 183*9880d681SAndroid Build Coastguard Worker# Grouping the document tree into LaTeX files. List of tuples 184*9880d681SAndroid Build Coastguard Worker# (source start file, target name, title, author, documentclass [howto/manual]). 185*9880d681SAndroid Build Coastguard Workerlatex_documents = [ 186*9880d681SAndroid Build Coastguard Worker ('index', 'LLVM.tex', u'LLVM Documentation', 187*9880d681SAndroid Build Coastguard Worker u'LLVM project', 'manual'), 188*9880d681SAndroid Build Coastguard Worker] 189*9880d681SAndroid Build Coastguard Worker 190*9880d681SAndroid Build Coastguard Worker# The name of an image file (relative to this directory) to place at the top of 191*9880d681SAndroid Build Coastguard Worker# the title page. 192*9880d681SAndroid Build Coastguard Worker#latex_logo = None 193*9880d681SAndroid Build Coastguard Worker 194*9880d681SAndroid Build Coastguard Worker# For "manual" documents, if this is true, then toplevel headings are parts, 195*9880d681SAndroid Build Coastguard Worker# not chapters. 196*9880d681SAndroid Build Coastguard Worker#latex_use_parts = False 197*9880d681SAndroid Build Coastguard Worker 198*9880d681SAndroid Build Coastguard Worker# If true, show page references after internal links. 199*9880d681SAndroid Build Coastguard Worker#latex_show_pagerefs = False 200*9880d681SAndroid Build Coastguard Worker 201*9880d681SAndroid Build Coastguard Worker# If true, show URL addresses after external links. 202*9880d681SAndroid Build Coastguard Worker#latex_show_urls = False 203*9880d681SAndroid Build Coastguard Worker 204*9880d681SAndroid Build Coastguard Worker# Documents to append as an appendix to all manuals. 205*9880d681SAndroid Build Coastguard Worker#latex_appendices = [] 206*9880d681SAndroid Build Coastguard Worker 207*9880d681SAndroid Build Coastguard Worker# If false, no module index is generated. 208*9880d681SAndroid Build Coastguard Worker#latex_domain_indices = True 209*9880d681SAndroid Build Coastguard Worker 210*9880d681SAndroid Build Coastguard Worker 211*9880d681SAndroid Build Coastguard Worker# -- Options for manual page output -------------------------------------------- 212*9880d681SAndroid Build Coastguard Worker 213*9880d681SAndroid Build Coastguard Worker# One entry per manual page. List of tuples 214*9880d681SAndroid Build Coastguard Worker# (source start file, name, description, authors, manual section). 215*9880d681SAndroid Build Coastguard Workerman_pages = [] 216*9880d681SAndroid Build Coastguard Worker 217*9880d681SAndroid Build Coastguard Worker# Automatically derive the list of man pages from the contents of the command 218*9880d681SAndroid Build Coastguard Worker# guide subdirectory. 219*9880d681SAndroid Build Coastguard Workerbasedir = os.path.dirname(__file__) 220*9880d681SAndroid Build Coastguard Workerman_page_authors = "Maintained by The LLVM Team (http://llvm.org/)." 221*9880d681SAndroid Build Coastguard Workercommand_guide_subpath = 'CommandGuide' 222*9880d681SAndroid Build Coastguard Workercommand_guide_path = os.path.join(basedir, command_guide_subpath) 223*9880d681SAndroid Build Coastguard Workerfor name in os.listdir(command_guide_path): 224*9880d681SAndroid Build Coastguard Worker # Ignore non-ReST files and the index page. 225*9880d681SAndroid Build Coastguard Worker if not name.endswith('.rst') or name in ('index.rst',): 226*9880d681SAndroid Build Coastguard Worker continue 227*9880d681SAndroid Build Coastguard Worker 228*9880d681SAndroid Build Coastguard Worker # Otherwise, automatically extract the description. 229*9880d681SAndroid Build Coastguard Worker file_subpath = os.path.join(command_guide_subpath, name) 230*9880d681SAndroid Build Coastguard Worker with open(os.path.join(command_guide_path, name)) as f: 231*9880d681SAndroid Build Coastguard Worker title = f.readline().rstrip('\n') 232*9880d681SAndroid Build Coastguard Worker header = f.readline().rstrip('\n') 233*9880d681SAndroid Build Coastguard Worker 234*9880d681SAndroid Build Coastguard Worker if len(header) != len(title): 235*9880d681SAndroid Build Coastguard Worker print >>sys.stderr, ( 236*9880d681SAndroid Build Coastguard Worker "error: invalid header in %r (does not match title)" % ( 237*9880d681SAndroid Build Coastguard Worker file_subpath,)) 238*9880d681SAndroid Build Coastguard Worker if ' - ' not in title: 239*9880d681SAndroid Build Coastguard Worker print >>sys.stderr, ( 240*9880d681SAndroid Build Coastguard Worker ("error: invalid title in %r " 241*9880d681SAndroid Build Coastguard Worker "(expected '<name> - <description>')") % ( 242*9880d681SAndroid Build Coastguard Worker file_subpath,)) 243*9880d681SAndroid Build Coastguard Worker 244*9880d681SAndroid Build Coastguard Worker # Split the name out of the title. 245*9880d681SAndroid Build Coastguard Worker name,description = title.split(' - ', 1) 246*9880d681SAndroid Build Coastguard Worker man_pages.append((file_subpath.replace('.rst',''), name, 247*9880d681SAndroid Build Coastguard Worker description, man_page_authors, 1)) 248*9880d681SAndroid Build Coastguard Worker 249*9880d681SAndroid Build Coastguard Worker# If true, show URL addresses after external links. 250*9880d681SAndroid Build Coastguard Worker#man_show_urls = False 251*9880d681SAndroid Build Coastguard Worker 252*9880d681SAndroid Build Coastguard Worker# FIXME: Define intersphinx configration. 253*9880d681SAndroid Build Coastguard Workerintersphinx_mapping = {} 254