[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] bootstrap: allow a project name to have hyphen(s)
From: |
Sami Kerola |
Subject: |
Re: [PATCH] bootstrap: allow a project name to have hyphen(s) |
Date: |
Mon, 13 May 2013 19:44:38 +0100 |
On 13 May 2013 13:18, Eric Blake <address@hidden> wrote:
> 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?
Hi Eric,
Here you go.
$ cd dhcpd-pools
$ ./bootstrap && ./configure && make
[bootstrapping]
[configuring]
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:18: installing 'build-aux/compile'
configure.ac:12: installing 'build-aux/missing'
Makefile.am:4: warning: 'ACLOCAL_AMFLAGS' is deprecated; use
'AC_CONFIG_MACRO_DIRS' in configure.ac instead
Makefile.am: installing './INSTALL'
Makefile.am: installing 'build-aux/depcomp'
parallel-tests: installing 'build-aux/test-driver'
lib/Makefile.am:46: error: bad characters in variable name
'libdhcpd-pools_la_SOURCES'
lib/Makefile.am:47: error: bad characters in variable name
'libdhcpd-pools_la_LIBADD'
lib/Makefile.am:48: error: bad characters in variable name
'libdhcpd-pools_la_DEPENDENCIES'
lib/Makefile.am:49: error: bad characters in variable name
'EXTRA_libdhcpd-pools_la_SOURCES'
lib/Makefile.am:50: error: bad characters in variable name
'libdhcpd-pools_la_LDFLAGS'
lib/Makefile.am:51: error: bad characters in variable name
'libdhcpd-pools_la_LDFLAGS'
lib/Makefile.am:52: error: bad characters in variable name
'libdhcpd-pools_la_LDFLAGS'
lib/Makefile.am:53: error: bad characters in variable name
'libdhcpd-pools_la_LDFLAGS'
lib/Makefile.am:93: error: bad characters in variable name
'libdhcpd-pools_la_SOURCES'
lib/Makefile.am:99: error: bad characters in variable name
'libdhcpd-pools_la_SOURCES'
lib/Makefile.am:115: error: bad characters in variable name
'EXTRA_libdhcpd-pools_la_SOURCES'
lib/Makefile.am:121: error: bad characters in variable name
'libdhcpd-pools_la_SOURCES'
lib/Makefile.am:129: error: bad characters in variable name
'libdhcpd-pools_la_SOURCES'
[and so on...]
lib/Makefile.am:48: warning: variable 'libdhcpd-pools_la_DEPENDENCIES'
is defined but no program or
lib/Makefile.am:48: library has 'libdhcpd-pools_la' as canonical name
(possible typo)
autoreconf: automake failed with exit status: 1
./bootstrap: autoreconf failed
Feel free to clone my little project, and use it as guinea pig.
git clone git://git.code.sf.net/p/dhcpd-pools/code dhcpd-pools
And just in case libtool version is relevant
$ libtool --version
libtool (GNU libtool) 2.4.2.372-68920
>> 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.
I am afraid my lack of autotools hacking skills makes me to be
unsuitable to propose a change that would do that.
--
Sami Kerola
http://www.iki.fi/kerolasa/