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 r13-3981] Revert "sphinx: simplify default in baseconf.py."
Date: Mon, 14 Nov 2022 08:38:17 +0000 (GMT)	[thread overview]
Message-ID: <20221114083820.70DDC385189D@sourceware.org> (raw)

https://gcc.gnu.org/g:705dd990de14128381962f8a9baf5b79be2b7d03

commit r13-3981-g705dd990de14128381962f8a9baf5b79be2b7d03
Author: Martin Liska <mliska@suse.cz>
Date:   Sun Nov 13 21:58:06 2022 +0100

    Revert "sphinx: simplify default in baseconf.py."
    
    This reverts commit 8d7a55b7f4ce37ecc869bd31cadc3f9e059e2f44.

Diff:
---
 doc/baseconf.py                           | 13 +++++++------
 maintainer-scripts/update_web_docs_git.py |  9 +++++++--
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/doc/baseconf.py b/doc/baseconf.py
index 47e3a126416..f80fdabc8b0 100644
--- a/doc/baseconf.py
+++ b/doc/baseconf.py
@@ -71,11 +71,13 @@ needs_sphinx = '5.3'
 rst_epilog = '''
 .. |gcc_version| replace:: %s
 .. |needs_sphinx| replace:: %s\n
-.. |bugurl| replace:: %s\n
-.. |package_version| replace:: %s\n
-''' % (gcc_BASEVER, needs_sphinx,
-       BUGURL if BUGURL else 'https://gcc.gnu.org/bugs/',
-       VERSION_PACKAGE if VERSION_PACKAGE else '(GCC)')
+''' % (gcc_BASEVER, needs_sphinx)
+
+if BUGURL:
+    rst_epilog += '.. |bugurl| replace:: %s\n' % BUGURL
+
+if VERSION_PACKAGE:
+    rst_epilog += '.. |package_version| replace:: %s\n' % VERSION_PACKAGE
 
 # -- General configuration ---------------------------------------------------
 
@@ -204,7 +206,6 @@ extlinks = {
 
 extlinks_detect_hardcoded_links = True
 
-
 # Set common settings where we need NAME of the documentation
 def set_common(name, module):
     module['tags'].add(name)
diff --git a/maintainer-scripts/update_web_docs_git.py b/maintainer-scripts/update_web_docs_git.py
index 18c8bbb8324..f3f59953ac0 100755
--- a/maintainer-scripts/update_web_docs_git.py
+++ b/maintainer-scripts/update_web_docs_git.py
@@ -10,6 +10,7 @@ import tempfile
 from pathlib import Path
 
 GITROOT = '/git/gcc.git'
+BUGURL = 'https://gcc.gnu.org/bugs/'
 
 parser = argparse.ArgumentParser(description='Update web documentation.')
 parser.add_argument('output_folder', help='Output folder')
@@ -52,6 +53,10 @@ with tempfile.TemporaryDirectory() as folder:
     temp = Path('tmp').resolve()
     temp.mkdir()
 
+    # Prepare default env. variables
+    childenv = os.environ.copy()
+    childenv['BUGURL'] = BUGURL
+
     # Build and copy the documentation
     for i, (config_folder, docname) in enumerate(sorted(configs)):
         print(f'=== building {i + 1}/{len(configs)}: {docname} ===')
@@ -60,7 +65,7 @@ with tempfile.TemporaryDirectory() as folder:
         cmd = f'make -C doc html SOURCEDIR={config_folder} BUILDDIR={temp}/{docname}'
         if args.sphinx_build:
             cmd += f' SPHINXBUILD={args.sphinx_build}'
-        subprocess.run(cmd, shell=True, check=True,
+        subprocess.run(cmd, shell=True, env=childenv, check=True,
                        capture_output=not args.verbose)
         os.unlink(f'{temp}/{docname}/html/.buildinfo')
         shutil.copytree(f'{temp}/{docname}/html', f'{output}/{docname}',
@@ -70,7 +75,7 @@ with tempfile.TemporaryDirectory() as folder:
         cmd = f'make -C doc latexpdf SOURCEDIR={config_folder} BUILDDIR={temp}/pdf/{docname}'
         if args.sphinx_build:
             cmd += f' SPHINXBUILD={args.sphinx_build}'
-        subprocess.run(cmd, shell=True, check=True,
+        subprocess.run(cmd, shell=True, env=childenv, check=True,
                        capture_output=not args.verbose)
         shutil.copyfile(f'{temp}/pdf/{docname}/latex/{docname}.pdf',
                         f'{output}/{docname}.pdf')

                 reply	other threads:[~2022-11-14  8: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=20221114083820.70DDC385189D@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: link
Be 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).