]> Savannah Git Hosting - gnulib.git/commitdiff
bootstrap: Make it work with module 'package-version'.
authorBruno Haible <bruno@clisp.org>
Thu, 23 Jan 2025 20:39:35 +0000 (21:39 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 23 Jan 2025 21:18:37 +0000 (22:18 +0100)
Reported by Basil L. Contovounesios <basil@contovou.net> in
<https://lists.gnu.org/archive/html/bug-gnulib/2025-01/msg00195.html>.

* top/bootstrap-funclib.sh (normalize_package_name): New variable.
(extract_package_name): Don't normalize the package name here.
(package): Also look at the first argument of a gl_INIT_PACKAGE
invocation.
* build-aux/bootstrap: Regenerated.

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

index e5419275d4b486071f0f2a9449263af78cceee25..8c6b369348c4345dd78b7e79613f96faf532bcaf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2025-01-23  Bruno Haible  <bruno@clisp.org>
+
+       bootstrap: Make it work with module 'package-version'.
+       Reported by Basil L. Contovounesios <basil@contovou.net> in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2025-01/msg00195.html>.
+       * top/bootstrap-funclib.sh (normalize_package_name): New variable.
+       (extract_package_name): Don't normalize the package name here.
+       (package): Also look at the first argument of a gl_INIT_PACKAGE
+       invocation.
+       * build-aux/bootstrap: Regenerated.
+
 2025-01-22  Bruno Haible  <bruno@clisp.org>
 
        doc: Document the workflows of the .tarball-version and .version files.
index f6a62143156a90c113636255b37923f72ce9175e..8e15db3bf3cbb6aeaf573206d8d2b0b68756a4f9 100755 (executable)
@@ -37,7 +37,7 @@ medir=`dirname "$me"`
 
 # A library of shell functions for autopull.sh, autogen.sh, and bootstrap.
 
-scriptlibversion=2025-01-09.08; # UTC
+scriptlibversion=2025-01-23.20; # UTC
 
 # Copyright (C) 2003-2025 Free Software Foundation, Inc.
 #
@@ -152,7 +152,8 @@ po_download_command_format=\
 "wget --mirror --level=1 -nd -nv -A.po -P '%s' \
  https://translationproject.org/latest/%s/"
 
-# Prefer a non-empty tarname (4th argument of AC_INIT if given), else
+# When extracting the package name from an AC_INIT invocation,
+# prefer a non-empty tarname (4th argument of AC_INIT if given), else
 # fall back to the package name (1st argument with munging).
 extract_package_name='
   /^AC_INIT(\[*/{
@@ -164,17 +165,25 @@ extract_package_name='
        q
      }
      s/[],)].*//
-     s/^GNU //
-     y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
-     s/[^abcdefghijklmnopqrstuvwxyz0123456789_]/-/g
      p
   }
 '
-package=$(${AUTOCONF:-autoconf} --trace AC_INIT:\$4 configure.ac 2>/dev/null)
+normalize_package_name='
+  s/^GNU //
+  y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
+  s/[^abcdefghijklmnopqrstuvwxyz0123456789_]/-/g
+'
+package=$(${AUTOCONF:-autoconf} --trace 'gl_INIT_PACKAGE:$1' configure.ac \
+          2>/dev/null)
 if test -z "$package"; then
-  package=$(sed -n "$extract_package_name" configure.ac) \
-      || die 'cannot find package name in configure.ac'
+  package=$(${AUTOCONF:-autoconf} --trace 'AC_INIT:$4' configure.ac \
+            2>/dev/null)
+  if test -z "$package"; then
+    package=$(sed -n "$extract_package_name" configure.ac) \
+        || die 'cannot find package name in configure.ac'
+  fi
 fi
+package=$(echo "$package" | sed "$normalize_package_name")
 gnulib_name=lib$package
 
 build_aux=build-aux
index a48bd63bb218576fef86d11f9787da898038dec4..1810a5c783505a21bfae5e1b90b55dec3b319e0f 100644 (file)
@@ -1,6 +1,6 @@
 # A library of shell functions for autopull.sh, autogen.sh, and bootstrap.
 
-scriptlibversion=2025-01-09.08; # UTC
+scriptlibversion=2025-01-23.20; # UTC
 
 # Copyright (C) 2003-2025 Free Software Foundation, Inc.
 #
@@ -115,7 +115,8 @@ po_download_command_format=\
 "wget --mirror --level=1 -nd -nv -A.po -P '%s' \
  https://translationproject.org/latest/%s/"
 
-# Prefer a non-empty tarname (4th argument of AC_INIT if given), else
+# When extracting the package name from an AC_INIT invocation,
+# prefer a non-empty tarname (4th argument of AC_INIT if given), else
 # fall back to the package name (1st argument with munging).
 extract_package_name='
   /^AC_INIT(\[*/{
@@ -127,17 +128,25 @@ extract_package_name='
        q
      }
      s/[],)].*//
-     s/^GNU //
-     y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
-     s/[^abcdefghijklmnopqrstuvwxyz0123456789_]/-/g
      p
   }
 '
-package=$(${AUTOCONF:-autoconf} --trace AC_INIT:\$4 configure.ac 2>/dev/null)
+normalize_package_name='
+  s/^GNU //
+  y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
+  s/[^abcdefghijklmnopqrstuvwxyz0123456789_]/-/g
+'
+package=$(${AUTOCONF:-autoconf} --trace 'gl_INIT_PACKAGE:$1' configure.ac \
+          2>/dev/null)
 if test -z "$package"; then
-  package=$(sed -n "$extract_package_name" configure.ac) \
-      || die 'cannot find package name in configure.ac'
+  package=$(${AUTOCONF:-autoconf} --trace 'AC_INIT:$4' configure.ac \
+            2>/dev/null)
+  if test -z "$package"; then
+    package=$(sed -n "$extract_package_name" configure.ac) \
+        || die 'cannot find package name in configure.ac'
+  fi
 fi
+package=$(echo "$package" | sed "$normalize_package_name")
 gnulib_name=lib$package
 
 build_aux=build-aux