From: Christophe Lyon <christophe.lyon@linaro.org>
To: buildbot@sourceware.org
Cc: Christophe Lyon <christophe.lyon@linaro.org>
Subject: [PATCH 5/6] autoregen.py: Add support for autogen
Date: Fri, 12 Apr 2024 20:05:58 +0000 [thread overview]
Message-ID: <20240412200559.1649050-6-christophe.lyon@linaro.org> (raw)
In-Reply-To: <20240412200559.1649050-1-christophe.lyon@linaro.org>
GCC's toplevel Makefile.in is generated with
autogen Makefile.def
(which uses Makefile.tpl too)
---
builder/containers/autoregen.py | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/builder/containers/autoregen.py b/builder/containers/autoregen.py
index 4731a87..d1ab217 100755
--- a/builder/containers/autoregen.py
+++ b/builder/containers/autoregen.py
@@ -21,6 +21,8 @@ ACLOCAL_BIN = next(name for name in ACLOCAL_NAMES if shutil.which(name))
AUTOHEADER_BIN = next(name for name in AUTOHEADER_NAMES if shutil.which(name))
AUTORECONF_BIN = next(name for name in AUTORECONF_NAMES if shutil.which(name))
+AUTOGEN_BIN = "autogen"
+
# autoconf-wrapper and automake-wrapper from Gentoo look at this environment variable.
# It's harmless to set it on other systems though.
EXTRA_ENV = {
@@ -29,6 +31,7 @@ EXTRA_ENV = {
"AUTOCONF": AUTOCONF_BIN,
"ACLOCAL": ACLOCAL_BIN,
"AUTOMAKE": AUTOMAKE_BIN,
+ "AUTOGEN": AUTOGEN_BIN,
}
ENV = os.environ.copy()
ENV.update(EXTRA_ENV)
@@ -110,6 +113,9 @@ def run_shell(cmd: str):
def regenerate_with_autoreconf():
run_shell(f"{AUTORECONF_BIN} -f")
+def regenerate_with_autogen():
+ run_shell(f"{AUTOGEN_BIN} Makefile.def")
+
def regenerate_manually():
configure_lines = open("configure.ac").read().splitlines()
if folder.stem == "fixincludes" or folder.stem == "libgm2" or any(
@@ -166,12 +172,20 @@ run_shell(f"{AUTOHEADER_BIN} --version")
print(f"Extra environment: {EXTRA_ENV}", flush=True)
config_folders: list[Path] = []
+autogen_folders: list[Path] = []
repo_root = Path.cwd()
for root, _, files in os.walk("."):
for file in files:
if file == "configure.ac":
config_folders.append(Path(root).resolve())
+ if file == "Makefile.tpl":
+ autogen_folders.append(Path(root).resolve())
+
+for folder in sorted(autogen_folders):
+ print(f"Entering directory {folder}", flush=True)
+ os.chdir(folder)
+ regenerate_with_autogen()
for folder in sorted(config_folders):
if folder.stem in SKIP_DIRS:
--
2.34.1
next prev parent reply other threads:[~2024-04-12 20:06 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-12 20:05 [PATCH 0/6] autoregen.py: Improve support for GCC Christophe Lyon
2024-04-12 20:05 ` [PATCH 1/6] auroregen.py: Check AC_CONFIG_MACRO_DIR instead of AC_CONFIG_MACRO_DIRS Christophe Lyon
2024-04-12 20:05 ` [PATCH 2/6] autoregen.py: Move comment Christophe Lyon
2024-04-12 20:05 ` [PATCH 3/6] autoregen.py: Flush all print commands Christophe Lyon
2024-04-15 2:09 ` Simon Marchi
2024-04-15 11:55 ` Christophe Lyon
2024-04-12 20:05 ` [PATCH 4/6] autoregen.py: Use autoreconf in most GCC directories Christophe Lyon
2024-04-15 3:07 ` Simon Marchi
2024-04-15 12:52 ` Christophe Lyon
2024-04-15 14:48 ` Simon Marchi
2024-04-16 14:47 ` Christophe Lyon
2024-04-16 15:32 ` Simon Marchi
2024-04-16 16:12 ` Christophe Lyon
2024-04-17 14:30 ` Christophe Lyon
2024-04-15 11:42 ` Mark Wielaard
2024-04-15 12:46 ` Mark Wielaard
2024-04-15 12:56 ` Christophe Lyon
2024-04-12 20:05 ` Christophe Lyon [this message]
2024-04-12 20:05 ` [PATCH 6/6] autoregen.py: Add binutils directories to AUTORECONF_DIRS Christophe Lyon
2024-04-14 22:33 ` [PATCH 0/6] autoregen.py: Improve support for GCC Mark Wielaard
2024-04-15 11:52 ` Christophe Lyon
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240412200559.1649050-6-christophe.lyon@linaro.org \
--to=christophe.lyon@linaro.org \
--cc=buildbot@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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).