[761b082] | 1 | import datetime |
---|
[46498bd] | 2 | |
---|
[64a3db7] | 3 | def build_date(): |
---|
| 4 | now = datetime.date.today() |
---|
[f97be09] | 5 | m = now.strftime('%B') |
---|
[64a3db7] | 6 | y = now.strftime('%Y') |
---|
[876035b] | 7 | if now.day == 11: |
---|
| 8 | s = 'th' |
---|
| 9 | elif now.day % 10 == 1: |
---|
[64a3db7] | 10 | s = 'st' |
---|
[876035b] | 11 | elif now.day == 12: |
---|
| 12 | s = 'th' |
---|
[64a3db7] | 13 | elif now.day % 10 == 2: |
---|
| 14 | s = 'nd' |
---|
[876035b] | 15 | elif now.day == 13: |
---|
| 16 | s = 'th' |
---|
[64a3db7] | 17 | elif now.day == 3: |
---|
| 18 | s = 'rd' |
---|
| 19 | else: |
---|
| 20 | s = 'th' |
---|
| 21 | d = '%2d%s' % (now.day, s) |
---|
| 22 | return '%s %s %s' % (d, m, y) |
---|
| 23 | |
---|
[5daabd2] | 24 | extensions = [ |
---|
| 25 | "sphinx.ext.autodoc", |
---|
| 26 | "sphinx.ext.coverage", |
---|
| 27 | "sphinx.ext.doctest", |
---|
| 28 | "sphinx.ext.graphviz", |
---|
| 29 | "sphinx.ext.intersphinx", |
---|
[c1dddac] | 30 | "sphinx.ext.mathjax", |
---|
| 31 | "sphinxcontrib.bibtex", |
---|
[5daabd2] | 32 | "rtemsext", |
---|
| 33 | "rtemsdomain", |
---|
| 34 | ] |
---|
| 35 | |
---|
| 36 | # Add any paths that contain templates here, relative to this directory. |
---|
[5ce8e43] | 37 | #templates_path = ['build/_templates'] |
---|
[5daabd2] | 38 | |
---|
| 39 | # The suffix of source filenames. |
---|
| 40 | source_suffix = '.rst' |
---|
| 41 | |
---|
| 42 | # The encoding of source files. |
---|
| 43 | #source_encoding = 'utf-8-sig' |
---|
| 44 | |
---|
| 45 | # The master toctree document. |
---|
| 46 | master_doc = 'index' |
---|
| 47 | |
---|
| 48 | # General information about the project. |
---|
| 49 | project = u'RTEMS Documentation Project' |
---|
[e7f009e] | 50 | copyright = u'2017, RTEMS Project (built %s)' % (build_date()) |
---|
[5daabd2] | 51 | |
---|
| 52 | # The version info for the project you're documenting, acts as replacement for |
---|
| 53 | # |version| and |release|, also used in various other places throughout the |
---|
| 54 | # built documents. |
---|
| 55 | # |
---|
| 56 | # The short X.Y version. |
---|
[f97be09] | 57 | #version = '@VERSION@' |
---|
[5daabd2] | 58 | |
---|
| 59 | # The full version, including alpha/beta/rc tags. |
---|
[f97be09] | 60 | #release = '@RELEASE@' |
---|
[5daabd2] | 61 | |
---|
| 62 | # The language for content autogenerated by Sphinx. Refer to documentation |
---|
| 63 | # for a list of supported languages. |
---|
| 64 | #language = None |
---|
| 65 | |
---|
| 66 | # There are two options for replacing |today|: either, you set today to some |
---|
| 67 | # non-false value, then it is used: |
---|
| 68 | #today = '' |
---|
| 69 | # Else, today_fmt is used as the format for a strftime call. |
---|
| 70 | #today_fmt = '%B %d, %Y' |
---|
| 71 | |
---|
| 72 | # List of patterns, relative to source directory, that match files and |
---|
| 73 | # directories to ignore when looking for source files. |
---|
| 74 | exclude_patterns = [] |
---|
| 75 | |
---|
| 76 | # The reST default role (used for this markup: `text`) to use for all documents. |
---|
| 77 | #default_role = None |
---|
| 78 | |
---|
| 79 | # If true, '()' will be appended to :func: etc. cross-reference text. |
---|
| 80 | #add_function_parentheses = True |
---|
| 81 | |
---|
| 82 | # If true, the current module name will be prepended to all description |
---|
| 83 | # unit titles (such as .. function::). |
---|
| 84 | #add_module_names = True |
---|
| 85 | |
---|
| 86 | # If true, sectionauthor and moduleauthor directives will be shown in the |
---|
| 87 | # output. They are ignored by default. |
---|
| 88 | #show_authors = False |
---|
| 89 | |
---|
| 90 | # The name of the Pygments (syntax highlighting) style to use. |
---|
| 91 | pygments_style = 'sphinx' |
---|
| 92 | |
---|
| 93 | # A list of ignored prefixes for module index sorting. |
---|
| 94 | #modindex_common_prefix = [] |
---|
| 95 | |
---|
| 96 | # -- Options for HTML output --------------------------------------------------- |
---|
| 97 | |
---|
| 98 | # The theme to use for HTML and HTML Help pages. See the documentation for |
---|
| 99 | # a list of builtin themes. |
---|
| 100 | |
---|
[a316b1f] | 101 | import sphinx_rtd_theme_rtems |
---|
| 102 | html_theme = "sphinx_rtd_theme_rtems" |
---|
| 103 | html_theme_path = [sphinx_rtd_theme_rtems.get_html_theme_path()] |
---|
[5daabd2] | 104 | |
---|
| 105 | # Theme options are theme-specific and customize the look and feel of a theme |
---|
| 106 | # further. For a list of options available for each theme, see the |
---|
| 107 | # documentation. |
---|
[e7f009e] | 108 | html_theme_options = { |
---|
| 109 | 'collapse_navigation': False, |
---|
| 110 | 'display_version': True, |
---|
| 111 | 'sticky_navigation': True, |
---|
| 112 | 'genindex': True, |
---|
| 113 | } |
---|
[5daabd2] | 114 | |
---|
| 115 | # Add any paths that contain custom themes here, relative to this directory. |
---|
| 116 | #html_theme_path = [] |
---|
| 117 | |
---|
| 118 | # The name for this set of Sphinx documents. If None, it defaults to |
---|
| 119 | # "<project> v<release> documentation". |
---|
| 120 | #html_title = None |
---|
| 121 | |
---|
| 122 | # A shorter title for the navigation bar. Default is the same as html_title. |
---|
| 123 | #html_short_title = None |
---|
| 124 | |
---|
| 125 | # The name of an image file (relative to this directory) to place at the top |
---|
| 126 | # of the sidebar. |
---|
| 127 | #html_logo = None |
---|
| 128 | |
---|
| 129 | # The name of an image file (within the static path) to use as favicon of the |
---|
| 130 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 |
---|
| 131 | # pixels large. |
---|
| 132 | #html_favicon = None |
---|
| 133 | |
---|
| 134 | # Add any paths that contain custom static files (such as style sheets) here, |
---|
| 135 | # relative to this directory. They are copied after the builtin static files, |
---|
| 136 | # so a file named "default.css" will overwrite the builtin "default.css". |
---|
[3a71759] | 137 | html_static_path = ['build/_static'] |
---|
[5daabd2] | 138 | |
---|
| 139 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, |
---|
| 140 | # using the given strftime format. |
---|
| 141 | #html_last_updated_fmt = '%b %d, %Y' |
---|
| 142 | |
---|
| 143 | # If true, SmartyPants will be used to convert quotes and dashes to |
---|
| 144 | # typographically correct entities. |
---|
| 145 | #html_use_smartypants = True |
---|
| 146 | |
---|
| 147 | # Custom sidebar templates, maps document names to template names. |
---|
| 148 | #html_sidebars = {} |
---|
| 149 | |
---|
| 150 | html_sidebars = { |
---|
| 151 | # 'index': ['sidebarlogo.html', 'sidebarintro.html', 'sourcelink.html','searchbox.html'], |
---|
| 152 | # '**': ['sidebarlogo.html', 'localtoc.html', 'relations.html', 'sourcelink.html', 'searchbox.html'] |
---|
| 153 | } |
---|
| 154 | |
---|
| 155 | |
---|
| 156 | # Additional templates that should be rendered to pages, maps page names to |
---|
| 157 | # template names. |
---|
| 158 | #html_additional_pages = {} |
---|
| 159 | |
---|
| 160 | # If false, no module index is generated. |
---|
| 161 | #html_domain_indices = True |
---|
| 162 | |
---|
| 163 | # If false, no index is generated. |
---|
| 164 | #html_use_index = True |
---|
| 165 | |
---|
| 166 | # If true, the index is split into individual pages for each letter. |
---|
| 167 | #html_split_index = False |
---|
| 168 | |
---|
| 169 | # If true, links to the reST sources are added to the pages. |
---|
[c18d76a] | 170 | html_show_sourcelink = False |
---|
[5daabd2] | 171 | |
---|
| 172 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. |
---|
| 173 | #html_show_sphinx = True |
---|
| 174 | |
---|
| 175 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. |
---|
| 176 | #html_show_copyright = True |
---|
| 177 | |
---|
| 178 | # If true, an OpenSearch description file will be output, and all pages will |
---|
| 179 | # contain a <link> tag referring to it. The value of this option must be the |
---|
| 180 | # base URL from which the finished HTML is served. |
---|
| 181 | #html_use_opensearch = '' |
---|
| 182 | |
---|
| 183 | # This is the file name suffix for HTML files (e.g. ".xhtml"). |
---|
| 184 | #html_file_suffix = None |
---|
| 185 | |
---|
| 186 | # Output file base name for HTML help builder. |
---|
[3a71759] | 187 | htmlhelp_basename = 'rtemsdoc' |
---|
[5daabd2] | 188 | |
---|
| 189 | |
---|
| 190 | # -- Options for LaTeX output -------------------------------------------------- |
---|
| 191 | latex_paper_size = 'a4' |
---|
| 192 | |
---|
| 193 | # Grouping the document tree into LaTeX files. List of tuples |
---|
| 194 | # (source start file, target name, title, author, documentclass [howto/manual]). |
---|
[a316b1f] | 195 | latex_documents = [] # must be overridden in local conf.py |
---|
[5daabd2] | 196 | |
---|
| 197 | # Additional stuff for LaTeX |
---|
[a316b1f] | 198 | # 'fontpkg': r'\usepackage{mathpazo}', |
---|
[5daabd2] | 199 | latex_elements = { |
---|
| 200 | 'papersize': 'a4paper', |
---|
[7130ed3] | 201 | 'pointsize': '11pt', |
---|
[5daabd2] | 202 | 'preamble': r''' |
---|
[ce4daf9] | 203 | \newcommand{\rtemscopyright}{%s} |
---|
[5daabd2] | 204 | \usepackage{rtemsstyle} |
---|
[5ce8e43] | 205 | ''' % (copyright), |
---|
| 206 | 'parsedliteralwraps': True, |
---|
[5daabd2] | 207 | } |
---|
| 208 | |
---|
| 209 | |
---|
[2bcd424] | 210 | latex_additional_files = ['../common/rtemsstyle.sty', '../common/minted.sty', '../common/logo.pdf'] |
---|
[5daabd2] | 211 | latex_use_modindex = False |
---|
| 212 | |
---|
| 213 | |
---|
| 214 | # The name of an image file (relative to this directory) to place at the top of |
---|
| 215 | # the title page. |
---|
| 216 | #latex_logo = None |
---|
| 217 | |
---|
| 218 | # If true, show page references after internal links. |
---|
[3966353] | 219 | latex_show_pagerefs = False |
---|
[5daabd2] | 220 | |
---|
| 221 | # If true, show URL addresses after external links. |
---|
[7130ed3] | 222 | #latex_show_urls=True |
---|
[5daabd2] | 223 | |
---|
| 224 | # Documents to append as an appendix to all manuals. |
---|
| 225 | #latex_appendices = [] |
---|
| 226 | |
---|
| 227 | # If false, no module index is generated. |
---|
| 228 | #latex_domain_indices = True |
---|
| 229 | |
---|
| 230 | |
---|
| 231 | # Example configuration for intersphinx: refer to the Python standard library. |
---|
[a316b1f] | 232 | #intersphinx_mapping = {'http://docs.python.org/': None} |
---|
[5daabd2] | 233 | |
---|
| 234 | highlight_language = "c" |
---|