public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/marxin/heads/sphinx-v7)] sphinx: update baseconf.py file
@ 2022-08-01 11:51 Martin Liska
0 siblings, 0 replies; 10+ messages in thread
From: Martin Liska @ 2022-08-01 11:51 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:26c48826d1194f04e76e75f3c70240e097026640
commit 26c48826d1194f04e76e75f3c70240e097026640
Author: Martin Liska <mliska@suse.cz>
Date: Tue Mar 15 12:09:29 2022 +0100
sphinx: update baseconf.py file
ChangeLog:
* doc/baseconf.py: Update the baseconf.py for GCC source
folder.
Diff:
---
doc/baseconf.py | 56 ++++++++++++++++++++++++--------------------------------
1 file changed, 24 insertions(+), 32 deletions(-)
diff --git a/doc/baseconf.py b/doc/baseconf.py
index 0978da7823e..ee068f57fa4 100644
--- a/doc/baseconf.py
+++ b/doc/baseconf.py
@@ -11,7 +11,7 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
-import subprocess
+import time
import sys
# sys.path.insert(0, os.path.abspath('.'))
@@ -22,11 +22,10 @@ sys.setrecursionlimit(2000)
# The full version, including alpha/beta/rc tags
-# FIXME
folder = os.path.dirname(os.path.realpath(__file__))
-gcc_srcdir = os.path.join(folder, './objdir')
+gcc_srcdir = os.path.join(folder, '..', 'gcc')
-def __read_file(name):
+def read_file(name):
path = os.path.join(gcc_srcdir, name)
if os.path.exists(path):
return open(path).read().strip()
@@ -34,22 +33,15 @@ def __read_file(name):
return ''
-def __get_git_revision():
- try:
- r = subprocess.check_output('git rev-parse --short HEAD', shell=True, encoding='utf8',
- stderr=subprocess.DEVNULL)
- return r.strip()
- except subprocess.CalledProcessError:
- return None
+gcc_BASEVER = read_file('BASE-VER')
+gcc_DEVPHASE = read_file('DEV-PHASE')
+gcc_DATESTAMP = read_file('DATESTAMP')
+gcc_REVISION = read_file('REVISION')
+VERSION_PACKAGE = os.getenv('VERSION_PACKAGE')
+BUGURL = os.getenv('BUGURL')
-gcc_BASEVER = __read_file('BASE-VER')
-gcc_DEVPHASE = __read_file('DEV-PHASE')
-gcc_DATESTAMP = __read_file('DATESTAMP')
-gcc_REVISION = __read_file('REVISION')
-
-VERSION_PACKAGE = os.getenv('VERSION_PACKAGE', '(GCC)')
-BUGURL = os.getenv('BUGURL', 'https://gcc.gnu.org/bugs/')
+YEAR = time.strftime('%Y')
# The short X.Y version.
version = gcc_BASEVER
@@ -69,10 +61,14 @@ needs_sphinx = '5.1'
rst_epilog = '''
.. |gcc_version| replace:: %s
-.. |package_version| replace:: %s
-.. |bugurl| replace:: %s
-.. |needs_sphinx| replace:: %s
-''' % (gcc_BASEVER, VERSION_PACKAGE, BUGURL, needs_sphinx)
+.. |needs_sphinx| replace:: %s\n
+''' % (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 ---------------------------------------------------
@@ -115,18 +111,14 @@ html_theme_options = {
'navigation_with_keys': True,
}
-html_logo = '../logo.svg'
+html_logo = os.path.join(folder, 'logo.svg')
-html_favicon = '../favicon.ico'
+html_favicon = os.path.join(folder, 'favicon.ico')
html_last_updated_fmt = ''
-html_context = {
- 'commit': __get_git_revision ()
-}
-
html_static_path = [
- '../_static'
+ os.path.join(folder, '_static')
]
html_css_files = [
@@ -144,7 +136,7 @@ suppress_warnings = [
# Use xelatex by default
latex_engine = 'xelatex'
-latex_logo = '../logo.pdf'
+latex_logo = os.path.join(folder, 'logo.pdf')
# TODO: Remove once xindy works in an openSUSE container
latex_use_xindy = False
@@ -174,7 +166,7 @@ option_emphasise_placeholders = True
# Cross manual reference mapping
intersphinx_mapping = {}
-for manual in ['cpp', 'cppinternals', 'gfortran', 'gcc', 'gccgo', 'gccint', 'gdc',
+for manual in ['cpp', 'cppinternals', 'fortran', 'gcc', 'gccgo', 'gccint', 'gdc',
'gfc-internals', 'gnat-style', 'gnat_rm', 'gnat_ugn', 'install',
'libgccjit', 'libgomp', 'libiberty', 'libitm', 'libquadmath']:
- intersphinx_mapping[manual] = (f'https://splichal.eu/scripts/sphinx/{manual}/_build/html/', None)
+ intersphinx_mapping[manual] = (f'https://gcc.gnu.org/onlinedocs/{manual}/', None)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gcc(refs/users/marxin/heads/sphinx-v7)] sphinx: update baseconf.py file
@ 2022-08-01 4:02 Martin Liska
0 siblings, 0 replies; 10+ messages in thread
From: Martin Liska @ 2022-08-01 4:02 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:6901faf2c075585d9d94470d7175614bf0f7ea8a
commit 6901faf2c075585d9d94470d7175614bf0f7ea8a
Author: Martin Liska <mliska@suse.cz>
Date: Tue Mar 15 12:09:29 2022 +0100
sphinx: update baseconf.py file
Diff:
---
doc/baseconf.py | 57 +++++++++++++++++++++++++--------------------------------
1 file changed, 25 insertions(+), 32 deletions(-)
diff --git a/doc/baseconf.py b/doc/baseconf.py
index 0978da7823e..7a123167a49 100644
--- a/doc/baseconf.py
+++ b/doc/baseconf.py
@@ -11,7 +11,7 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
-import subprocess
+import time
import sys
# sys.path.insert(0, os.path.abspath('.'))
@@ -22,11 +22,10 @@ sys.setrecursionlimit(2000)
# The full version, including alpha/beta/rc tags
-# FIXME
folder = os.path.dirname(os.path.realpath(__file__))
-gcc_srcdir = os.path.join(folder, './objdir')
+gcc_srcdir = os.path.join(folder, '..', 'gcc')
-def __read_file(name):
+def read_file(name):
path = os.path.join(gcc_srcdir, name)
if os.path.exists(path):
return open(path).read().strip()
@@ -34,22 +33,15 @@ def __read_file(name):
return ''
-def __get_git_revision():
- try:
- r = subprocess.check_output('git rev-parse --short HEAD', shell=True, encoding='utf8',
- stderr=subprocess.DEVNULL)
- return r.strip()
- except subprocess.CalledProcessError:
- return None
+gcc_BASEVER = read_file('BASE-VER')
+gcc_DEVPHASE = read_file('DEV-PHASE')
+gcc_DATESTAMP = read_file('DATESTAMP')
+gcc_REVISION = read_file('REVISION')
+VERSION_PACKAGE = os.getenv('VERSION_PACKAGE')
+BUGURL = os.getenv('BUGURL')
-gcc_BASEVER = __read_file('BASE-VER')
-gcc_DEVPHASE = __read_file('DEV-PHASE')
-gcc_DATESTAMP = __read_file('DATESTAMP')
-gcc_REVISION = __read_file('REVISION')
-
-VERSION_PACKAGE = os.getenv('VERSION_PACKAGE', '(GCC)')
-BUGURL = os.getenv('BUGURL', 'https://gcc.gnu.org/bugs/')
+YEAR = time.strftime('%Y')
# The short X.Y version.
version = gcc_BASEVER
@@ -69,10 +61,14 @@ needs_sphinx = '5.1'
rst_epilog = '''
.. |gcc_version| replace:: %s
-.. |package_version| replace:: %s
-.. |bugurl| replace:: %s
-.. |needs_sphinx| replace:: %s
-''' % (gcc_BASEVER, VERSION_PACKAGE, BUGURL, needs_sphinx)
+.. |needs_sphinx| replace:: %s\n
+''' % (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 ---------------------------------------------------
@@ -115,18 +111,14 @@ html_theme_options = {
'navigation_with_keys': True,
}
-html_logo = '../logo.svg'
+html_logo = os.path.join(folder, 'logo.svg')
-html_favicon = '../favicon.ico'
+html_favicon = os.path.join(folder, 'favicon.ico')
html_last_updated_fmt = ''
-html_context = {
- 'commit': __get_git_revision ()
-}
-
html_static_path = [
- '../_static'
+ os.path.join(folder, '_static')
]
html_css_files = [
@@ -139,12 +131,13 @@ man_pages = []
# FIXME: handle WARNINGs: unknown option issues and cross refs
suppress_warnings = [
'ref.option',
+ 'ref.ref'
]
# Use xelatex by default
latex_engine = 'xelatex'
-latex_logo = '../logo.pdf'
+latex_logo = os.path.join(folder, 'logo.pdf')
# TODO: Remove once xindy works in an openSUSE container
latex_use_xindy = False
@@ -174,7 +167,7 @@ option_emphasise_placeholders = True
# Cross manual reference mapping
intersphinx_mapping = {}
-for manual in ['cpp', 'cppinternals', 'gfortran', 'gcc', 'gccgo', 'gccint', 'gdc',
+for manual in ['cpp', 'cppinternals', 'fortran', 'gcc', 'gccgo', 'gccint', 'gdc',
'gfc-internals', 'gnat-style', 'gnat_rm', 'gnat_ugn', 'install',
'libgccjit', 'libgomp', 'libiberty', 'libitm', 'libquadmath']:
- intersphinx_mapping[manual] = (f'https://splichal.eu/scripts/sphinx/{manual}/_build/html/', None)
+ intersphinx_mapping[manual] = (f'https://gcc.gnu.org/onlinedocs/{manual}/', None)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gcc(refs/users/marxin/heads/sphinx-v7)] sphinx: update baseconf.py file
@ 2022-07-28 13:18 Martin Liska
0 siblings, 0 replies; 10+ messages in thread
From: Martin Liska @ 2022-07-28 13:18 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:53af5cda2676ce6a0377be9d64f8ccfe949bb911
commit 53af5cda2676ce6a0377be9d64f8ccfe949bb911
Author: Martin Liska <mliska@suse.cz>
Date: Tue Mar 15 12:09:29 2022 +0100
sphinx: update baseconf.py file
Diff:
---
doc/baseconf.py | 57 +++++++++++++++++++++++++--------------------------------
1 file changed, 25 insertions(+), 32 deletions(-)
diff --git a/doc/baseconf.py b/doc/baseconf.py
index 0978da7823e..7a123167a49 100644
--- a/doc/baseconf.py
+++ b/doc/baseconf.py
@@ -11,7 +11,7 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
-import subprocess
+import time
import sys
# sys.path.insert(0, os.path.abspath('.'))
@@ -22,11 +22,10 @@ sys.setrecursionlimit(2000)
# The full version, including alpha/beta/rc tags
-# FIXME
folder = os.path.dirname(os.path.realpath(__file__))
-gcc_srcdir = os.path.join(folder, './objdir')
+gcc_srcdir = os.path.join(folder, '..', 'gcc')
-def __read_file(name):
+def read_file(name):
path = os.path.join(gcc_srcdir, name)
if os.path.exists(path):
return open(path).read().strip()
@@ -34,22 +33,15 @@ def __read_file(name):
return ''
-def __get_git_revision():
- try:
- r = subprocess.check_output('git rev-parse --short HEAD', shell=True, encoding='utf8',
- stderr=subprocess.DEVNULL)
- return r.strip()
- except subprocess.CalledProcessError:
- return None
+gcc_BASEVER = read_file('BASE-VER')
+gcc_DEVPHASE = read_file('DEV-PHASE')
+gcc_DATESTAMP = read_file('DATESTAMP')
+gcc_REVISION = read_file('REVISION')
+VERSION_PACKAGE = os.getenv('VERSION_PACKAGE')
+BUGURL = os.getenv('BUGURL')
-gcc_BASEVER = __read_file('BASE-VER')
-gcc_DEVPHASE = __read_file('DEV-PHASE')
-gcc_DATESTAMP = __read_file('DATESTAMP')
-gcc_REVISION = __read_file('REVISION')
-
-VERSION_PACKAGE = os.getenv('VERSION_PACKAGE', '(GCC)')
-BUGURL = os.getenv('BUGURL', 'https://gcc.gnu.org/bugs/')
+YEAR = time.strftime('%Y')
# The short X.Y version.
version = gcc_BASEVER
@@ -69,10 +61,14 @@ needs_sphinx = '5.1'
rst_epilog = '''
.. |gcc_version| replace:: %s
-.. |package_version| replace:: %s
-.. |bugurl| replace:: %s
-.. |needs_sphinx| replace:: %s
-''' % (gcc_BASEVER, VERSION_PACKAGE, BUGURL, needs_sphinx)
+.. |needs_sphinx| replace:: %s\n
+''' % (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 ---------------------------------------------------
@@ -115,18 +111,14 @@ html_theme_options = {
'navigation_with_keys': True,
}
-html_logo = '../logo.svg'
+html_logo = os.path.join(folder, 'logo.svg')
-html_favicon = '../favicon.ico'
+html_favicon = os.path.join(folder, 'favicon.ico')
html_last_updated_fmt = ''
-html_context = {
- 'commit': __get_git_revision ()
-}
-
html_static_path = [
- '../_static'
+ os.path.join(folder, '_static')
]
html_css_files = [
@@ -139,12 +131,13 @@ man_pages = []
# FIXME: handle WARNINGs: unknown option issues and cross refs
suppress_warnings = [
'ref.option',
+ 'ref.ref'
]
# Use xelatex by default
latex_engine = 'xelatex'
-latex_logo = '../logo.pdf'
+latex_logo = os.path.join(folder, 'logo.pdf')
# TODO: Remove once xindy works in an openSUSE container
latex_use_xindy = False
@@ -174,7 +167,7 @@ option_emphasise_placeholders = True
# Cross manual reference mapping
intersphinx_mapping = {}
-for manual in ['cpp', 'cppinternals', 'gfortran', 'gcc', 'gccgo', 'gccint', 'gdc',
+for manual in ['cpp', 'cppinternals', 'fortran', 'gcc', 'gccgo', 'gccint', 'gdc',
'gfc-internals', 'gnat-style', 'gnat_rm', 'gnat_ugn', 'install',
'libgccjit', 'libgomp', 'libiberty', 'libitm', 'libquadmath']:
- intersphinx_mapping[manual] = (f'https://splichal.eu/scripts/sphinx/{manual}/_build/html/', None)
+ intersphinx_mapping[manual] = (f'https://gcc.gnu.org/onlinedocs/{manual}/', None)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gcc(refs/users/marxin/heads/sphinx-v7)] sphinx: update baseconf.py file
@ 2022-07-28 12:39 Martin Liska
0 siblings, 0 replies; 10+ messages in thread
From: Martin Liska @ 2022-07-28 12:39 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:b2fc364a4c0af38cc1f571bf696ce94d79b920fd
commit b2fc364a4c0af38cc1f571bf696ce94d79b920fd
Author: Martin Liska <mliska@suse.cz>
Date: Tue Mar 15 12:09:29 2022 +0100
sphinx: update baseconf.py file
Diff:
---
doc/baseconf.py | 57 +++++++++++++++++++++++++--------------------------------
1 file changed, 25 insertions(+), 32 deletions(-)
diff --git a/doc/baseconf.py b/doc/baseconf.py
index 0978da7823e..7a123167a49 100644
--- a/doc/baseconf.py
+++ b/doc/baseconf.py
@@ -11,7 +11,7 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
-import subprocess
+import time
import sys
# sys.path.insert(0, os.path.abspath('.'))
@@ -22,11 +22,10 @@ sys.setrecursionlimit(2000)
# The full version, including alpha/beta/rc tags
-# FIXME
folder = os.path.dirname(os.path.realpath(__file__))
-gcc_srcdir = os.path.join(folder, './objdir')
+gcc_srcdir = os.path.join(folder, '..', 'gcc')
-def __read_file(name):
+def read_file(name):
path = os.path.join(gcc_srcdir, name)
if os.path.exists(path):
return open(path).read().strip()
@@ -34,22 +33,15 @@ def __read_file(name):
return ''
-def __get_git_revision():
- try:
- r = subprocess.check_output('git rev-parse --short HEAD', shell=True, encoding='utf8',
- stderr=subprocess.DEVNULL)
- return r.strip()
- except subprocess.CalledProcessError:
- return None
+gcc_BASEVER = read_file('BASE-VER')
+gcc_DEVPHASE = read_file('DEV-PHASE')
+gcc_DATESTAMP = read_file('DATESTAMP')
+gcc_REVISION = read_file('REVISION')
+VERSION_PACKAGE = os.getenv('VERSION_PACKAGE')
+BUGURL = os.getenv('BUGURL')
-gcc_BASEVER = __read_file('BASE-VER')
-gcc_DEVPHASE = __read_file('DEV-PHASE')
-gcc_DATESTAMP = __read_file('DATESTAMP')
-gcc_REVISION = __read_file('REVISION')
-
-VERSION_PACKAGE = os.getenv('VERSION_PACKAGE', '(GCC)')
-BUGURL = os.getenv('BUGURL', 'https://gcc.gnu.org/bugs/')
+YEAR = time.strftime('%Y')
# The short X.Y version.
version = gcc_BASEVER
@@ -69,10 +61,14 @@ needs_sphinx = '5.1'
rst_epilog = '''
.. |gcc_version| replace:: %s
-.. |package_version| replace:: %s
-.. |bugurl| replace:: %s
-.. |needs_sphinx| replace:: %s
-''' % (gcc_BASEVER, VERSION_PACKAGE, BUGURL, needs_sphinx)
+.. |needs_sphinx| replace:: %s\n
+''' % (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 ---------------------------------------------------
@@ -115,18 +111,14 @@ html_theme_options = {
'navigation_with_keys': True,
}
-html_logo = '../logo.svg'
+html_logo = os.path.join(folder, 'logo.svg')
-html_favicon = '../favicon.ico'
+html_favicon = os.path.join(folder, 'favicon.ico')
html_last_updated_fmt = ''
-html_context = {
- 'commit': __get_git_revision ()
-}
-
html_static_path = [
- '../_static'
+ os.path.join(folder, '_static')
]
html_css_files = [
@@ -139,12 +131,13 @@ man_pages = []
# FIXME: handle WARNINGs: unknown option issues and cross refs
suppress_warnings = [
'ref.option',
+ 'ref.ref'
]
# Use xelatex by default
latex_engine = 'xelatex'
-latex_logo = '../logo.pdf'
+latex_logo = os.path.join(folder, 'logo.pdf')
# TODO: Remove once xindy works in an openSUSE container
latex_use_xindy = False
@@ -174,7 +167,7 @@ option_emphasise_placeholders = True
# Cross manual reference mapping
intersphinx_mapping = {}
-for manual in ['cpp', 'cppinternals', 'gfortran', 'gcc', 'gccgo', 'gccint', 'gdc',
+for manual in ['cpp', 'cppinternals', 'fortran', 'gcc', 'gccgo', 'gccint', 'gdc',
'gfc-internals', 'gnat-style', 'gnat_rm', 'gnat_ugn', 'install',
'libgccjit', 'libgomp', 'libiberty', 'libitm', 'libquadmath']:
- intersphinx_mapping[manual] = (f'https://splichal.eu/scripts/sphinx/{manual}/_build/html/', None)
+ intersphinx_mapping[manual] = (f'https://gcc.gnu.org/onlinedocs/{manual}/', None)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gcc(refs/users/marxin/heads/sphinx-v7)] sphinx: update baseconf.py file
@ 2022-07-28 12:22 Martin Liska
0 siblings, 0 replies; 10+ messages in thread
From: Martin Liska @ 2022-07-28 12:22 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:798ae7975cfc5bee8e5eb20b735cb3cc1faa821e
commit 798ae7975cfc5bee8e5eb20b735cb3cc1faa821e
Author: Martin Liska <mliska@suse.cz>
Date: Tue Mar 15 12:09:29 2022 +0100
sphinx: update baseconf.py file
Diff:
---
doc/baseconf.py | 57 +++++++++++++++++++++++++--------------------------------
1 file changed, 25 insertions(+), 32 deletions(-)
diff --git a/doc/baseconf.py b/doc/baseconf.py
index 0978da7823e..7a123167a49 100644
--- a/doc/baseconf.py
+++ b/doc/baseconf.py
@@ -11,7 +11,7 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
-import subprocess
+import time
import sys
# sys.path.insert(0, os.path.abspath('.'))
@@ -22,11 +22,10 @@ sys.setrecursionlimit(2000)
# The full version, including alpha/beta/rc tags
-# FIXME
folder = os.path.dirname(os.path.realpath(__file__))
-gcc_srcdir = os.path.join(folder, './objdir')
+gcc_srcdir = os.path.join(folder, '..', 'gcc')
-def __read_file(name):
+def read_file(name):
path = os.path.join(gcc_srcdir, name)
if os.path.exists(path):
return open(path).read().strip()
@@ -34,22 +33,15 @@ def __read_file(name):
return ''
-def __get_git_revision():
- try:
- r = subprocess.check_output('git rev-parse --short HEAD', shell=True, encoding='utf8',
- stderr=subprocess.DEVNULL)
- return r.strip()
- except subprocess.CalledProcessError:
- return None
+gcc_BASEVER = read_file('BASE-VER')
+gcc_DEVPHASE = read_file('DEV-PHASE')
+gcc_DATESTAMP = read_file('DATESTAMP')
+gcc_REVISION = read_file('REVISION')
+VERSION_PACKAGE = os.getenv('VERSION_PACKAGE')
+BUGURL = os.getenv('BUGURL')
-gcc_BASEVER = __read_file('BASE-VER')
-gcc_DEVPHASE = __read_file('DEV-PHASE')
-gcc_DATESTAMP = __read_file('DATESTAMP')
-gcc_REVISION = __read_file('REVISION')
-
-VERSION_PACKAGE = os.getenv('VERSION_PACKAGE', '(GCC)')
-BUGURL = os.getenv('BUGURL', 'https://gcc.gnu.org/bugs/')
+YEAR = time.strftime('%Y')
# The short X.Y version.
version = gcc_BASEVER
@@ -69,10 +61,14 @@ needs_sphinx = '5.1'
rst_epilog = '''
.. |gcc_version| replace:: %s
-.. |package_version| replace:: %s
-.. |bugurl| replace:: %s
-.. |needs_sphinx| replace:: %s
-''' % (gcc_BASEVER, VERSION_PACKAGE, BUGURL, needs_sphinx)
+.. |needs_sphinx| replace:: %s\n
+''' % (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 ---------------------------------------------------
@@ -115,18 +111,14 @@ html_theme_options = {
'navigation_with_keys': True,
}
-html_logo = '../logo.svg'
+html_logo = os.path.join(folder, 'logo.svg')
-html_favicon = '../favicon.ico'
+html_favicon = os.path.join(folder, 'favicon.ico')
html_last_updated_fmt = ''
-html_context = {
- 'commit': __get_git_revision ()
-}
-
html_static_path = [
- '../_static'
+ os.path.join(folder, '_static')
]
html_css_files = [
@@ -139,12 +131,13 @@ man_pages = []
# FIXME: handle WARNINGs: unknown option issues and cross refs
suppress_warnings = [
'ref.option',
+ 'ref.ref'
]
# Use xelatex by default
latex_engine = 'xelatex'
-latex_logo = '../logo.pdf'
+latex_logo = os.path.join(folder, 'logo.pdf')
# TODO: Remove once xindy works in an openSUSE container
latex_use_xindy = False
@@ -174,7 +167,7 @@ option_emphasise_placeholders = True
# Cross manual reference mapping
intersphinx_mapping = {}
-for manual in ['cpp', 'cppinternals', 'gfortran', 'gcc', 'gccgo', 'gccint', 'gdc',
+for manual in ['cpp', 'cppinternals', 'fortran', 'gcc', 'gccgo', 'gccint', 'gdc',
'gfc-internals', 'gnat-style', 'gnat_rm', 'gnat_ugn', 'install',
'libgccjit', 'libgomp', 'libiberty', 'libitm', 'libquadmath']:
- intersphinx_mapping[manual] = (f'https://splichal.eu/scripts/sphinx/{manual}/_build/html/', None)
+ intersphinx_mapping[manual] = (f'https://gcc.gnu.org/onlinedocs/{manual}/', None)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gcc(refs/users/marxin/heads/sphinx-v7)] sphinx: update baseconf.py file
@ 2022-07-27 14:47 Martin Liska
0 siblings, 0 replies; 10+ messages in thread
From: Martin Liska @ 2022-07-27 14:47 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:345dbaedfedc6e499c7b79bf05b67dcc3638cf77
commit 345dbaedfedc6e499c7b79bf05b67dcc3638cf77
Author: Martin Liska <mliska@suse.cz>
Date: Tue Mar 15 12:09:29 2022 +0100
sphinx: update baseconf.py file
Diff:
---
doc/baseconf.py | 57 +++++++++++++++++++++++++--------------------------------
1 file changed, 25 insertions(+), 32 deletions(-)
diff --git a/doc/baseconf.py b/doc/baseconf.py
index 0978da7823e..7a123167a49 100644
--- a/doc/baseconf.py
+++ b/doc/baseconf.py
@@ -11,7 +11,7 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
-import subprocess
+import time
import sys
# sys.path.insert(0, os.path.abspath('.'))
@@ -22,11 +22,10 @@ sys.setrecursionlimit(2000)
# The full version, including alpha/beta/rc tags
-# FIXME
folder = os.path.dirname(os.path.realpath(__file__))
-gcc_srcdir = os.path.join(folder, './objdir')
+gcc_srcdir = os.path.join(folder, '..', 'gcc')
-def __read_file(name):
+def read_file(name):
path = os.path.join(gcc_srcdir, name)
if os.path.exists(path):
return open(path).read().strip()
@@ -34,22 +33,15 @@ def __read_file(name):
return ''
-def __get_git_revision():
- try:
- r = subprocess.check_output('git rev-parse --short HEAD', shell=True, encoding='utf8',
- stderr=subprocess.DEVNULL)
- return r.strip()
- except subprocess.CalledProcessError:
- return None
+gcc_BASEVER = read_file('BASE-VER')
+gcc_DEVPHASE = read_file('DEV-PHASE')
+gcc_DATESTAMP = read_file('DATESTAMP')
+gcc_REVISION = read_file('REVISION')
+VERSION_PACKAGE = os.getenv('VERSION_PACKAGE')
+BUGURL = os.getenv('BUGURL')
-gcc_BASEVER = __read_file('BASE-VER')
-gcc_DEVPHASE = __read_file('DEV-PHASE')
-gcc_DATESTAMP = __read_file('DATESTAMP')
-gcc_REVISION = __read_file('REVISION')
-
-VERSION_PACKAGE = os.getenv('VERSION_PACKAGE', '(GCC)')
-BUGURL = os.getenv('BUGURL', 'https://gcc.gnu.org/bugs/')
+YEAR = time.strftime('%Y')
# The short X.Y version.
version = gcc_BASEVER
@@ -69,10 +61,14 @@ needs_sphinx = '5.1'
rst_epilog = '''
.. |gcc_version| replace:: %s
-.. |package_version| replace:: %s
-.. |bugurl| replace:: %s
-.. |needs_sphinx| replace:: %s
-''' % (gcc_BASEVER, VERSION_PACKAGE, BUGURL, needs_sphinx)
+.. |needs_sphinx| replace:: %s\n
+''' % (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 ---------------------------------------------------
@@ -115,18 +111,14 @@ html_theme_options = {
'navigation_with_keys': True,
}
-html_logo = '../logo.svg'
+html_logo = os.path.join(folder, 'logo.svg')
-html_favicon = '../favicon.ico'
+html_favicon = os.path.join(folder, 'favicon.ico')
html_last_updated_fmt = ''
-html_context = {
- 'commit': __get_git_revision ()
-}
-
html_static_path = [
- '../_static'
+ os.path.join(folder, '_static')
]
html_css_files = [
@@ -139,12 +131,13 @@ man_pages = []
# FIXME: handle WARNINGs: unknown option issues and cross refs
suppress_warnings = [
'ref.option',
+ 'ref.ref'
]
# Use xelatex by default
latex_engine = 'xelatex'
-latex_logo = '../logo.pdf'
+latex_logo = os.path.join(folder, 'logo.pdf')
# TODO: Remove once xindy works in an openSUSE container
latex_use_xindy = False
@@ -174,7 +167,7 @@ option_emphasise_placeholders = True
# Cross manual reference mapping
intersphinx_mapping = {}
-for manual in ['cpp', 'cppinternals', 'gfortran', 'gcc', 'gccgo', 'gccint', 'gdc',
+for manual in ['cpp', 'cppinternals', 'fortran', 'gcc', 'gccgo', 'gccint', 'gdc',
'gfc-internals', 'gnat-style', 'gnat_rm', 'gnat_ugn', 'install',
'libgccjit', 'libgomp', 'libiberty', 'libitm', 'libquadmath']:
- intersphinx_mapping[manual] = (f'https://splichal.eu/scripts/sphinx/{manual}/_build/html/', None)
+ intersphinx_mapping[manual] = (f'https://gcc.gnu.org/onlinedocs/{manual}/', None)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gcc(refs/users/marxin/heads/sphinx-v7)] sphinx: update baseconf.py file
@ 2022-07-27 12:17 Martin Liska
0 siblings, 0 replies; 10+ messages in thread
From: Martin Liska @ 2022-07-27 12:17 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:22a34192ad7737020f5d0921e30aec10d113379b
commit 22a34192ad7737020f5d0921e30aec10d113379b
Author: Martin Liska <mliska@suse.cz>
Date: Tue Mar 15 12:09:29 2022 +0100
sphinx: update baseconf.py file
Diff:
---
doc/baseconf.py | 57 +++++++++++++++++++++++++--------------------------------
1 file changed, 25 insertions(+), 32 deletions(-)
diff --git a/doc/baseconf.py b/doc/baseconf.py
index 0978da7823e..7a123167a49 100644
--- a/doc/baseconf.py
+++ b/doc/baseconf.py
@@ -11,7 +11,7 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
-import subprocess
+import time
import sys
# sys.path.insert(0, os.path.abspath('.'))
@@ -22,11 +22,10 @@ sys.setrecursionlimit(2000)
# The full version, including alpha/beta/rc tags
-# FIXME
folder = os.path.dirname(os.path.realpath(__file__))
-gcc_srcdir = os.path.join(folder, './objdir')
+gcc_srcdir = os.path.join(folder, '..', 'gcc')
-def __read_file(name):
+def read_file(name):
path = os.path.join(gcc_srcdir, name)
if os.path.exists(path):
return open(path).read().strip()
@@ -34,22 +33,15 @@ def __read_file(name):
return ''
-def __get_git_revision():
- try:
- r = subprocess.check_output('git rev-parse --short HEAD', shell=True, encoding='utf8',
- stderr=subprocess.DEVNULL)
- return r.strip()
- except subprocess.CalledProcessError:
- return None
+gcc_BASEVER = read_file('BASE-VER')
+gcc_DEVPHASE = read_file('DEV-PHASE')
+gcc_DATESTAMP = read_file('DATESTAMP')
+gcc_REVISION = read_file('REVISION')
+VERSION_PACKAGE = os.getenv('VERSION_PACKAGE')
+BUGURL = os.getenv('BUGURL')
-gcc_BASEVER = __read_file('BASE-VER')
-gcc_DEVPHASE = __read_file('DEV-PHASE')
-gcc_DATESTAMP = __read_file('DATESTAMP')
-gcc_REVISION = __read_file('REVISION')
-
-VERSION_PACKAGE = os.getenv('VERSION_PACKAGE', '(GCC)')
-BUGURL = os.getenv('BUGURL', 'https://gcc.gnu.org/bugs/')
+YEAR = time.strftime('%Y')
# The short X.Y version.
version = gcc_BASEVER
@@ -69,10 +61,14 @@ needs_sphinx = '5.1'
rst_epilog = '''
.. |gcc_version| replace:: %s
-.. |package_version| replace:: %s
-.. |bugurl| replace:: %s
-.. |needs_sphinx| replace:: %s
-''' % (gcc_BASEVER, VERSION_PACKAGE, BUGURL, needs_sphinx)
+.. |needs_sphinx| replace:: %s\n
+''' % (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 ---------------------------------------------------
@@ -115,18 +111,14 @@ html_theme_options = {
'navigation_with_keys': True,
}
-html_logo = '../logo.svg'
+html_logo = os.path.join(folder, 'logo.svg')
-html_favicon = '../favicon.ico'
+html_favicon = os.path.join(folder, 'favicon.ico')
html_last_updated_fmt = ''
-html_context = {
- 'commit': __get_git_revision ()
-}
-
html_static_path = [
- '../_static'
+ os.path.join(folder, '_static')
]
html_css_files = [
@@ -139,12 +131,13 @@ man_pages = []
# FIXME: handle WARNINGs: unknown option issues and cross refs
suppress_warnings = [
'ref.option',
+ 'ref.ref'
]
# Use xelatex by default
latex_engine = 'xelatex'
-latex_logo = '../logo.pdf'
+latex_logo = os.path.join(folder, 'logo.pdf')
# TODO: Remove once xindy works in an openSUSE container
latex_use_xindy = False
@@ -174,7 +167,7 @@ option_emphasise_placeholders = True
# Cross manual reference mapping
intersphinx_mapping = {}
-for manual in ['cpp', 'cppinternals', 'gfortran', 'gcc', 'gccgo', 'gccint', 'gdc',
+for manual in ['cpp', 'cppinternals', 'fortran', 'gcc', 'gccgo', 'gccint', 'gdc',
'gfc-internals', 'gnat-style', 'gnat_rm', 'gnat_ugn', 'install',
'libgccjit', 'libgomp', 'libiberty', 'libitm', 'libquadmath']:
- intersphinx_mapping[manual] = (f'https://splichal.eu/scripts/sphinx/{manual}/_build/html/', None)
+ intersphinx_mapping[manual] = (f'https://gcc.gnu.org/onlinedocs/{manual}/', None)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gcc(refs/users/marxin/heads/sphinx-v7)] sphinx: update baseconf.py file
@ 2022-07-26 12:50 Martin Liska
0 siblings, 0 replies; 10+ messages in thread
From: Martin Liska @ 2022-07-26 12:50 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:04870bb7d5026948353a7ad48a57d33126c7ea05
commit 04870bb7d5026948353a7ad48a57d33126c7ea05
Author: Martin Liska <mliska@suse.cz>
Date: Tue Mar 15 12:09:29 2022 +0100
sphinx: update baseconf.py file
Diff:
---
doc/baseconf.py | 57 +++++++++++++++++++++++++--------------------------------
1 file changed, 25 insertions(+), 32 deletions(-)
diff --git a/doc/baseconf.py b/doc/baseconf.py
index 0978da7823e..7a123167a49 100644
--- a/doc/baseconf.py
+++ b/doc/baseconf.py
@@ -11,7 +11,7 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
-import subprocess
+import time
import sys
# sys.path.insert(0, os.path.abspath('.'))
@@ -22,11 +22,10 @@ sys.setrecursionlimit(2000)
# The full version, including alpha/beta/rc tags
-# FIXME
folder = os.path.dirname(os.path.realpath(__file__))
-gcc_srcdir = os.path.join(folder, './objdir')
+gcc_srcdir = os.path.join(folder, '..', 'gcc')
-def __read_file(name):
+def read_file(name):
path = os.path.join(gcc_srcdir, name)
if os.path.exists(path):
return open(path).read().strip()
@@ -34,22 +33,15 @@ def __read_file(name):
return ''
-def __get_git_revision():
- try:
- r = subprocess.check_output('git rev-parse --short HEAD', shell=True, encoding='utf8',
- stderr=subprocess.DEVNULL)
- return r.strip()
- except subprocess.CalledProcessError:
- return None
+gcc_BASEVER = read_file('BASE-VER')
+gcc_DEVPHASE = read_file('DEV-PHASE')
+gcc_DATESTAMP = read_file('DATESTAMP')
+gcc_REVISION = read_file('REVISION')
+VERSION_PACKAGE = os.getenv('VERSION_PACKAGE')
+BUGURL = os.getenv('BUGURL')
-gcc_BASEVER = __read_file('BASE-VER')
-gcc_DEVPHASE = __read_file('DEV-PHASE')
-gcc_DATESTAMP = __read_file('DATESTAMP')
-gcc_REVISION = __read_file('REVISION')
-
-VERSION_PACKAGE = os.getenv('VERSION_PACKAGE', '(GCC)')
-BUGURL = os.getenv('BUGURL', 'https://gcc.gnu.org/bugs/')
+YEAR = time.strftime('%Y')
# The short X.Y version.
version = gcc_BASEVER
@@ -69,10 +61,14 @@ needs_sphinx = '5.1'
rst_epilog = '''
.. |gcc_version| replace:: %s
-.. |package_version| replace:: %s
-.. |bugurl| replace:: %s
-.. |needs_sphinx| replace:: %s
-''' % (gcc_BASEVER, VERSION_PACKAGE, BUGURL, needs_sphinx)
+.. |needs_sphinx| replace:: %s\n
+''' % (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 ---------------------------------------------------
@@ -115,18 +111,14 @@ html_theme_options = {
'navigation_with_keys': True,
}
-html_logo = '../logo.svg'
+html_logo = os.path.join(folder, 'logo.svg')
-html_favicon = '../favicon.ico'
+html_favicon = os.path.join(folder, 'favicon.ico')
html_last_updated_fmt = ''
-html_context = {
- 'commit': __get_git_revision ()
-}
-
html_static_path = [
- '../_static'
+ os.path.join(folder, '_static')
]
html_css_files = [
@@ -139,12 +131,13 @@ man_pages = []
# FIXME: handle WARNINGs: unknown option issues and cross refs
suppress_warnings = [
'ref.option',
+ 'ref.ref'
]
# Use xelatex by default
latex_engine = 'xelatex'
-latex_logo = '../logo.pdf'
+latex_logo = os.path.join(folder, 'logo.pdf')
# TODO: Remove once xindy works in an openSUSE container
latex_use_xindy = False
@@ -174,7 +167,7 @@ option_emphasise_placeholders = True
# Cross manual reference mapping
intersphinx_mapping = {}
-for manual in ['cpp', 'cppinternals', 'gfortran', 'gcc', 'gccgo', 'gccint', 'gdc',
+for manual in ['cpp', 'cppinternals', 'fortran', 'gcc', 'gccgo', 'gccint', 'gdc',
'gfc-internals', 'gnat-style', 'gnat_rm', 'gnat_ugn', 'install',
'libgccjit', 'libgomp', 'libiberty', 'libitm', 'libquadmath']:
- intersphinx_mapping[manual] = (f'https://splichal.eu/scripts/sphinx/{manual}/_build/html/', None)
+ intersphinx_mapping[manual] = (f'https://gcc.gnu.org/onlinedocs/{manual}/', None)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gcc(refs/users/marxin/heads/sphinx-v7)] sphinx: update baseconf.py file
@ 2022-07-26 12:43 Martin Liska
0 siblings, 0 replies; 10+ messages in thread
From: Martin Liska @ 2022-07-26 12:43 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:ab4aed89362ab25ee168a5cd071574920867ef22
commit ab4aed89362ab25ee168a5cd071574920867ef22
Author: Martin Liska <mliska@suse.cz>
Date: Tue Mar 15 12:09:29 2022 +0100
sphinx: update baseconf.py file
Diff:
---
doc/baseconf.py | 57 +++++++++++++++++++++++++--------------------------------
1 file changed, 25 insertions(+), 32 deletions(-)
diff --git a/doc/baseconf.py b/doc/baseconf.py
index 0978da7823e..7a123167a49 100644
--- a/doc/baseconf.py
+++ b/doc/baseconf.py
@@ -11,7 +11,7 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
-import subprocess
+import time
import sys
# sys.path.insert(0, os.path.abspath('.'))
@@ -22,11 +22,10 @@ sys.setrecursionlimit(2000)
# The full version, including alpha/beta/rc tags
-# FIXME
folder = os.path.dirname(os.path.realpath(__file__))
-gcc_srcdir = os.path.join(folder, './objdir')
+gcc_srcdir = os.path.join(folder, '..', 'gcc')
-def __read_file(name):
+def read_file(name):
path = os.path.join(gcc_srcdir, name)
if os.path.exists(path):
return open(path).read().strip()
@@ -34,22 +33,15 @@ def __read_file(name):
return ''
-def __get_git_revision():
- try:
- r = subprocess.check_output('git rev-parse --short HEAD', shell=True, encoding='utf8',
- stderr=subprocess.DEVNULL)
- return r.strip()
- except subprocess.CalledProcessError:
- return None
+gcc_BASEVER = read_file('BASE-VER')
+gcc_DEVPHASE = read_file('DEV-PHASE')
+gcc_DATESTAMP = read_file('DATESTAMP')
+gcc_REVISION = read_file('REVISION')
+VERSION_PACKAGE = os.getenv('VERSION_PACKAGE')
+BUGURL = os.getenv('BUGURL')
-gcc_BASEVER = __read_file('BASE-VER')
-gcc_DEVPHASE = __read_file('DEV-PHASE')
-gcc_DATESTAMP = __read_file('DATESTAMP')
-gcc_REVISION = __read_file('REVISION')
-
-VERSION_PACKAGE = os.getenv('VERSION_PACKAGE', '(GCC)')
-BUGURL = os.getenv('BUGURL', 'https://gcc.gnu.org/bugs/')
+YEAR = time.strftime('%Y')
# The short X.Y version.
version = gcc_BASEVER
@@ -69,10 +61,14 @@ needs_sphinx = '5.1'
rst_epilog = '''
.. |gcc_version| replace:: %s
-.. |package_version| replace:: %s
-.. |bugurl| replace:: %s
-.. |needs_sphinx| replace:: %s
-''' % (gcc_BASEVER, VERSION_PACKAGE, BUGURL, needs_sphinx)
+.. |needs_sphinx| replace:: %s\n
+''' % (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 ---------------------------------------------------
@@ -115,18 +111,14 @@ html_theme_options = {
'navigation_with_keys': True,
}
-html_logo = '../logo.svg'
+html_logo = os.path.join(folder, 'logo.svg')
-html_favicon = '../favicon.ico'
+html_favicon = os.path.join(folder, 'favicon.ico')
html_last_updated_fmt = ''
-html_context = {
- 'commit': __get_git_revision ()
-}
-
html_static_path = [
- '../_static'
+ os.path.join(folder, '_static')
]
html_css_files = [
@@ -139,12 +131,13 @@ man_pages = []
# FIXME: handle WARNINGs: unknown option issues and cross refs
suppress_warnings = [
'ref.option',
+ 'ref.ref'
]
# Use xelatex by default
latex_engine = 'xelatex'
-latex_logo = '../logo.pdf'
+latex_logo = os.path.join(folder, 'logo.pdf')
# TODO: Remove once xindy works in an openSUSE container
latex_use_xindy = False
@@ -174,7 +167,7 @@ option_emphasise_placeholders = True
# Cross manual reference mapping
intersphinx_mapping = {}
-for manual in ['cpp', 'cppinternals', 'gfortran', 'gcc', 'gccgo', 'gccint', 'gdc',
+for manual in ['cpp', 'cppinternals', 'fortran', 'gcc', 'gccgo', 'gccint', 'gdc',
'gfc-internals', 'gnat-style', 'gnat_rm', 'gnat_ugn', 'install',
'libgccjit', 'libgomp', 'libiberty', 'libitm', 'libquadmath']:
- intersphinx_mapping[manual] = (f'https://splichal.eu/scripts/sphinx/{manual}/_build/html/', None)
+ intersphinx_mapping[manual] = (f'https://gcc.gnu.org/onlinedocs/{manual}/', None)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gcc(refs/users/marxin/heads/sphinx-v7)] sphinx: update baseconf.py file
@ 2022-07-26 12:42 Martin Liska
0 siblings, 0 replies; 10+ messages in thread
From: Martin Liska @ 2022-07-26 12:42 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:5dab5867ed95362de514400d8602420a7d9b2539
commit 5dab5867ed95362de514400d8602420a7d9b2539
Author: Martin Liska <mliska@suse.cz>
Date: Tue Mar 15 12:09:29 2022 +0100
sphinx: update baseconf.py file
Diff:
---
doc/baseconf.py | 57 +++++++++++++++++++++++++--------------------------------
1 file changed, 25 insertions(+), 32 deletions(-)
diff --git a/doc/baseconf.py b/doc/baseconf.py
index 0978da7823e..7a123167a49 100644
--- a/doc/baseconf.py
+++ b/doc/baseconf.py
@@ -11,7 +11,7 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
-import subprocess
+import time
import sys
# sys.path.insert(0, os.path.abspath('.'))
@@ -22,11 +22,10 @@ sys.setrecursionlimit(2000)
# The full version, including alpha/beta/rc tags
-# FIXME
folder = os.path.dirname(os.path.realpath(__file__))
-gcc_srcdir = os.path.join(folder, './objdir')
+gcc_srcdir = os.path.join(folder, '..', 'gcc')
-def __read_file(name):
+def read_file(name):
path = os.path.join(gcc_srcdir, name)
if os.path.exists(path):
return open(path).read().strip()
@@ -34,22 +33,15 @@ def __read_file(name):
return ''
-def __get_git_revision():
- try:
- r = subprocess.check_output('git rev-parse --short HEAD', shell=True, encoding='utf8',
- stderr=subprocess.DEVNULL)
- return r.strip()
- except subprocess.CalledProcessError:
- return None
+gcc_BASEVER = read_file('BASE-VER')
+gcc_DEVPHASE = read_file('DEV-PHASE')
+gcc_DATESTAMP = read_file('DATESTAMP')
+gcc_REVISION = read_file('REVISION')
+VERSION_PACKAGE = os.getenv('VERSION_PACKAGE')
+BUGURL = os.getenv('BUGURL')
-gcc_BASEVER = __read_file('BASE-VER')
-gcc_DEVPHASE = __read_file('DEV-PHASE')
-gcc_DATESTAMP = __read_file('DATESTAMP')
-gcc_REVISION = __read_file('REVISION')
-
-VERSION_PACKAGE = os.getenv('VERSION_PACKAGE', '(GCC)')
-BUGURL = os.getenv('BUGURL', 'https://gcc.gnu.org/bugs/')
+YEAR = time.strftime('%Y')
# The short X.Y version.
version = gcc_BASEVER
@@ -69,10 +61,14 @@ needs_sphinx = '5.1'
rst_epilog = '''
.. |gcc_version| replace:: %s
-.. |package_version| replace:: %s
-.. |bugurl| replace:: %s
-.. |needs_sphinx| replace:: %s
-''' % (gcc_BASEVER, VERSION_PACKAGE, BUGURL, needs_sphinx)
+.. |needs_sphinx| replace:: %s\n
+''' % (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 ---------------------------------------------------
@@ -115,18 +111,14 @@ html_theme_options = {
'navigation_with_keys': True,
}
-html_logo = '../logo.svg'
+html_logo = os.path.join(folder, 'logo.svg')
-html_favicon = '../favicon.ico'
+html_favicon = os.path.join(folder, 'favicon.ico')
html_last_updated_fmt = ''
-html_context = {
- 'commit': __get_git_revision ()
-}
-
html_static_path = [
- '../_static'
+ os.path.join(folder, '_static')
]
html_css_files = [
@@ -139,12 +131,13 @@ man_pages = []
# FIXME: handle WARNINGs: unknown option issues and cross refs
suppress_warnings = [
'ref.option',
+ 'ref.ref'
]
# Use xelatex by default
latex_engine = 'xelatex'
-latex_logo = '../logo.pdf'
+latex_logo = os.path.join(folder, 'logo.pdf')
# TODO: Remove once xindy works in an openSUSE container
latex_use_xindy = False
@@ -174,7 +167,7 @@ option_emphasise_placeholders = True
# Cross manual reference mapping
intersphinx_mapping = {}
-for manual in ['cpp', 'cppinternals', 'gfortran', 'gcc', 'gccgo', 'gccint', 'gdc',
+for manual in ['cpp', 'cppinternals', 'fortran', 'gcc', 'gccgo', 'gccint', 'gdc',
'gfc-internals', 'gnat-style', 'gnat_rm', 'gnat_ugn', 'install',
'libgccjit', 'libgomp', 'libiberty', 'libitm', 'libquadmath']:
- intersphinx_mapping[manual] = (f'https://splichal.eu/scripts/sphinx/{manual}/_build/html/', None)
+ intersphinx_mapping[manual] = (f'https://gcc.gnu.org/onlinedocs/{manual}/', None)
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2022-08-01 11:51 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-01 11:51 [gcc(refs/users/marxin/heads/sphinx-v7)] sphinx: update baseconf.py file Martin Liska
-- strict thread matches above, loose matches on Subject: below --
2022-08-01 4:02 Martin Liska
2022-07-28 13:18 Martin Liska
2022-07-28 12:39 Martin Liska
2022-07-28 12:22 Martin Liska
2022-07-27 14:47 Martin Liska
2022-07-27 12:17 Martin Liska
2022-07-26 12:50 Martin Liska
2022-07-26 12:43 Martin Liska
2022-07-26 12:42 Martin Liska
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).