From: Simon Josefsson via Gnulib discussion list <bug-gnulib@gnu.org>
To: bug-gnulib@gnu.org
Subject: bootstrap: cannot find package name in configure.ac
Date: Wed, 06 Jan 2021 22:55:47 +0100 [thread overview]
Message-ID: <87k0spzq58.fsf@latte.josefsson.org> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 759 bytes --]
Hi. I'm setting GNU SASL up for git-version-gen and bootstrap, and
noticed that bootstrap doesn't handle git-version-gen well. See:
jas@latte:~$ cat>configure.ac
AC_INIT([GNU SASL],
m4_esyscmd([build-aux/git-version-gen .tarball-version]),
[bug-gsasl@gnu.org],
[gsasl])
jas@latte:~$ ~/src/gnulib/build-aux/bootstrap
/home/jas/src/gnulib/build-aux/bootstrap: cannot find package name in configure.ac
jas@latte:~$
I'm using the patch below in gsasl, what do you think?
I didn't push the patch without discussion because bootstrap is such a
sensitive script used by many packages. Maybe someone prefers to fix
the sed expression instead, if we want to support old autoconf without
support for --trace.
/Simon
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-bootstrap-Fix-parsing-of-package-name.patch --]
[-- Type: text/x-diff, Size: 1723 bytes --]
From d4c4a6350e465c145de74bb1ecf8099e77f006a4 Mon Sep 17 00:00:00 2001
From: Simon Josefsson <simon@josefsson.org>
Date: Wed, 6 Jan 2021 22:51:21 +0100
Subject: [PATCH] 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.
---
ChangeLog | 6 ++++++
build-aux/bootstrap | 9 ++++++---
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0831c85e1..f3a43c826 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-01-06 Simon Josefsson <simon@josefsson.org>
+
+ 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.
+
2021-01-06 Bruno Haible <bruno@clisp.org>
logb: Fix test failure on glibc/powerpc.
diff --git a/build-aux/bootstrap b/build-aux/bootstrap
index 7523f65b4..bb2410a45 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-06.21; # UTC
# Bootstrap this package from checked-out sources.
@@ -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
--
2.20.1
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
next reply other threads:[~2021-01-06 21:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-06 21:55 Simon Josefsson via Gnulib discussion list [this message]
2021-01-06 23:54 ` bootstrap: cannot find package name in configure.ac Bernhard Voelker
2021-01-07 6:00 ` Paul Eggert
2021-01-08 10:53 ` Simon Josefsson via Gnulib discussion list
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k0spzq58.fsf@latte.josefsson.org \
--to=bug-gnulib@gnu.org \
--cc=simon@josefsson.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).