mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 23:31:37 +00:00
[docs] Add support for building man pages using Sphinx.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156386 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
17412a0a03
commit
cbfc61bec1
59
docs/conf.py
59
docs/conf.py
@ -222,35 +222,42 @@ latex_documents = [
|
|||||||
|
|
||||||
# One entry per manual page. List of tuples
|
# One entry per manual page. List of tuples
|
||||||
# (source start file, name, description, authors, manual section).
|
# (source start file, name, description, authors, manual section).
|
||||||
man_pages = [
|
man_pages = []
|
||||||
('index', 'LLVM', u'LLVM Documentation',
|
|
||||||
[u'LLVM project'], 1)
|
# Automatically derive the list of man pages from the contents of the command
|
||||||
]
|
# guide subdirectory.
|
||||||
|
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:
|
||||||
|
it = iter(f)
|
||||||
|
title = it.next()[:-1]
|
||||||
|
header = it.next()[:-1]
|
||||||
|
|
||||||
|
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 '<name> - <description>')") % (
|
||||||
|
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.
|
# If true, show URL addresses after external links.
|
||||||
#man_show_urls = False
|
#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.
|
# FIXME: Define intersphinx configration.
|
||||||
intersphinx_mapping = {}
|
intersphinx_mapping = {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user