Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] [gnulib] Skip 3rd-party m4 files in update-gnulib.sh
@ 2026-11-16 15:39 Tom de Vries
  2026-11-16 16:29 ` Simon Marchi
  0 siblings, 1 reply; 2+ messages in thread
From: Tom de Vries @ 2026-11-16 15:39 UTC (permalink / raw)
  To: gdb-patches

When running update-gnulib.sh, I get changes from
/usr/share/aclocal/po.m4, a file installed from package gettext-tools.

Fix this by running aclocal with:
- ACLOCAL_PATH="" and
- --system-acdir="<empty dir>".

After this change, running update-gnulib.sh produces no changes.
---
 gnulib/update-gnulib.sh | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/gnulib/update-gnulib.sh b/gnulib/update-gnulib.sh
index f38b31f31fa..8203bf3a2ce 100755
--- a/gnulib/update-gnulib.sh
+++ b/gnulib/update-gnulib.sh
@@ -192,12 +192,22 @@ apply_patches ()
 apply_patches "patches/0001-use-windows-stat"
 apply_patches "patches/0002-no-solaris-_gl_attribute_dealloc"
 
-# Regenerate all necessary files...
-aclocal &&
+if ! empty_dir=$(mktemp -d); then
+    echo "Error: Failed to create empty dir.  Aborting."
+    exit 1
+fi
+
+# Regenerate all necessary files.  Run aclocal while ignoring 3rd-party .m4
+# files.
+ACLOCAL_PATH="" aclocal --system-acdir="$empty_dir" &&
 autoconf &&
 autoheader &&
 automake
-if [ $? -ne 0 ]; then
+st=$?
+
+rmdir "$empty_dir"
+
+if [ $st -ne 0 ]; then
    echo "Error: Failed to regenerate Makefiles and configure scripts."
    exit 1
 fi

base-commit: 5678a7bfceb3a6ea18bcde1ae68f7e96c43c998b
-- 
2.51.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-16 16:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-16 15:39 [PATCH] [gnulib] Skip 3rd-party m4 files in update-gnulib.sh Tom de Vries
2026-11-16 16:29 ` Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox