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