aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArsen Arsenović <arsen@aarsen.me>2022-11-09 22:31:34 +0100
committerMartin Liska <mliska@suse.cz>2022-11-10 06:26:27 +0100
commit70f1c41061b2b55ed4cdc2e83c7cf326c7ebe7a4 (patch)
tree43cba5e5d25696b20810b22bcfe399282168cddf
parent0cbb756fe9c8e13a743bdcf599481b31bd01ddbc (diff)
downloadgcc-70f1c41061b2b55ed4cdc2e83c7cf326c7ebe7a4.zip
gcc-70f1c41061b2b55ed4cdc2e83c7cf326c7ebe7a4.tar.gz
gcc-70f1c41061b2b55ed4cdc2e83c7cf326c7ebe7a4.tar.bz2
doc: Use a separate directory for new modules we add to PATH
ChangeLog: * doc/baseconf.py: Inject dirname(__file__)/'modules' to path instead of just ``.''. * doc/gcc_sphinx.py: Moved to... * doc/modules/gcc_sphinx.py: ...here.
-rw-r--r--doc/baseconf.py4
-rw-r--r--doc/modules/gcc_sphinx.py (renamed from doc/gcc_sphinx.py)0
2 files changed, 3 insertions, 1 deletions
diff --git a/doc/baseconf.py b/doc/baseconf.py
index 47e3a12..d85659e 100644
--- a/doc/baseconf.py
+++ b/doc/baseconf.py
@@ -13,7 +13,6 @@
import os
import time
import sys
-# sys.path.insert(0, os.path.abspath('.'))
# gccint needs a deeper stack limit
sys.setrecursionlimit(2000)
@@ -23,8 +22,11 @@ sys.setrecursionlimit(2000)
# The full version, including alpha/beta/rc tags
folder = os.path.dirname(os.path.realpath(__file__))
+doc_modules = os.path.join(folder, 'modules')
gcc_srcdir = os.path.join(folder, '..', 'gcc')
+sys.path.insert(0, doc_modules)
+
def read_file(name):
path = os.path.join(gcc_srcdir, name)
if os.path.exists(path):
diff --git a/doc/gcc_sphinx.py b/doc/modules/gcc_sphinx.py
index 2ef15ae..2ef15ae 100644
--- a/doc/gcc_sphinx.py
+++ b/doc/modules/gcc_sphinx.py