diff options
author | Martin Liska <mliska@suse.cz> | 2022-11-13 21:58:06 +0100 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2022-11-14 09:35:04 +0100 |
commit | 705dd990de14128381962f8a9baf5b79be2b7d03 (patch) | |
tree | 540e3851a80959b47d395f2786d75c69bf497732 /maintainer-scripts | |
parent | 8c7311c198ea1a3104e75b84067b214b91b79906 (diff) | |
download | gcc-705dd990de14128381962f8a9baf5b79be2b7d03.zip gcc-705dd990de14128381962f8a9baf5b79be2b7d03.tar.gz gcc-705dd990de14128381962f8a9baf5b79be2b7d03.tar.bz2 |
Revert "sphinx: simplify default in baseconf.py."
This reverts commit 8d7a55b7f4ce37ecc869bd31cadc3f9e059e2f44.
Diffstat (limited to 'maintainer-scripts')
-rwxr-xr-x | maintainer-scripts/update_web_docs_git.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/maintainer-scripts/update_web_docs_git.py b/maintainer-scripts/update_web_docs_git.py index 18c8bbb..f3f5995 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') |