public inbox for
 help / color / mirror / Atom feed
From: "Arsen Arsenović" <>
Cc: "Arsen Arsenović" <>, "Martin Liška" <>
Subject: [PATCH] doc: Use a separate directory for new modules we add to PATH
Date: Wed,  9 Nov 2022 22:31:34 +0100	[thread overview]
Message-ID: <> (raw)


	* doc/ Inject dirname(__file__)/'modules' to path
	instead of just ``.''.
	* doc/ Moved to...
	* doc/modules/

This patch addresses a path mixup and provides a nice compromise between
convenience for the user and namespace cleanliness.  Further modules
that Sphinx imports internally from the GCC tree should also go into
this directory.  I moved gcc_sphinx since I knew of that one, but there
could be others I'm missing.

Tested on x86_64-pc-linux-gnu with ``make html''.

Have a great night!

 doc/                 | 4 +++-
 doc/{ => modules}/ | 0
 2 files changed, 3 insertions(+), 1 deletion(-)
 rename doc/{ => modules}/ (100%)

diff --git a/doc/ b/doc/
index 47e3a126416..d85659e4540 100644
--- a/doc/
+++ b/doc/
@@ -13,7 +13,6 @@
 import os
 import time
 import sys
-# sys.path.insert(0, os.path.abspath('.'))
 # gccint needs a deeper stack limit
@@ -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/ b/doc/modules/
similarity index 100%
rename from doc/
rename to doc/modules/

             reply	other threads:[~2022-11-09 21:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-09 21:31 Arsen Arsenović [this message]
2022-11-09 22:18 ` David Malcolm
2022-11-10  5:26 ` Martin Liška

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).