X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2Fconf.py;h=18972824dbb4e8a00709ebe2c2c74ca88220fedf;hb=191690dc8c0076ce1b3f7a36a4681082e3361b86;hp=324410ed561eecbedab7646bea28473e68a7f446;hpb=21e993c1b1083ef91441a363997d0efc8e646191;p=oota-llvm.git diff --git a/docs/conf.py b/docs/conf.py index 324410ed561..18972824dbb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -40,16 +40,16 @@ master_doc = 'index' # General information about the project. project = u'LLVM' -copyright = u'2012, LLVM Project' +copyright = u'2003-2014, LLVM Project' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. -version = '3.1' +version = '3.7' # The full version, including alpha/beta/rc tags. -release = '3.1' +release = '3.7' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -95,10 +95,10 @@ html_theme = 'llvm-theme' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -#html_theme_options = {} +html_theme_options = { "nosidebar": True } # Add any paths that contain custom themes here, relative to this directory. -html_theme_path = ["."] +html_theme_path = ["_themes"] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". @@ -119,7 +119,7 @@ html_theme_path = ["."] # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -#html_static_path = ['_static'] +html_static_path = ['_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. @@ -134,14 +134,7 @@ html_sidebars = {'index': 'indexsidebar.html'} # Additional templates that should be rendered to pages, maps page names to # template names. -# -# We load all the old-school HTML documentation pages into Sphinx here. -basedir = os.path.dirname(__file__) -html_additional_pages = {} -for file in os.listdir(basedir): - if file.endswith('.html'): - name,_ = os.path.splitext(file) - html_additional_pages[name] = file +#html_additional_pages = {} # If false, no module index is generated. #html_domain_indices = True @@ -218,35 +211,42 @@ latex_documents = [ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). -man_pages = [ - ('index', 'LLVM', u'LLVM Documentation', - [u'LLVM project'], 1) -] +man_pages = [] + +# Automatically derive the list of man pages from the contents of the command +# guide subdirectory. +basedir = os.path.dirname(__file__) +man_page_authors = "Maintained by The LLVM Team (http://llvm.org/)." +command_guide_subpath = 'CommandGuide' +command_guide_path = os.path.join(basedir, command_guide_subpath) +for name in os.listdir(command_guide_path): + # Ignore non-ReST files and the index page. + if not name.endswith('.rst') or name in ('index.rst',): + continue + + # Otherwise, automatically extract the description. + file_subpath = os.path.join(command_guide_subpath, name) + with open(os.path.join(command_guide_path, name)) as f: + title = f.readline().rstrip('\n') + header = f.readline().rstrip('\n') + + if len(header) != len(title): + print >>sys.stderr, ( + "error: invalid header in %r (does not match title)" % ( + file_subpath,)) + if ' - ' not in title: + print >>sys.stderr, ( + ("error: invalid title in %r " + "(expected ' - ')") % ( + file_subpath,)) + + # Split the name out of the title. + name,description = title.split(' - ', 1) + man_pages.append((file_subpath.replace('.rst',''), name, + description, man_page_authors, 1)) # If true, show URL addresses after external links. #man_show_urls = False - -# -- Options for Texinfo output ------------------------------------------------ - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - ('index', 'LLVM', u'LLVM Documentation', - u'LLVM project', 'LLVM', 'One line description of project.', - 'Miscellaneous'), -] - -# Documents to append as an appendix to all manuals. -#texinfo_appendices = [] - -# If false, no module index is generated. -#texinfo_domain_indices = True - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -#texinfo_show_urls = 'footnote' - - # FIXME: Define intersphinx configration. intersphinx_mapping = {}