]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
doc: Use a separate directory for new modules we add to PATH
authorArsen Arsenović <arsen@aarsen.me>
Wed, 9 Nov 2022 21:31:34 +0000 (22:31 +0100)
committerMartin Liska <mliska@suse.cz>
Thu, 10 Nov 2022 05:26:27 +0000 (06:26 +0100)
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.

doc/baseconf.py
doc/modules/gcc_sphinx.py [moved from doc/gcc_sphinx.py with 100% similarity]

index 47e3a1264165f89067c3135c8437b800b97bca1a..d85659e45408e189e502452f1230dc01661970d7 100644 (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):
similarity index 100%
rename from doc/gcc_sphinx.py
rename to doc/modules/gcc_sphinx.py