[2/2] gdb/copyright.py: run autoconf

Message ID 20260106203107.308021-2-simon.marchi@efficios.com
State New
Headers
Series [1/2] gdb/copyright.py: update unordered_dense path |

Commit Message

Simon Marchi Jan. 6, 2026, 8:30 p.m. UTC
  The last new year procedure missed running autoreconf in gnulib/ and
sim/ to update the Makefile.in files (following the updates of the
corresponding Makefile.am files).  I propose to make the script run
`autoreconf -v` to ensure we don't miss those anymore.  It takes a bit
of time, but that script isn't run very frequently (I'd say more or less
once a year).

Change-Id: Iab64415cedac716632d6a1230ebb87cc3190f4e4
---
 gdb/copyright.py | 12 ++++++++++++
 1 file changed, 12 insertions(+)
  

Comments

Tom Tromey Jan. 7, 2026, 6:10 p.m. UTC | #1
>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:

Simon> The last new year procedure missed running autoreconf in gnulib/ and
Simon> sim/ to update the Makefile.in files (following the updates of the
Simon> corresponding Makefile.am files).  I propose to make the script run
Simon> `autoreconf -v` to ensure we don't miss those anymore.  It takes a bit
Simon> of time, but that script isn't run very frequently (I'd say more or less
Simon> once a year).

Thanks.  2027 is definitely the year this process will work, I can feel
it.

Approved-By: Tom Tromey <tom@tromey.com>

Tom
  
Simon Marchi Jan. 7, 2026, 8:11 p.m. UTC | #2
On 2026-01-07 13:10, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:
> 
> Simon> The last new year procedure missed running autoreconf in gnulib/ and
> Simon> sim/ to update the Makefile.in files (following the updates of the
> Simon> corresponding Makefile.am files).  I propose to make the script run
> Simon> `autoreconf -v` to ensure we don't miss those anymore.  It takes a bit
> Simon> of time, but that script isn't run very frequently (I'd say more or less
> Simon> once a year).
> 
> Thanks.  2027 is definitely the year this process will work, I can feel
> it.

I lol'ed.

> Approved-By: Tom Tromey <tom@tromey.com>

Thanks, pushed.

Simon
  

Patch

diff --git a/gdb/copyright.py b/gdb/copyright.py
index eadf33870a01..94a1dfc91de6 100755
--- a/gdb/copyright.py
+++ b/gdb/copyright.py
@@ -157,6 +157,16 @@  def may_have_copyright_notice(filename: str):
     return False
 
 
+def run_autoreconf():
+    """Run autoreconf -v in all relevant directories."""
+    dirs = ["gdb", "gdbsupport", "gdbserver", "gnulib", "sim"]
+    for d in dirs:
+        print(f"\033[32mRunning autoreconf in {d}...\033[0m")
+        result = subprocess.run(["autoreconf", "-v"], cwd=d)
+        if result.returncode != 0:
+            sys.exit(f"Error: autoreconf failed in {d}")
+
+
 def get_parser() -> argparse.ArgumentParser:
     """Get a command line parser."""
     parser = argparse.ArgumentParser(
@@ -176,6 +186,8 @@  def main(argv: list[str]) -> int | None:
     update_list = get_update_list()
     update_files(update_list)
 
+    run_autoreconf()
+
     # Remind the user that some files need to be updated by HAND...
 
     if MULTIPLE_COPYRIGHT_HEADERS: