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.
This commit is contained in:
Arsen Arsenović 2022-11-09 22:31:34 +01:00 committed by Martin Liska
parent 0cbb756fe9
commit 70f1c41061
2 changed files with 3 additions and 1 deletions

View file

@ -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):