* build-aux/bootstrap.conf (XGETTEXT_OPTIONS):
Sync from coreutils, providing flags for error, etc.
(gettext_external, excluded_files): Remove, as
excluded_files has not worked for a long time.
(bootstrap_post_import_hook): New function, doing
what the old excluded_files tried to do.
---
 ChangeLog                | 10 ++++++++
 build-aux/bootstrap.conf | 54 ++++++++++++++++------------------------
 2 files changed, 31 insertions(+), 33 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f20d0be43f..7774a22b3a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2025-06-24  Paul Eggert  <egg...@cs.ucla.edu>
+
+       Sort-of sync model bootstrap.conf from coreutils
+       * build-aux/bootstrap.conf (XGETTEXT_OPTIONS):
+       Sync from coreutils, providing flags for error, etc.
+       (gettext_external, excluded_files): Remove, as
+       excluded_files has not worked for a long time.
+       (bootstrap_post_import_hook): New function, doing
+       what the old excluded_files tried to do.
+
 2025-06-23  Bruno Haible  <br...@clisp.org>
 
        Fix typo in comment.
diff --git a/build-aux/bootstrap.conf b/build-aux/bootstrap.conf
index 75850adebf..cdb25f22a5 100644
--- a/build-aux/bootstrap.conf
+++ b/build-aux/bootstrap.conf
@@ -22,42 +22,20 @@ gnulib_modules="
 
 # Additional xgettext options to use.  Use "\\\newline" to break lines.
 XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
+ --flag=asnprintf:3:c-format\\\
+ --flag=asprintf:2:c-format\\\
+ --flag=error:3:c-format\\\
+ --flag=error_at_line:5:c-format\\\
+ --flag=vasnprintf:3:c-format\\\
+ --flag=vasprintf:2:c-format\\\
+ --flag=verror:3:c-format\\\
+ --flag=verror_at_line:5:c-format\\\
+ --flag=xasprintf:1:c-format\\\
+ --flag=xfprintf:2:c-format\\\
+ --flag=xprintf:1:c-format\\\
  --from-code=UTF-8\\\
- --flag=asprintf:2:c-format --flag=vasprintf:2:c-format\\\
- --flag=asnprintf:3:c-format --flag=vasnprintf:3:c-format\\\
- --flag=wrapf:1:c-format\\\
 '
 
-# If "AM_GNU_GETTEXT(external" or "AM_GNU_GETTEXT([external]"
-# appears in configure.ac, exclude some unnecessary files.
-# Without grep's -E option (not portable enough, pre-configure),
-# the following test is ugly.  Also, this depends on the existence
-# of configure.ac, not the obsolescent-named configure.in.  But if
-# you're using this infrastructure, you should care about such things.
-
-gettext_external=0
-grep '^[        ]*AM_GNU_GETTEXT(external\>' configure.ac > /dev/null &&
-  gettext_external=1
-grep '^[        ]*AM_GNU_GETTEXT(\[external]' configure.ac > /dev/null &&
-  gettext_external=1
-
-if test $gettext_external = 1; then
-  # Gettext supplies these files, but we don't need them since
-  # we don't have an intl subdirectory.
-  excluded_files='
-      m4/glibc2.m4
-      m4/intdiv0.m4
-      m4/lcmessage.m4
-      m4/lock.m4
-      m4/printf-posix.m4
-      m4/size_max.m4
-      m4/uintmax_t.m4
-      m4/ulonglong.m4
-      m4/visibility.m4
-      m4/xsize.m4
-  '
-fi
-
 # Build prerequisites
 buildreq="\
 autoconf   2.59
@@ -65,3 +43,13 @@ automake   1.9.6
 git        1.5.5
 tar        -
 "
+
+bootstrap_post_import_hook ()
+{
+  # If "AM_GNU_GETTEXT(external" or "AM_GNU_GETTEXT([external]" appears
+  # in configure.ac, remove a file unnecessarily imported by autopoint.
+  if grep '^[   ]*AM_GNU_GETTEXT(\[*external]*[,)]' \
+          configure.ac >/dev/null 2>&1; then
+    rm -f m4/longlong.m4
+  fi
+}
-- 
2.49.0


Reply via email to