[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] bootstrap: allow a project name to have hyphen(s)
From: |
Eric Blake |
Subject: |
Re: [PATCH] bootstrap: allow a project name to have hyphen(s) |
Date: |
Mon, 13 May 2013 06:18:49 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5 |
On 05/11/2013 01:42 PM, Sami Kerola wrote:
> * build-aux/bootstrap (error): a project using gnulib may have
> hyphen(s) in project name, which, if not converted to underscore(s),
> will break build.
> ---
> build-aux/bootstrap | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Can you show an actual error message from a broken build?
>
> diff --git a/build-aux/bootstrap b/build-aux/bootstrap
> index 0cbea66..2a27e3b 100755
> --- a/build-aux/bootstrap
> +++ b/build-aux/bootstrap
> @@ -1,6 +1,6 @@
> #! /bin/sh
> # Print a version string.
> -scriptversion=2013-05-08.20; # UTC
> +scriptversion=2013-05-11.20; # UTC
>
> # Bootstrap this package from checked-out sources.
>
> @@ -153,6 +153,7 @@ extract_package_name='
> }
> s/[],)].*//
> s/^GNU //
> + s/-/_/g
This changes _ to -,
> y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
> s/[^abcdefghijklmnopqrstuvwxyz0123456789_]/-/g
but this would re-add - on any other non-variable-name character, such
as space. Furthermore, this sed script matches precisely the algorithm
used by autoconf in computing AC_PACKAGE_TARNAME from AC_PACKAGE_NAME.
Thus, if we have a situation where $package is used during bootstrap but
cannot contain -, we ought to compute a new variable that does s/-/_/g
on $package, rather than changing the computation of $package itself to
be different from $AC_PACKAGE_TARNAME.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature