public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/marxin/heads/sphinx-final)] fixup! sphinx, ada: port to Sphinx Date: Mon, 7 Nov 2022 12:38:46 +0000 (GMT) [thread overview] Message-ID: <20221107123846.6CC2B3858418@sourceware.org> (raw) https://gcc.gnu.org/g:d35404f4dc77c567e40cad75708afe598019f89d commit d35404f4dc77c567e40cad75708afe598019f89d Author: Martin Liska <mliska@suse.cz> Date: Mon Sep 26 15:35:21 2022 +0200 fixup! sphinx,ada: port to Sphinx Diff: --- gcc/ada/doc/gnat-style/conf.py | 2 +- gcc/ada/doc/gnat_rm/conf.py | 2 +- gcc/ada/doc/gnat_ugn/conf.py | 2 +- gcc/ada/doc/share/adabaseconf.py | 18 +++++++----------- 4 files changed, 10 insertions(+), 14 deletions(-) diff --git a/gcc/ada/doc/gnat-style/conf.py b/gcc/ada/doc/gnat-style/conf.py index f9793b08054..a413d2632eb 100644 --- a/gcc/ada/doc/gnat-style/conf.py +++ b/gcc/ada/doc/gnat-style/conf.py @@ -9,7 +9,7 @@ name = 'gnat-style' project = 'GNAT Coding Style: A Guide for GNAT Developers' authors = 'AdaCore' -set_latex_elements(project) +set_latex_elements(latex_elements, project) # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, diff --git a/gcc/ada/doc/gnat_rm/conf.py b/gcc/ada/doc/gnat_rm/conf.py index f2abffc9f35..e99d1e6bd13 100644 --- a/gcc/ada/doc/gnat_rm/conf.py +++ b/gcc/ada/doc/gnat_rm/conf.py @@ -9,7 +9,7 @@ name = 'gnat_rm' project = 'GNAT Reference Manual' authors = 'AdaCore' -set_latex_elements(project) +set_latex_elements(latex_elements, project) # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, diff --git a/gcc/ada/doc/gnat_ugn/conf.py b/gcc/ada/doc/gnat_ugn/conf.py index d5d8b9e5ae1..94e3c07e836 100644 --- a/gcc/ada/doc/gnat_ugn/conf.py +++ b/gcc/ada/doc/gnat_ugn/conf.py @@ -9,7 +9,7 @@ name = 'gnat_ugn' project = "GNAT User's Guide for Native Platforms" authors = 'AdaCore' -set_latex_elements(project) +set_latex_elements(latex_elements, project) # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, diff --git a/gcc/ada/doc/share/adabaseconf.py b/gcc/ada/doc/share/adabaseconf.py index ce97ff80f7d..4a80a838c63 100644 --- a/gcc/ada/doc/share/adabaseconf.py +++ b/gcc/ada/doc/share/adabaseconf.py @@ -15,7 +15,6 @@ import ada_latex_elements import ada_pygments -texi_fsf = True # Set to False when FSF doc is switched to sphinx by default gnatvsn_content = read_file('ada/gnatvsn.ads') @@ -26,10 +25,7 @@ def get_gnat_version(): if m: return m.group(1).strip() else: - if texi_fsf: - return '' - else: - return gcc_BASEVER + return gcc_BASEVER def get_gnat_build_type(): @@ -54,7 +50,7 @@ if os.path.isfile('adacore_transparent.png'): if os.path.isfile('favicon.ico'): html_favicon = 'favicon.ico' -latex_additional_files = ['gnat.sty'] +latex_additional_files = ['../share/gnat.sty'] copyright_macros = { 'date': time.strftime('%b %d, %Y'), @@ -65,19 +61,19 @@ copyright_macros = { 'version': version} -def set_latex_elements(title): - global latex_elements - - latex_elements = { +def set_latex_elements(latex_elements, title): + elements = { 'preamble': '\\usepackage{gnat}\n' + ada_latex_elements.TOC_DEPTH + ada_latex_elements.PAGE_BLANK + ada_latex_elements.TOC_CMD + ada_latex_elements.LATEX_HYPHEN + - ada_latex_elements.ENCLOSE + ada_latex_elements.doc_settings(title, get_gnat_version()), 'tableofcontents': ada_latex_elements.TOC % copyright_macros } + for key, value in elements.items(): + latex_elements.setdefault(key, '') + latex_elements[key] += value def setup(app):
reply other threads:[~2022-11-07 12:38 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20221107123846.6CC2B3858418@sourceware.org \ --to=marxin@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).