]> Savannah Git Hosting - gnulib.git/commitdiff
bootstrap: Avoid failure when gnulib-tool removed gettext.m4.
authorBruno Haible <bruno@clisp.org>
Sun, 21 Jul 2024 12:02:58 +0000 (14:02 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 12 Aug 2024 15:28:28 +0000 (17:28 +0200)
* top/bootstrap-funclib.sh (autogen): When gnulib-tool has removed
gettext.m4 but the package needs gettext.m4, repeat the autopoint and
gnulib-tool invocations.
* build-aux/bootstrap: Regenerated.

ChangeLog
build-aux/bootstrap
top/bootstrap-funclib.sh

index 35c9b72f0ca10a13a36364269ceaac5c5634a85c..8d0924ebe6e827000443bc0d9ae75aca11be2f2f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-07-21  Bruno Haible  <bruno@clisp.org>
+
+       bootstrap: Avoid failure when gnulib-tool removed gettext.m4.
+       * top/bootstrap-funclib.sh (autogen): When gnulib-tool has removed
+       gettext.m4 but the package needs gettext.m4, repeat the autopoint and
+       gnulib-tool invocations.
+       * build-aux/bootstrap: Regenerated.
+
 2024-07-20  Bruno Haible  <bruno@clisp.org>
 
        getpayload*: Do use glibc's implementation when it works.
index ac9433e3fd8054600210a20105c21415f872bc10..a1842a329c257bf7990b3d391033803f48b42c69 100755 (executable)
@@ -1255,6 +1255,20 @@ autogen()
     $gnulib_tool $gnulib_tool_options --import $gnulib_modules \
       || die "gnulib-tool failed"
 
+    if test $with_gettext = yes && test ! -f $m4_base/gettext.m4; then
+      # The gnulib-tool invocation has removed $m4_base/gettext.m4, that the
+      # AUTOPOINT invocation had installed. This can occur when the gnulib
+      # module 'gettext' was previously present but is now not present any more.
+      # Repeat the AUTOPOINT invocation and the gnulib-tool invocation.
+
+      echo "$0: $AUTOPOINT --force"
+      $AUTOPOINT --force || return
+
+      echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
+      $gnulib_tool $gnulib_tool_options --import $gnulib_modules \
+        || die "gnulib-tool failed"
+    fi
+
     for file in $gnulib_files; do
       symlink_to_dir "$GNULIB_SRCDIR" $file \
         || die "failed to symlink $file"
index 5005d9b4a92096c217ed58363b029e578829131a..80592d3effce5bbf2704a34a34714c2d5f0430e6 100644 (file)
@@ -1218,6 +1218,20 @@ autogen()
     $gnulib_tool $gnulib_tool_options --import $gnulib_modules \
       || die "gnulib-tool failed"
 
+    if test $with_gettext = yes && test ! -f $m4_base/gettext.m4; then
+      # The gnulib-tool invocation has removed $m4_base/gettext.m4, that the
+      # AUTOPOINT invocation had installed. This can occur when the gnulib
+      # module 'gettext' was previously present but is now not present any more.
+      # Repeat the AUTOPOINT invocation and the gnulib-tool invocation.
+
+      echo "$0: $AUTOPOINT --force"
+      $AUTOPOINT --force || return
+
+      echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
+      $gnulib_tool $gnulib_tool_options --import $gnulib_modules \
+        || die "gnulib-tool failed"
+    fi
+
     for file in $gnulib_files; do
       symlink_to_dir "$GNULIB_SRCDIR" $file \
         || die "failed to symlink $file"