diff options
author | Simon Josefsson <simon@josefsson.org> | 2021-01-08 11:49:59 +0100 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2021-01-08 11:49:59 +0100 |
commit | bdae9a5d4b2cedfaef23f8c55982ba5432dd69e3 (patch) | |
tree | db92023dcaa17cbcbc8598cb9c405d0d8fb69f0a /build-aux/bootstrap | |
parent | 6047713aff39dc8a9f94952ecf3b136223605eec (diff) | |
download | gnulib-bdae9a5d4b2cedfaef23f8c55982ba5432dd69e3.tar.gz |
bootstrap: Fix parsing of package name.
* build-aux/bootstrap (package): Attempt to use autoconf --trace
to parse AC_INIT before falling back to sed expression.
Diffstat (limited to 'build-aux/bootstrap')
-rwxr-xr-x | build-aux/bootstrap | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/build-aux/bootstrap b/build-aux/bootstrap index 7523f65b49..8a61c1a586 100755 --- a/build-aux/bootstrap +++ b/build-aux/bootstrap @@ -1,6 +1,6 @@ #! /bin/sh # Print a version string. -scriptversion=2020-11-18.17; # UTC +scriptversion=2021-01-08.10; # UTC # Bootstrap this package from checked-out sources. @@ -184,7 +184,7 @@ po_download_command_format=\ https://translationproject.org/latest/%s/" # Prefer a non-empty tarname (4th argument of AC_INIT if given), else -# fall back to the package name (1st argument with munging) +# fall back to the package name (1st argument with munging). extract_package_name=' /^AC_INIT(\[*/{ s/// @@ -201,8 +201,11 @@ extract_package_name=' p } ' -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 gnulib_name=lib$package build_aux=build-aux |