bug-cppi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-cppi] [PATCH 1/3] build: use new gnulib module: non-recursive-g


From: Jim Meyering
Subject: Re: [bug-cppi] [PATCH 1/3] build: use new gnulib module: non-recursive-gnulib-prefix-hack
Date: Thu, 20 Sep 2012 10:02:49 +0200

Akim Demaille wrote:
> Le 19 sept. 2012 à 19:43, Jim Meyering a écrit :
>
>> [Cc'ing Akim, in case he wants to do this to bison.  If so,
>> with three projects using it, I'll move the module to gnulib. ]
>
> Yes, I do want that :)
>
>> @@ -142,8 +151,20 @@ sub prefix ($)
>>   # Unfortunately, as a result we sometimes have lib/lib.
>>   s{($prefix){2}}{$1}g;
>>
>> -  # $(srcdir) is actually $(top_srcdir)/lib.
>> -  s{\$\(srcdir\)}{\$(top_srcdir)/lib}g;
>> +  # lib_libcoreutils_a_SOURCES += \
>> +  #   imaxtostr.c \
>> +  #   inttostr.c \
>> +  #   offtostr.c \
>> +  #   uinttostr.c \
>> +  #   umaxtostr.c
>> +  # The above are not handled since they're on continued lines, so
>> +  # deal with them manually:
>> +  s{^  ((?:[ui]max|u?int|off)tostr\.c(:? \\)?)$}{  $prefix$1}gm;
>
> This is both very specific to coreutils, and maybe somewhat over
> specific (messing with the number of spaces would break everything).
> I don't care much about the first point, but maybe the second point
> should be addressed?

Yes, that is an ugly hack.
Alternatives:
  - adjust the gnulib module not to put the _SOURCES file names on
  separate lines.  IMHO, that restriction is not acceptable.
  - preprocess the input, joining /SOURCES\s*\+=\s*\\$/-continued
  lines, so that the hack won't be required.

>> diff --git a/gl/m4/non-recursive-gnulib-prefix-hack.m4
>> b/gl/m4/non-recursive-gnulib-prefix-hack.m4
>> new file mode 100644
>> index 0000000..aeb0cc4
>> --- /dev/null
>> +++ b/gl/m4/non-recursive-gnulib-prefix-hack.m4
>> @@ -0,0 +1,35 @@
>> +dnl Copyright (C) 2012 Free Software Foundation, Inc.
>> +dnl This file is free software; the Free Software Foundation
>> +dnl gives unlimited permission to copy and/or distribute it,
>> +dnl with or without modifications, as long as this notice is preserved.
>
> I don't understand well the preference of dnl over #, but that doesn't
> matter.

Using "dnl" is slightly better there, because dnl-commented lines
don't end up in configure.

>> diff --git a/gl/modules/non-recursive-gnulib-prefix-hack
>> b/gl/modules/non-recursive-gnulib-prefix-hack
>> new file mode 100644
>> index 0000000..26cd914
>> --- /dev/null
>> +++ b/gl/modules/non-recursive-gnulib-prefix-hack
>> @@ -0,0 +1,25 @@
>> +Description:
>> +Compute a good buffer size for dealing with two files.
>
> This needs to be updated.

Good catch ;-)

I'll add it to gnulib today, with that fix,
but may not have time to fix the ugly hack above.

Thanks!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]