From MAILER-DAEMON Sat Sep 01 12:46:37 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7qqD-0006sG-QK
	for mharc-bug-cppi@gnu.org; Sat, 01 Sep 2012 12:46:37 -0400
Received: from eggs.gnu.org ([208.118.235.92]:50772)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1T7q9U-0000lU-Th
	for bug-cppi@gnu.org; Sat, 01 Sep 2012 12:02:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1T7q9T-0003UO-5g
	for bug-cppi@gnu.org; Sat, 01 Sep 2012 12:02:28 -0400
Received: from qmta01.emeryville.ca.mail.comcast.net ([76.96.30.16]:59900)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1T7q9S-0003U6-Vm
	for bug-cppi@gnu.org; Sat, 01 Sep 2012 12:02:27 -0400
Received: from omta22.emeryville.ca.mail.comcast.net ([76.96.30.89])
	by qmta01.emeryville.ca.mail.comcast.net with comcast
	id tqe81j0071vN32cA1s2SmG; Sat, 01 Sep 2012 16:02:26 +0000
Received: from localhost.localdomain ([12.69.234.130])
	by omta22.emeryville.ca.mail.comcast.net with comcast
	id ts201j00W2pUUfg8is2AKl; Sat, 01 Sep 2012 16:02:21 +0000
From: Eric Blake <eblake@redhat.com>
To: bug-cppi@gnu.org
Date: Sat,  1 Sep 2012 09:01:59 -0700
Message-Id: <1346515319-11515-1-git-send-email-eblake@redhat.com>
X-Mailer: git-send-email 1.7.11.4
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 76.96.30.16
X-Mailman-Approved-At: Sat, 01 Sep 2012 12:46:36 -0400
Subject: [bug-cppi] [PATCH] build: work with new glibc when not optimizing
X-BeenThere: bug-cppi@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <bug-cppi.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-cppi>,
	<mailto:bug-cppi-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-cppi>
List-Post: <mailto:bug-cppi@gnu.org>
List-Help: <mailto:bug-cppi-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-cppi>,
	<mailto:bug-cppi-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 01 Sep 2012 16:02:29 -0000

Starting with glibc 2.15, the system headers refuse to compile
unconditional use of FORTIFY_SOURCE if optimization is disabled
but -Werror is in effect.

* configure.ac (FORTIFY_SOURCE): Make conditional.
---

Pushing; this is similar to the recent coreutils patch.

 configure.ac | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index e3d4b0c..f7c434d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -71,8 +71,13 @@ if test "$gl_gcc_warnings" = yes; then
   AC_SUBST([WARN_CFLAGS])

   AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.])
-  AC_DEFINE([_FORTIFY_SOURCE], [2],
-    [enable compile-time and run-time bounds-checking, and some warnings])
+  AH_VERBATIM([FORTIFY_SOURCE],
+  [/* Enable compile-time and run-time bounds-checking, and some warnings,
+      without upsetting glibc 2.15+. */
+   #if defined __OPTIMIZE__ && __OPTIMIZE__
+   # define _FORTIFY_SOURCE 2
+   #endif
+  ])
   AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks])
 fi

-- 
1.7.11.4



From MAILER-DAEMON Fri Sep 07 16:39:04 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TA5KS-0006TO-0G
	for mharc-bug-cppi@gnu.org; Fri, 07 Sep 2012 16:39:04 -0400
Received: from eggs.gnu.org ([208.118.235.92]:46289)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1TA5KP-0006T8-Tp
	for bug-cppi@gnu.org; Fri, 07 Sep 2012 16:39:02 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1TA5KO-0008Qb-0Q
	for bug-cppi@gnu.org; Fri, 07 Sep 2012 16:39:01 -0400
Received: from mx1.redhat.com ([209.132.183.28]:34391)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1TA5KN-0008OC-N4
	for bug-cppi@gnu.org; Fri, 07 Sep 2012 16:38:59 -0400
Received: from int-mx11.intmail.prod.int.phx2.redhat.com
	(int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q87Kcvn7020891
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Fri, 7 Sep 2012 16:38:57 -0400
Received: from [10.3.113.60] (ovpn-113-60.phx2.redhat.com [10.3.113.60])
	by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q87Kctmv016499; Fri, 7 Sep 2012 16:38:55 -0400
Message-ID: <504A5B5D.6090901@redhat.com>
Date: Fri, 07 Sep 2012 14:38:53 -0600
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:15.0) Gecko/20120828 Thunderbird/15.0
MIME-Version: 1.0
To: Akim Demaille <akim.demaille@gmail.com>
References: <98EC8B0B-7696-487E-BA58-098B68BA8939@gmail.com>
In-Reply-To: <98EC8B0B-7696-487E-BA58-098B68BA8939@gmail.com>
X-Enigmail-Version: 1.4.4
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enig7E3E5F83780FE01E1BA6E12F"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
Cc: bug-cppi@gnu.org, Jim Meyering <jim@meyering.net>
Subject: Re: [bug-cppi] VPATH issues
X-BeenThere: bug-cppi@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <bug-cppi.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-cppi>,
	<mailto:bug-cppi-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-cppi>
List-Post: <mailto:bug-cppi@gnu.org>
List-Help: <mailto:bug-cppi-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-cppi>,
	<mailto:bug-cppi-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 07 Sep 2012 20:39:02 -0000

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig7E3E5F83780FE01E1BA6E12F
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 03/29/2012 06:33 AM, Akim Demaille wrote:
> Hi!
>=20
> I've needed the following changes to be able to compile
> cppi properly in VPATH build.  The second patch could
> also have moved the -*- comment in the license header,
> I don't know what your favorite choice is.

Just noticed this sitting unread in my inbox; is this still a problem
with Jim's recent refactoring of cppi to use non-recursive make?

--=20
Eric Blake   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


--------------enig7E3E5F83780FE01E1BA6E12F
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iQEcBAEBCAAGBQJQSlteAAoJEKeha0olJ0NqC6MH/3wyuHpkBJ75WUs1K2TB0tuQ
SMaJDuHgVN/bkdHB9M3AShTlzVE10ZcvuE53M3P7vyW6Oj/xfGujJY+360lSHqNW
uC+ljFdWX5Z5J5eTcgufVojKlk+1aDiiv+A/MYM/R3qtNF4DnOqS/3sf7e2yvcST
4xeY8D4Ws/LGWUuH5s0mzwEbfOAqRbsZTvIHr4+5nvLESoHXcQvZrcnv4/nfpVa1
Zd2smKfWxYH7qS1o0EFgWfyNiCDcFxzPH0CvtePP1M0jhXu1vNK9G9OHjNfWDJkQ
2Rmvd6vR93ySaNKo2ROxYtEYoa6aCs0PshcQIlIkgDfPlXUXe82J+RUAb5G3jBw=
=/StB
-----END PGP SIGNATURE-----

--------------enig7E3E5F83780FE01E1BA6E12F--


From MAILER-DAEMON Wed Sep 19 09:46:58 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TEKcE-0007KA-Rj
	for mharc-bug-cppi@gnu.org; Wed, 19 Sep 2012 09:46:58 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37785)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim.demaille@gmail.com>) id 1TEKc7-0007It-TV
	for bug-cppi@gnu.org; Wed, 19 Sep 2012 09:46:57 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <akim.demaille@gmail.com>) id 1TEKc3-0003at-F5
	for bug-cppi@gnu.org; Wed, 19 Sep 2012 09:46:51 -0400
Received: from mail-wi0-f177.google.com ([209.85.212.177]:37823)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim.demaille@gmail.com>) id 1TEKc3-0003aQ-7h
	for bug-cppi@gnu.org; Wed, 19 Sep 2012 09:46:47 -0400
Received: by wibhn17 with SMTP id hn17so925990wib.12
	for <bug-cppi@gnu.org>; Wed, 19 Sep 2012 06:46:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=subject:mime-version:content-type:from:in-reply-to:date:cc
	:message-id:references:to:x-mailer;
	bh=lvtRH1L19OaHVYFx3iCA/Go74wi5I+fGkCo8ZiXh/f4=;
	b=Jx4eWpBhUg7MAIq1MH4pDPEsL34a2imaRrkWt3myg7wMUni44f0S+LG7wWIoVCvA/X
	JWpN1mtzyO+r0XD5nab3b4bKzG2WoITNxNdqVJmm6DeV+dJ8z5oEn0/3zl6xoMiwA7eU
	dg2Tqzl8B/CbK/RITgDu5A8oNynYamwE3lpRA7oG4NaM/TDrZkuURCBEhjaWaOziLZrH
	ChkoGPq45ZsexnQngRSF/8/xl29pZH61GzB2J72Zzo/Xpf+leiHJk7TwUUWuxEWbRi2z
	VLWTEh4RCpGFdWLkOBFSUZf3A2LYyGGht6cKf8vOQ6srcXg4/i9WqB82GuSESm+Gd9yo
	Soiw==
Received: by 10.180.91.1 with SMTP id ca1mr7053569wib.8.1348062406241;
	Wed, 19 Sep 2012 06:46:46 -0700 (PDT)
Received: from [192.168.105.42] (sao-paulo.lrde.epita.fr. [163.5.55.1])
	by mx.google.com with ESMTPS id w7sm27761794wiz.0.2012.09.19.06.46.44
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 19 Sep 2012 06:46:45 -0700 (PDT)
Mime-Version: 1.0 (Apple Message framework v1278)
Content-Type: multipart/mixed;
	boundary="Apple-Mail=_F284E0D5-744E-4824-8695-73E01AE71CB4"
From: Akim Demaille <akim.demaille@gmail.com>
In-Reply-To: <504A5B5D.6090901@redhat.com>
Date: Wed, 19 Sep 2012 15:46:43 +0200
Message-Id: <130ADE43-50FE-4721-919D-F13FCF81B456@gmail.com>
References: <98EC8B0B-7696-487E-BA58-098B68BA8939@gmail.com>
	<504A5B5D.6090901@redhat.com>
To: Eric Blake <eblake@redhat.com>
X-Mailer: Apple Mail (2.1278)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.177
Cc: bug-cppi@gnu.org, Jim Meyering <jim@meyering.net>
Subject: Re: [bug-cppi] VPATH issues
X-BeenThere: bug-cppi@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <bug-cppi.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-cppi>,
	<mailto:bug-cppi-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-cppi>
List-Post: <mailto:bug-cppi@gnu.org>
List-Help: <mailto:bug-cppi-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-cppi>,
	<mailto:bug-cppi-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 19 Sep 2012 13:46:57 -0000


--Apple-Mail=_F284E0D5-744E-4824-8695-73E01AE71CB4
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=iso-8859-1


Le 7 sept. 2012 =E0 22:38, Eric Blake a =E9crit :

> On 03/29/2012 06:33 AM, Akim Demaille wrote:
>> Hi!
>>=20
>> I've needed the following changes to be able to compile
>> cppi properly in VPATH build.  The second patch could
>> also have moved the -*- comment in the license header,
>> I don't know what your favorite choice is.
>=20
> Just noticed this sitting unread in my inbox; is this still a problem
> with Jim's recent refactoring of cppi to use non-recursive make?

Hi Eric,

I don't remember the details, but I believe the build was
already de-recursived.  According to the current state of
master, there are no build issues left, but this one is
still needed for me:

http://lists.gnu.org/archive/html/bug-cppi/2012-03/msg00001.html


--Apple-Mail=_F284E0D5-744E-4824-8695-73E01AE71CB4
Content-Disposition: attachment;
	filename=0001-build-fix-gperf-fix.patch
Content-Type: application/octet-stream;
	name="0001-build-fix-gperf-fix.patch"
Content-Transfer-Encoding: quoted-printable

=46rom=20606ff24f75a6d408dc6a88889a2f0ee9f3eefff3=20Mon=20Sep=2017=20=
00:00:00=202001=0AFrom:=20Akim=20Demaille=20<akim@lrde.epita.fr>=0ADate:=20=
Wed,=2019=20Sep=202012=2015:43:43=20+0200=0ASubject:=20[PATCH]=20build:=20=
fix=20gperf=20fix.=0A=0A*=20src/local.mk=20(src/cpp-cond.c):=20Use=20a=20=
more=20accurate=20pattern=0Ato=20make=20the=20lookup=20function=20=
static.=0A---=0A=20src/local.mk=20|=203=20++-=0A=201=20file=20changed,=20=
2=20insertions(+),=201=20deletion(-)=0A=0Adiff=20--git=20a/src/local.mk=20=
b/src/local.mk=0Aindex=2001231d1..c43c32e=20100644=0A---=20=
a/src/local.mk=0A+++=20b/src/local.mk=0A@@=20-28,7=20+28,8=20@@=20=
GPERF_OPTIONS=20=3D=20\=0A=20src/cpp-cond.c:=20src/cpp.gp=0A=20=09=
$(AM_V_GEN)rm=20-f=20$@=20$@-t=0A=20=09$(AM_V_at)$(GPERF)=20=
$(GPERF_OPTIONS)=20$<=20\=0A-=09=20=20|=20perl=20-ne=20=
'/__GNUC_STDC_INLINE__/=20and=20print=20"static\n";=20print'=20\=0A+=09=20=
=20|=20perl=20-0777=20-p=20\=0A+=09=20=20=20=20=20-e=20's/const=20struct=20=
KW=20\*\ncpp_cond_lookup/static\n$$&/'=20\=0A=20=09=20=20>=20$@-t=0A=20=09=
$(AM_V_at)chmod=20a-w=20$@-t=0A=20=09$(AM_V_at)mv=20$@-t=20$@=0A--=20=0A=
1.7.11.5=0A=0A=

--Apple-Mail=_F284E0D5-744E-4824-8695-73E01AE71CB4--


From MAILER-DAEMON Wed Sep 19 13:36:11 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TEOC3-0000eg-BH
	for mharc-bug-cppi@gnu.org; Wed, 19 Sep 2012 13:36:11 -0400
Received: from eggs.gnu.org ([208.118.235.92]:36757)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1TEOBs-0000NK-E9
	for bug-cppi@gnu.org; Wed, 19 Sep 2012 13:36:09 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1TEOBr-0003Kc-5b
	for bug-cppi@gnu.org; Wed, 19 Sep 2012 13:36:00 -0400
Received: from mx.meyering.net ([88.168.87.75]:47662)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1TEOBq-0003Jh-TG
	for bug-cppi@gnu.org; Wed, 19 Sep 2012 13:35:59 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id EB2BF60073;
	Wed, 19 Sep 2012 19:35:56 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Akim Demaille <akim.demaille@gmail.com>
In-Reply-To: <130ADE43-50FE-4721-919D-F13FCF81B456@gmail.com> (Akim Demaille's
	message of "Wed, 19 Sep 2012 15:46:43 +0200")
References: <98EC8B0B-7696-487E-BA58-098B68BA8939@gmail.com>
	<504A5B5D.6090901@redhat.com>
	<130ADE43-50FE-4721-919D-F13FCF81B456@gmail.com>
Date: Wed, 19 Sep 2012 19:35:56 +0200
Message-ID: <87lig5hq4j.fsf@rho.meyering.net>
Lines: 35
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Cc: bug-cppi@gnu.org
Subject: Re: [bug-cppi] VPATH issues
X-BeenThere: bug-cppi@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <bug-cppi.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-cppi>,
	<mailto:bug-cppi-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-cppi>
List-Post: <mailto:bug-cppi@gnu.org>
List-Help: <mailto:bug-cppi-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-cppi>,
	<mailto:bug-cppi-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 19 Sep 2012 17:36:10 -0000

Akim Demaille wrote:
> Le 7 sept. 2012 =E0 22:38, Eric Blake a =E9crit :
>
>> On 03/29/2012 06:33 AM, Akim Demaille wrote:
>>> Hi!
>>>
>>> I've needed the following changes to be able to compile
>>> cppi properly in VPATH build.  The second patch could
>>> also have moved the -*- comment in the license header,
>>> I don't know what your favorite choice is.
>>
>> Just noticed this sitting unread in my inbox; is this still a problem
>> with Jim's recent refactoring of cppi to use non-recursive make?
>
> I don't remember the details, but I believe the build was
> already de-recursived.  According to the current state of
> master, there are no build issues left, but this one is
> still needed for me:
>
> http://lists.gnu.org/archive/html/bug-cppi/2012-03/msg00001.html

Hi Akim,

Thanks for the patch and the reminder.
It looks like it fell off my radar.

That change is not needed for me.
Could it be required for you because your version of gperf
is older than mine?  I'm using gperf 3.1.

In any case, I've gone ahead and applied your change, since it
is more robust to perform a multi-line search and replace, as
your new rule does.

I've added a reference to this discussion to the log.


From MAILER-DAEMON Wed Sep 19 13:43:56 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TEOJY-0002go-QF
	for mharc-bug-cppi@gnu.org; Wed, 19 Sep 2012 13:43:56 -0400
Received: from eggs.gnu.org ([208.118.235.92]:57544)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1TEOJV-0002gZ-Dz
	for bug-cppi@gnu.org; Wed, 19 Sep 2012 13:43:55 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1TEOJQ-0007km-3N
	for bug-cppi@gnu.org; Wed, 19 Sep 2012 13:43:53 -0400
Received: from mx.meyering.net ([88.168.87.75]:47683)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1TEOJP-0007kb-I1
	for bug-cppi@gnu.org; Wed, 19 Sep 2012 13:43:48 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 823D5601C9;
	Wed, 19 Sep 2012 19:43:46 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: bug-cppi@gnu.org
Date: Wed, 19 Sep 2012 19:43:46 +0200
Message-ID: <87fw6dhprh.fsf@rho.meyering.net>
Lines: 295
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Cc: Akim Demaille <akim.demaille@gmail.com>
Subject: [bug-cppi] [PATCH 1/3] build: use new gnulib module:
	non-recursive-gnulib-prefix-hack
X-BeenThere: bug-cppi@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <bug-cppi.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-cppi>,
	<mailto:bug-cppi-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-cppi>
List-Post: <mailto:bug-cppi@gnu.org>
List-Help: <mailto:bug-cppi-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-cppi>,
	<mailto:bug-cppi-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 19 Sep 2012 17:43:55 -0000

[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. ]

I noticed "make distcheck" was failing due to cppi's slightly
aging prefix-gnulib-mk script not interacting well with
gnulib-tool-generated gnulib.mk files.  The fix was to update
to use the more modular "module" that gnulib is now using.
It encapsulates that script, and the autoconf snippet that
goes with it.  To use it, you need to do these things once your
project uses non-recursive make:

  - copy the three files:

      gl/build-aux/prefix-gnulib-mk
      gl/m4/non-recursive-gnulib-prefix-hack.m4
      gl/modules/non-recursive-gnulib-prefix-hack

  - add the new module name to your list of modules in bootstrap.conf

  - make sure the bootstrap_post_import_hook() function in
    bootstrap.conf does this:

  # Massage lib/gnulib.mk before using it later in the bootstrapping process.
  build-aux/prefix-gnulib-mk --lib-name=$gnulib_name lib/$gnulib_mk


I've just pushed these:

>From e66c35939c9929c0a58045010ad6661e747ecf4d Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Wed, 19 Sep 2012 19:15:17 +0200
Subject: [PATCH 1/3] build: use new gnulib module:
 non-recursive-gnulib-prefix-hack

Well, it's not officially a gnulib module yet.  For now, it's used
only here and in coreutils.
* configure.ac: Remove the code I'd copied from bison's configure.ac,
since now it's done via code in this module's .m4 file.
* bootstrap.conf (gnulib_modules): Add that module name to the list.
(bootstrap_post_import_hook): Invoke from its new location: build-aux/.
* gl/m4/non-recursive-gnulib-prefix-hack.m4: Likewise.
* gl/modules/non-recursive-gnulib-prefix-hack: Likewise.
* gl/build-aux/prefix-gnulib-mk: Copied from coreutils.
This is an improved version of ...
* etc/prefix-gnulib-mk: ...this.  Remove file.
---
 bootstrap.conf                              |  3 ++-
 configure.ac                                | 15 -------------
 {etc => gl/build-aux}/prefix-gnulib-mk      | 31 ++++++++++++++++++++-----
 gl/m4/non-recursive-gnulib-prefix-hack.m4   | 35 +++++++++++++++++++++++++++++
 gl/modules/non-recursive-gnulib-prefix-hack | 25 +++++++++++++++++++++
 5 files changed, 88 insertions(+), 21 deletions(-)
 rename {etc => gl/build-aux}/prefix-gnulib-mk (83%)
 create mode 100644 gl/m4/non-recursive-gnulib-prefix-hack.m4
 create mode 100644 gl/modules/non-recursive-gnulib-prefix-hack

diff --git a/bootstrap.conf b/bootstrap.conf
index 8b7e002..2f2ef13 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -42,6 +42,7 @@ gnulib_modules="
   malloc-gnu
   maintainer-makefile
   manywarnings
+  non-recursive-gnulib-prefix-hack
   obstack
   progname
   quote
@@ -130,7 +131,7 @@ tar        -
 bootstrap_post_import_hook()
 {
   # Massage lib/gnulib.mk before using it later in the bootstrapping process.
-  etc/prefix-gnulib-mk --lib-name=$gnulib_name lib/$gnulib_mk
+  build-aux/prefix-gnulib-mk --lib-name=$gnulib_name lib/$gnulib_mk
 }

 bootstrap_epilogue()
diff --git a/configure.ac b/configure.ac
index f7c434d..7897f5b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -88,21 +88,6 @@ AC_HEADER_ASSERT
 AM_GNU_GETTEXT([external])
 AM_GNU_GETTEXT_VERSION([0.18.1])

-# This is copied from bison.  FIXME: keep it in sync!
-# We use gnulib, but from lib/local.mk instead of lib/Makefile.am.
-# So prefix paths with lib/.  See also etc/prefix-gnulib-mk.
-gl_LIBOBJS=`echo "$gl_LIBOBJS" | sed -e 's, , lib/,g'`
-# Listing the names of the variables to prefix is error-prone.
-# Rather, adjust all the AC_SUBST variables whose name ends in '_H',
-# and whose content ends in '.h'.
-for ac_var in $ac_subst_vars
-do
-  eval "ac_val=\$$ac_var"
-  case $ac_var=$ac_val in
-    (*_H=*.h) eval "$ac_var=lib/\$$ac_var";;
-  esac
-done
-
 # Now that configure no longer creates src/ or man/, create them here.
 # Doing it this way is more maintainable that adding to each individual
 # Makefile rule that creates a file in one of those sub-directories.
diff --git a/etc/prefix-gnulib-mk b/gl/build-aux/prefix-gnulib-mk
similarity index 83%
rename from etc/prefix-gnulib-mk
rename to gl/build-aux/prefix-gnulib-mk
index 03ce18f..f0806d7 100755
--- a/etc/prefix-gnulib-mk
+++ b/gl/build-aux/prefix-gnulib-mk
@@ -66,7 +66,8 @@ sub prefix_word ($)
 {
   local ($_) = @_;
   $_ = $prefix . $_
-    unless /^-/ || m{^\$\(\w+\)} || $_ eq "Makefile" || $_ eq '\\';
+    unless (/^-/ || m{^\$\(\w+\)} || $_ eq "Makefile" || $_ eq '\\'
+            || $_ eq '@ALLOCA@');
   return $_;
 }

@@ -90,7 +91,14 @@ sub prefix_assignment ($$)

   # Some variables are initialized by gnulib.mk, and we don't want
   # that.  Change '=' to '+='.
-  if ($lhs_and_assign_op =~ /^(SUBDIRS|EXTRA_DIST|BUILT_SOURCES|SUFFIXES|MOSTLYCLEANFILES|CLEANFILES|DISTCLEANFILES|MAINTAINERCLEANFILES|AM_CFLAGS|AM_CPPFLAGS|AM_GNU_GETTEXT) =/)
+  if ($lhs_and_assign_op =~ /^GPERF =$/)
+    {
+      # Do not change the RHS, which specifies the GPERF program.
+    }
+  elsif ($lhs_and_assign_op =~
+      /^(SUBDIRS|EXTRA_DIST|BUILT_SOURCES|SUFFIXES|MOSTLYCLEANFILES
+         |CLEANFILES|DISTCLEANFILES|MAINTAINERCLEANFILES|AM_CFLAGS
+         |AM_CPPFLAGS|AM_GNU_GETTEXT)\ =/x)
     {
       $lhs_and_assign_op =~ s/=/+=/;
     }
@@ -99,9 +107,10 @@ sub prefix_assignment ($$)
     {
       $lhs_and_assign_op =~ s/^/# /;
     }
-  # Don't touch suffixes.
   elsif ($lhs_and_assign_op =~ /^SUFFIXES /)
     {
+      # Elide any SUFFIXES assignment or concatenation.
+      $lhs_and_assign_op =~ s/^/# /;
     }
   # The words are (probably) paths to files in lib/: prefix them.
   else
@@ -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;
+
+  # $(srcdir)/ is actually $(top_srcdir)/$prefix/.
+  # The trailing slash is required to avoid matching this rule:
+  #   test '$(srcdir)' = . || rm -f $(top_builddir)/GNUmakefile
+  s{\$\(srcdir\)/}{\$(top_srcdir)/$prefix}g;

   # Sometimes, t-$@ is used instead of $@-t, which, of course, does
   # not work when we have a $@ with a directory in it.
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.
+
+dnl gl_NON_RECURSIVE_GNULIB_PREFIX_HACK LIB_DIR
+dnl Adjust configure-set $gl_LIBOBJS and each AC_SUBST'd *_H variable
+dnl with a value ending in ".h" to reflect that these files are located
+dnl in the directory specified by LIB_DIR.
+AC_DEFUN([gl_NON_RECURSIVE_GNULIB_PREFIX_HACK],
+[
+  # Tell AC_LIBSOURCES where to find source files like alloca.c.
+  AC_CONFIG_LIBOBJ_DIR([lib])
+
+  # This hack originated in bison.  It is required when using non-recursive
+  # automake rules to build from gnulib-provided lib/ sources.  Hence, LIB_DIR
+  # is usually simply "lib".  Those rules use the list of names like "fchdir.o"
+  # and "strstr.o" in gl_LIBOBJS.  With non-recursive make, we must prefix each
+  # such file name with the "lib/" prefix.  See also build-aux/prefix-gnulib-mk.
+  gl_LIBOBJS=`echo "$gl_LIBOBJS" | sed -e 's, , $1/,g'`
+
+  # Listing the names of the variables to prefix is error-prone.
+  # Rather, adjust each AC_SUBST'd variable whose name ends in '_H'
+  # and whose value ends in '.h'.
+  for ac_var in $ac_subst_vars
+  do
+    eval "ac_val=\$$ac_var"
+    case $ac_var:$ac_val in
+      (*_H:*.h) eval "$ac_var=$1/\$$ac_var";;
+    esac
+  done
+
+  # If $ALLOCA is not empty, prefix its value with "lib/".
+  test -n "$ALLOCA" && ALLOCA="lib/$ALLOCA"
+])
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.
+
+Files:
+build-aux/prefix-gnulib-mk
+m4/non-recursive-gnulib-prefix-hack.m4
+
+Depends-on:
+
+configure.ac:
+dnl Run our hack near the end, just before config.status creation.
+dnl It must happen late, i.e., after gl_LIBOBJS has been finalized.
+AC_CONFIG_COMMANDS_PRE([
+  gl_NON_RECURSIVE_GNULIB_PREFIX_HACK([lib])
+  ])
+
+Makefile.am:
+
+Include:
+
+License:
+unlimited
+
+Maintainer:
+Jim Meyering
--
1.7.12.1.382.gb0576a6


>From ab13d4aae2ece4a98dd9f2ee7b74cdce6c491793 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Wed, 19 Sep 2012 19:16:04 +0200
Subject: [PATCH 2/3] build: update gnulib submodule to latest

---
 gnulib | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnulib b/gnulib
index 0e3af50..3ff028f 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 0e3af50c9e20938bd1cea0182bf749ce61cb6782
+Subproject commit 3ff028fd56c2aa14ce5e380e81b91e27a0bf8e2c
--
1.7.12.1.382.gb0576a6


>From 6d6d0a30415fd47be94163c5555671b10c3f674c Mon Sep 17 00:00:00 2001
From: Akim Demaille <akim@lrde.epita.fr>
Date: Wed, 19 Sep 2012 15:43:43 +0200
Subject: [PATCH 3/3] build: fix gperf fix

* src/local.mk (src/cpp-cond.c): Use a more accurate pattern
to make the lookup function static.  For details, see
https://lists.gnu.org/archive/html/bug-cppi/2012-03/msg00001.html
---
 src/local.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/local.mk b/src/local.mk
index 01231d1..c43c32e 100644
--- a/src/local.mk
+++ b/src/local.mk
@@ -28,7 +28,8 @@ GPERF_OPTIONS = \
 src/cpp-cond.c: src/cpp.gp
 	$(AM_V_GEN)rm -f $@ $@-t
 	$(AM_V_at)$(GPERF) $(GPERF_OPTIONS) $< \
-	  | perl -ne '/__GNUC_STDC_INLINE__/ and print "static\n"; print' \
+	  | perl -0777 -p \
+	     -e 's/const struct KW \*\ncpp_cond_lookup/static\n$$&/' \
 	  > $@-t
 	$(AM_V_at)chmod a-w $@-t
 	$(AM_V_at)mv $@-t $@
--
1.7.12.1.382.gb0576a6


From MAILER-DAEMON Thu Sep 20 03:21:58 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TEb5C-0005PN-KO
	for mharc-bug-cppi@gnu.org; Thu, 20 Sep 2012 03:21:58 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39867)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim.demaille@gmail.com>) id 1TEb54-0005P1-ML
	for bug-cppi@gnu.org; Thu, 20 Sep 2012 03:21:56 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <akim.demaille@gmail.com>) id 1TEb51-0000lK-Sb
	for bug-cppi@gnu.org; Thu, 20 Sep 2012 03:21:50 -0400
Received: from mail-wi0-f177.google.com ([209.85.212.177]:38603)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim.demaille@gmail.com>) id 1TEb51-0000kq-MR
	for bug-cppi@gnu.org; Thu, 20 Sep 2012 03:21:47 -0400
Received: by wibhn17 with SMTP id hn17so195908wib.12
	for <bug-cppi@gnu.org>; Thu, 20 Sep 2012 00:21:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=subject:mime-version:content-type:from:in-reply-to:date:cc
	:content-transfer-encoding:message-id:references:to:x-mailer;
	bh=ZyTPLtxSj/pLPeP7xF48JU8sGFWtZpyt7WUAvJFsocs=;
	b=UrGs6DCcS7lHjGxIzYE5wX1yR1IzV2xlN3htl3JPV40X5DYRdGMFFBOs0wQ9avOpYt
	IYJ2c5ST8cSNxOUSYJTeL3GWlwwpm0LpQCv+AEgdjqyb8UPDEueIJOUSOTV5FEFKG+L/
	bMj8kVF/wH4/unD9KugM/tHfsm6OikPqbif7HKIicx7qTiDpbTVtFhK0e43ZQg5JElnX
	2a2Hz5LnWUyQ0r+a45IrWl0LjyTyTcbmCEQx/5s86s7EiyalQfFDx8ufEphSVt1mJkTr
	e1PMOEK8xaSHQZgv4sxqYfPIi4vFXiY4TjeKNJm4gEEwHaRLpVnfBmjEAsYNEdDCoDja
	U3fA==
Received: by 10.216.99.199 with SMTP id x49mr618602wef.171.1348125706687;
	Thu, 20 Sep 2012 00:21:46 -0700 (PDT)
Received: from erebus.lrde.epita.fr (sao-paulo.lrde.epita.fr. [163.5.55.1])
	by mx.google.com with ESMTPS id bc2sm9313884wib.0.2012.09.20.00.21.45
	(version=TLSv1/SSLv3 cipher=OTHER);
	Thu, 20 Sep 2012 00:21:45 -0700 (PDT)
Mime-Version: 1.0 (Apple Message framework v1278)
Content-Type: text/plain; charset=iso-8859-1
From: Akim Demaille <akim.demaille@gmail.com>
In-Reply-To: <87fw6dhprh.fsf@rho.meyering.net>
Date: Thu, 20 Sep 2012 09:21:44 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <1C15FF5B-912C-4F4C-BA11-9A8F34B8BDB7@gmail.com>
References: <87fw6dhprh.fsf@rho.meyering.net>
To: Jim Meyering <jim@meyering.net>
X-Mailer: Apple Mail (2.1278)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.177
Cc: bug-cppi@gnu.org
Subject: Re: [bug-cppi] [PATCH 1/3] build: use new gnulib module:
	non-recursive-gnulib-prefix-hack
X-BeenThere: bug-cppi@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <bug-cppi.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-cppi>,
	<mailto:bug-cppi-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-cppi>
List-Post: <mailto:bug-cppi@gnu.org>
List-Help: <mailto:bug-cppi-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-cppi>,
	<mailto:bug-cppi-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 20 Sep 2012 07:21:56 -0000


Le 19 sept. 2012 =E0 19:43, Jim Meyering a =E9crit :

> [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;
>=20
> -  # $(srcdir) is actually $(top_srcdir)/lib.
> -  s{\$\(srcdir\)}{\$(top_srcdir)/lib}g;
> +  # lib_libcoreutils_a_SOURCES +=3D \
> +  #   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?


> 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.
> 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.



From MAILER-DAEMON Thu Sep 20 03:31:32 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TEbES-0000HI-Gy
	for mharc-bug-cppi@gnu.org; Thu, 20 Sep 2012 03:31:32 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37350)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim.demaille@gmail.com>) id 1TEbEO-0000Gh-W1
	for bug-cppi@gnu.org; Thu, 20 Sep 2012 03:31:30 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <akim.demaille@gmail.com>) id 1TEbEN-0003yN-NS
	for bug-cppi@gnu.org; Thu, 20 Sep 2012 03:31:28 -0400
Received: from mail-wi0-f171.google.com ([209.85.212.171]:61760)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim.demaille@gmail.com>) id 1TEbEN-0003wr-GA
	for bug-cppi@gnu.org; Thu, 20 Sep 2012 03:31:27 -0400
Received: by wibhq4 with SMTP id hq4so209540wib.12
	for <bug-cppi@gnu.org>; Thu, 20 Sep 2012 00:31:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=subject:mime-version:content-type:from:in-reply-to:date:cc
	:content-transfer-encoding:message-id:references:to:x-mailer;
	bh=2B7W9NtPQT7huH4PxKEeNfHaLkzfgd4vE+16N6WiAGg=;
	b=TSb1E8q1IZFhHLq63Jscs7r/yjkjKKihSflm+6eDhQ5fHxc0QYUArAhPdmcawBAFEP
	QPih7Bmg3dLh809QUF3q/73aMqR6Uwjul/htEOPtiqQ8bku+JhRepK/CT6qZuhHfTBn5
	KRIQWvg3hJg+Z9CqS7xAYyCa/e3D1cvbEH9y70JsQEqIkP0CQok5wNnbXUSy8vwle5C6
	LLoMsgCBrOP/y0kCuE2a42dxsroon1qs/iVj8fH/Jv+LROuvMjgPTTJVQBh9LfaXTx7j
	dzZtYVRHoe1vIGKIIUHQ4LjmSZTenqn4N12LTAnLD1+ISleDjze9BTcWo1ggIi5IPeGU
	RUcg==
Received: by 10.180.82.230 with SMTP id l6mr3923931wiy.21.1348126286731;
	Thu, 20 Sep 2012 00:31:26 -0700 (PDT)
Received: from erebus.lrde.epita.fr (sao-paulo.lrde.epita.fr. [163.5.55.1])
	by mx.google.com with ESMTPS id j6sm9338092wiy.4.2012.09.20.00.31.25
	(version=TLSv1/SSLv3 cipher=OTHER);
	Thu, 20 Sep 2012 00:31:26 -0700 (PDT)
Mime-Version: 1.0 (Apple Message framework v1278)
Content-Type: text/plain; charset=iso-8859-1
From: Akim Demaille <akim.demaille@gmail.com>
In-Reply-To: <87lig5hq4j.fsf@rho.meyering.net>
Date: Thu, 20 Sep 2012 09:31:25 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <0FB6B555-CA76-453E-9E8E-C50961FB8E46@gmail.com>
References: <98EC8B0B-7696-487E-BA58-098B68BA8939@gmail.com>
	<504A5B5D.6090901@redhat.com>
	<130ADE43-50FE-4721-919D-F13FCF81B456@gmail.com>
	<87lig5hq4j.fsf@rho.meyering.net>
To: Jim Meyering <jim@meyering.net>
X-Mailer: Apple Mail (2.1278)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.171
Cc: bug-cppi@gnu.org
Subject: Re: [bug-cppi] VPATH issues
X-BeenThere: bug-cppi@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <bug-cppi.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-cppi>,
	<mailto:bug-cppi-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-cppi>
List-Post: <mailto:bug-cppi@gnu.org>
List-Help: <mailto:bug-cppi-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-cppi>,
	<mailto:bug-cppi-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 20 Sep 2012 07:31:30 -0000


Le 19 sept. 2012 =E0 19:35, Jim Meyering a =E9crit :

> Hi Akim,

Hi!

> Thanks for the patch and the reminder.
> It looks like it fell off my radar.
>=20
> That change is not needed for me.
> Could it be required for you because your version of gperf
> is older than mine?  I'm using gperf 3.1.

The gperf I used yesterday to check was 3.0.4, from MacPorts,
but ISTR that I had also checked with the repository version of
gperf and also had failures.

3.0.4 seems to be the latest release, http://www.gnu.org/software/gperf/

Actually, looking at my archives I see we (you and me) already
talked about this, privately.  I guess the CC to bug-cppi was
lost at some point, I have no idea why.

I will send the thread to you.  Feel free to publish it.

The key point is that the version of gperf on MacPorts is modified
to address this issue:

	https://trac.macports.org/ticket/29974



From MAILER-DAEMON Thu Sep 20 04:03:02 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TEbiw-0002uV-Hj
	for mharc-bug-cppi@gnu.org; Thu, 20 Sep 2012 04:03:02 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39653)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1TEbiq-0002uO-0H
	for bug-cppi@gnu.org; Thu, 20 Sep 2012 04:03:01 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1TEbil-0006Bf-6a
	for bug-cppi@gnu.org; Thu, 20 Sep 2012 04:02:55 -0400
Received: from mx.meyering.net ([88.168.87.75]:49728)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1TEbik-0006Ba-W0
	for bug-cppi@gnu.org; Thu, 20 Sep 2012 04:02:51 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 7BEA4600FE;
	Thu, 20 Sep 2012 10:02:49 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Akim Demaille <akim.demaille@gmail.com>
In-Reply-To: <1C15FF5B-912C-4F4C-BA11-9A8F34B8BDB7@gmail.com> (Akim Demaille's
	message of "Thu, 20 Sep 2012 09:21:44 +0200")
References: <87fw6dhprh.fsf@rho.meyering.net>
	<1C15FF5B-912C-4F4C-BA11-9A8F34B8BDB7@gmail.com>
Date: Thu, 20 Sep 2012 10:02:49 +0200
Message-ID: <87fw6ddsuu.fsf@rho.meyering.net>
Lines: 72
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Cc: bug-cppi@gnu.org
Subject: Re: [bug-cppi] [PATCH 1/3] build: use new gnulib module:
	non-recursive-gnulib-prefix-hack
X-BeenThere: bug-cppi@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <bug-cppi.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-cppi>,
	<mailto:bug-cppi-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-cppi>
List-Post: <mailto:bug-cppi@gnu.org>
List-Help: <mailto:bug-cppi-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-cppi>,
	<mailto:bug-cppi-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 20 Sep 2012 08:03:01 -0000

Akim Demaille wrote:
> Le 19 sept. 2012 =E0 19:43, Jim Meyering a =E9crit :
>
>> [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 +=3D \
>> +  #   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*\+=3D\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!


From MAILER-DAEMON Thu Sep 20 04:58:10 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TEcaI-0001UR-4Z
	for mharc-bug-cppi@gnu.org; Thu, 20 Sep 2012 04:58:10 -0400
Received: from eggs.gnu.org ([208.118.235.92]:32902)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1TEcaC-0001UD-JQ
	for bug-cppi@gnu.org; Thu, 20 Sep 2012 04:58:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1TEca6-0001Vg-Fn
	for bug-cppi@gnu.org; Thu, 20 Sep 2012 04:58:04 -0400
Received: from mx.meyering.net ([88.168.87.75]:49861)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1TEca6-0001Uo-8n
	for bug-cppi@gnu.org; Thu, 20 Sep 2012 04:57:58 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 0A73260121;
	Thu, 20 Sep 2012 10:57:57 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Akim Demaille <akim.demaille@gmail.com>
In-Reply-To: <1C15FF5B-912C-4F4C-BA11-9A8F34B8BDB7@gmail.com> (Akim Demaille's
	message of "Thu, 20 Sep 2012 09:21:44 +0200")
References: <87fw6dhprh.fsf@rho.meyering.net>
	<1C15FF5B-912C-4F4C-BA11-9A8F34B8BDB7@gmail.com>
Date: Thu, 20 Sep 2012 10:57:57 +0200
Message-ID: <878vc5dqay.fsf@rho.meyering.net>
Lines: 95
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Cc: bug-cppi@gnu.org
Subject: Re: [bug-cppi] [PATCH 1/3] build: use new gnulib module:
	non-recursive-gnulib-prefix-hack
X-BeenThere: bug-cppi@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <bug-cppi.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-cppi>,
	<mailto:bug-cppi-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-cppi>
List-Post: <mailto:bug-cppi@gnu.org>
List-Help: <mailto:bug-cppi-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-cppi>,
	<mailto:bug-cppi-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 20 Sep 2012 08:58:08 -0000

Akim Demaille wrote:
> Le 19 sept. 2012 =E0 19:43, Jim Meyering a =E9crit :
>
>> [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 +=3D \
>> +  #   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?

However, do note that it's not specific to coreutils.
The offending code is from gnulib's modules/inttostr.

    $ cat modules/inttostr
    Description:
    Convert integers to printable strings.

    Files:
    lib/anytostr.c
    lib/imaxtostr.c
    lib/inttostr.c
    lib/inttostr.h
    lib/offtostr.c
    lib/umaxtostr.c
    lib/uinttostr.c
    m4/inttostr.m4

    Depends-on:
    intprops
    stdint

    configure.ac:
    gl_INTTOSTR

    Makefile.am:
    lib_SOURCES +=3D \
      imaxtostr.c \
      inttostr.c \
      offtostr.c \
      uinttostr.c \
      umaxtostr.c

    Include:
    "inttostr.h"

    License:
    LGPL

    Maintainer:
    Paul Eggert

There is currently only one other instance like this, and it's in a
test module (so not yet a concern for me -- or addressed):

    $ g grep -A9 'CES *+=3D *\\$' modules
    modules/havelib-tests:BUILT_SOURCES +=3D \
    modules/havelib-tests-  havelib/Makefile.in \
    modules/havelib-tests-  havelib/rpathx/Makefile.in \
    modules/havelib-tests-  havelib/rpathx/aclocal.m4 \
    modules/havelib-tests-  havelib/rpathx/configure \
    modules/havelib-tests-  havelib/rpathy/Makefile.in \
    modules/havelib-tests-  havelib/rpathy/aclocal.m4 \
    modules/havelib-tests-  havelib/rpathy/configure \
    modules/havelib-tests-  havelib/rpathz/Makefile.in \
    modules/havelib-tests-  havelib/rpathz/aclocal.m4 \
    --
    modules/inttostr:lib_SOURCES +=3D \
    modules/inttostr-  imaxtostr.c \
    modules/inttostr-  inttostr.c \
    modules/inttostr-  offtostr.c \
    modules/inttostr-  uinttostr.c \
    modules/inttostr-  umaxtostr.c
    modules/inttostr-
    modules/inttostr-Include:
    modules/inttostr-"inttostr.h"
    modules/inttostr-


From MAILER-DAEMON Thu Sep 20 06:31:39 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TEe2l-0003HF-Qr
	for mharc-bug-cppi@gnu.org; Thu, 20 Sep 2012 06:31:39 -0400
Received: from eggs.gnu.org ([208.118.235.92]:41416)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1TEe2h-0003H0-Pa
	for bug-cppi@gnu.org; Thu, 20 Sep 2012 06:31:38 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1TEe2d-0000fq-VX
	for bug-cppi@gnu.org; Thu, 20 Sep 2012 06:31:35 -0400
Received: from mx.meyering.net ([88.168.87.75]:50072)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1TEe2d-0000fi-BV
	for bug-cppi@gnu.org; Thu, 20 Sep 2012 06:31:31 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 81767600BD;
	Thu, 20 Sep 2012 12:31:30 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Akim Demaille <akim.demaille@gmail.com>
In-Reply-To: <BC01FD6E-DAD8-42E8-B77C-BCDCC6AE7254@gmail.com> (Akim Demaille's
	message of "Thu, 20 Sep 2012 09:33:03 +0200")
References: <BC01FD6E-DAD8-42E8-B77C-BCDCC6AE7254@gmail.com>
Date: Thu, 20 Sep 2012 12:31:30 +0200
Message-ID: <87pq5hc7el.fsf@rho.meyering.net>
Lines: 708
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Cc: bug-cppi@gnu.org
Subject: Re: [bug-cppi] The thread about Gperf and cppi
X-BeenThere: bug-cppi@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <bug-cppi.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-cppi>,
	<mailto:bug-cppi-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-cppi>
List-Post: <mailto:bug-cppi@gnu.org>
List-Help: <mailto:bug-cppi-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-cppi>,
	<mailto:bug-cppi-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 20 Sep 2012 10:31:38 -0000

Akim Demaille wrote:
> Here is the thread.

And for the record, I'm Cc'ing bug-cppi:

> D=E9but du message r=E9exp=E9di=E9 :
>
>> De : Akim Demaille <akim@lrde.epita.fr>
>> Objet : R=E9p : cppi
>> Date : 30 mars 2012 14:19:47 HAEC
>> =C0 : Jim Meyering <jim@meyering.net>
>>
>>
>>> Le 30 mars 2012 =E0 14:04, Jim Meyering a =E9crit :
>>
>>> Akim Demaille wrote:
>>>> Le 30 mars 2012 =E0 12:21, Jim Meyering a =E9crit :
>>>>
>>>>> ~/src/gnu/cppi $ gperf --version
>>>>> GNU gperf 3.1
>>>
>>> Thanks!  I've upgraded, too, and regenerated cpp-cond.c.
>>> However, this is the only difference:
>>>
>>> --- src/cpp-cond.c.~1~  2012-03-30 13:56:06.240999545 +0200
>>> +++ src/cpp-cond.c      2012-03-30 13:56:13.090184866 +0200
>>> @@ -1,4 +1,4 @@
>>> -/* ANSI-C code produced by gperf version 3.0.4 */
>>> +/* ANSI-C code produced by gperf version 3.1 */
>>
>> Ahem...  There is something really fishy going on here :)
>>
>> However:
>>> #ifdef __GNUC__
>>> __inline
>>> #else
>>> #ifdef __cplusplus
>>> inline
>>> #endif
>>> #endif
>>> static unsigned int
>>> hash (register const char *str, register unsigned int len)
>>
>> You do have that static guy, but you don't have the whole
>> GNU_STDC_INLINE stuff.
>>
>> I don't know what to say :/
>>
>> According to the code:
>>
>>> void
>>> Output::output_hash_function () const
>>> {
>>>  /* Output the function's head.  */
>>>  if (option[CPLUSPLUS])
>>>    printf ("inline ");
>>>  else if (option[KRC] | option[C] | option[ANSIC])
>>>    printf ("#ifdef __GNUC__\n"
>>>            "__inline\n"
>>>            "#else\n"
>>>            "#ifdef __cplusplus\n"
>>>            "inline\n"
>>>            "#endif\n"
>>>            "#endif\n");
>>
>> indeed, there should not be the same #cpp stuff as here:
>>
>>> void
>>> Output::output_lookup_function () const
>>> {
>>>  /* Output the function's head.  */
>>>  if (option[KRC] | option[C] | option[ANSIC])
>>>    /* GCC 4.3 and above with -std=3Dc99 or -std=3Dgnu99 implements ISO =
C99
>>>       inline semantics, unless -fgnu89-inline is used.  It defines a ma=
cro
>>>       __GNUC_STDC_INLINE__ to indicate this situation or a macro
>>>       __GNUC_GNU_INLINE__ to indicate the opposite situation.
>>>       GCC 4.2 with -std=3Dc99 or -std=3Dgnu99 implements the GNU C inli=
ne
>>>       semantics but warns, unless -fgnu89-inline is used:
>>>         warning: C99 inline functions are not supported; using GNU89
>>>         warning: to disable this warning use -fgnu89-inline or the gnu_=
inline function attribute
>>>       It defines a macro __GNUC_GNU_INLINE__ to indicate this situation=
.  */
>>>    printf ("#ifdef __GNUC__\n"
>>>            "__inline\n"
>>>            "#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLI=
NE__\n"
>>>            "__attribute__ ((__gnu_inline__))\n"
>>>            "#endif\n"
>>>            "#endif\n");
>>
>> OK, I have it...
>>
>>> $ less /opt/local/var/macports/sources/rsync.macports.org/release/ports=
/devel/gperf/files/c99.patch
>>> --- src/output.cc.orig  2011-07-03 10:13:13.000000000 -0700
>>> +++ src/output.cc       2011-07-03 10:17:43.000000000 -0700
>>> @@ -745,12 +745,10 @@ Output::output_hash_function () const
>>>   if (option[CPLUSPLUS])
>>>     printf ("inline ");
>>>   else if (option[KRC] | option[C] | option[ANSIC])
>>> -    printf ("#ifdef __GNUC__\n"
>>> +    printf ("#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >=3D =
199901L) || defined(__cplusplus) || defined(__GNUC_STDC_INLINE__)\n"
>>> +            "inline\n"
>>> +            "#elif defined(__GNUC__)\n"
>>>             "__inline\n"
>>> -            "#else\n"
>>> -            "#ifdef __cplusplus\n"
>>> -            "inline\n"
>>> -            "#endif\n"
>>>             "#endif\n");
>>>
>>>   if (/* The function does not use the 'str' argument?  */
>>
>> This patch is local to MacPorts apparently.  In itself the patch
>> does not seem wrong (except maybe that Bruno was not contacted),
>> but it tickles your Perl pattern.
>>
>> Actually, they seem to be trying to address the same concern
>> as yourself.  Was Bruno put into the loop?
>>
>> https://trac.macports.org/ticket/29974
>>
> D=E9but du message r=E9exp=E9di=E9 :
>
>> De : Jim Meyering <jim@meyering.net>
>> Objet : R=E9p : cppi
>> Date : 30 mars 2012 14:04:19 HAEC
>> =C0 : Akim Demaille <akim@lrde.epita.fr>
>>
>> Akim Demaille wrote:
>>> Le 30 mars 2012 =E0 12:21, Jim Meyering a =E9crit :
>>>
>>>>> D=E9but du message r=E9exp=E9di=E9 :
>>>>>
>>>>>> De : Akim Demaille <akim@lrde.epita.fr>
>>>>>> Date : 29 mars 2012 14:55:10 HAEC
>>>>>> =C0 : bug-cppi@gnu.org
>>>>>> Objet : Invalid tweaking of GPerf output
>>>>>>
>>>>>> I've also needed this patch.  Was not part of the first
>>>>>> batch because I was looking for it in gperf, but really
>>>>>> it's in cppi that the problem is.  Below is the diff
>>>>>> straight-from-gperf as-patched-by-cppi of cpp-cond.c:
>>>>>>
>>>>>> As you can see the first hunk has twice "static", which
>>>>>> my gcc dislikes.
>>>>
>>>> I don't see this problem with gperf-3.0.4.
>>>> What version are you using?
>>>
>>> I was using that one, and then I installed the git
>>> version.
>>>
>>>> What gcc?  It compiles fine for me with 4.7.0 and 4.6.x.
>>>
>>> It was 4.7.
>> ...
>>> perl is going fine.  I had already included the diff
>>> before/after perl in my message, and this snippet is adding
>>> a "static" to a function which already has its one:
>> ...
>>> With gperf.git:
>>>
>>>> ~/src/gnu/cppi $ gperf --version
>>>> GNU gperf 3.1
>>
>> Thanks!  I've upgraded, too, and regenerated cpp-cond.c.
>> However, this is the only difference:
>>
>> --- src/cpp-cond.c.~1~  2012-03-30 13:56:06.240999545 +0200
>> +++ src/cpp-cond.c      2012-03-30 13:56:13.090184866 +0200
>> @@ -1,4 +1,4 @@
>> -/* ANSI-C code produced by gperf version 3.0.4 */
>> +/* ANSI-C code produced by gperf version 3.1 */
>> /* Command-line: gperf -C -N cpp_cond_lookup -n -t -s 6 -k '*' --languag=
e=3DANSI-C src/cpp.gp  */
>>
>> #if !((' ' =3D=3D 32) && ('!' =3D=3D 33) && ('"' =3D=3D 34) && ('#' =3D=
=3D 35) \
>>
>> Here's my full generated cpp-cond.c.
>> I hope that will help you resolve the mystery.
>>
>> /* ANSI-C code produced by gperf version 3.1 */
>> /* Command-line: gperf -C -N cpp_cond_lookup -n -t -s 6 -k '*' --languag=
e=3DANSI-C src/cpp.gp  */
>>
>> #if !((' ' =3D=3D 32) && ('!' =3D=3D 33) && ('"' =3D=3D 34) && ('#' =3D=
=3D 35) \
>>      && ('%' =3D=3D 37) && ('&' =3D=3D 38) && ('\'' =3D=3D 39) && ('(' =
=3D=3D 40) \
>>      && (')' =3D=3D 41) && ('*' =3D=3D 42) && ('+' =3D=3D 43) && (',' =
=3D=3D 44) \
>>      && ('-' =3D=3D 45) && ('.' =3D=3D 46) && ('/' =3D=3D 47) && ('0' =
=3D=3D 48) \
>>      && ('1' =3D=3D 49) && ('2' =3D=3D 50) && ('3' =3D=3D 51) && ('4' =
=3D=3D 52) \
>>      && ('5' =3D=3D 53) && ('6' =3D=3D 54) && ('7' =3D=3D 55) && ('8' =
=3D=3D 56) \
>>      && ('9' =3D=3D 57) && (':' =3D=3D 58) && (';' =3D=3D 59) && ('<' =
=3D=3D 60) \
>>      && ('=3D' =3D=3D 61) && ('>' =3D=3D 62) && ('?' =3D=3D 63) && ('A' =
=3D=3D 65) \
>>      && ('B' =3D=3D 66) && ('C' =3D=3D 67) && ('D' =3D=3D 68) && ('E' =
=3D=3D 69) \
>>      && ('F' =3D=3D 70) && ('G' =3D=3D 71) && ('H' =3D=3D 72) && ('I' =
=3D=3D 73) \
>>      && ('J' =3D=3D 74) && ('K' =3D=3D 75) && ('L' =3D=3D 76) && ('M' =
=3D=3D 77) \
>>      && ('N' =3D=3D 78) && ('O' =3D=3D 79) && ('P' =3D=3D 80) && ('Q' =
=3D=3D 81) \
>>      && ('R' =3D=3D 82) && ('S' =3D=3D 83) && ('T' =3D=3D 84) && ('U' =
=3D=3D 85) \
>>      && ('V' =3D=3D 86) && ('W' =3D=3D 87) && ('X' =3D=3D 88) && ('Y' =
=3D=3D 89) \
>>      && ('Z' =3D=3D 90) && ('[' =3D=3D 91) && ('\\' =3D=3D 92) && (']' =
=3D=3D 93) \
>>      && ('^' =3D=3D 94) && ('_' =3D=3D 95) && ('a' =3D=3D 97) && ('b' =
=3D=3D 98) \
>>      && ('c' =3D=3D 99) && ('d' =3D=3D 100) && ('e' =3D=3D 101) && ('f' =
=3D=3D 102) \
>>      && ('g' =3D=3D 103) && ('h' =3D=3D 104) && ('i' =3D=3D 105) && ('j'=
 =3D=3D 106) \
>>      && ('k' =3D=3D 107) && ('l' =3D=3D 108) && ('m' =3D=3D 109) && ('n'=
 =3D=3D 110) \
>>      && ('o' =3D=3D 111) && ('p' =3D=3D 112) && ('q' =3D=3D 113) && ('r'=
 =3D=3D 114) \
>>      && ('s' =3D=3D 115) && ('t' =3D=3D 116) && ('u' =3D=3D 117) && ('v'=
 =3D=3D 118) \
>>      && ('w' =3D=3D 119) && ('x' =3D=3D 120) && ('y' =3D=3D 121) && ('z'=
 =3D=3D 122) \
>>      && ('{' =3D=3D 123) && ('|' =3D=3D 124) && ('}' =3D=3D 125) && ('~'=
 =3D=3D 126))
>> /* The character set is not based on ISO-646.  */
>> #error "gperf generated tables don't work with this execution character =
set. Please report a bug to <bug-gnu-gperf@gnu.org>."
>> #endif
>>
>> #line 1 "src/cpp.gp"
>> struct KW {char const *name; int code;};
>>
>> #define TOTAL_KEYWORDS 9
>> #define MIN_WORD_LENGTH 2
>> #define MAX_WORD_LENGTH 6
>> #define MIN_HASH_VALUE 0
>> #define MAX_HASH_VALUE 55
>> /* maximum key range =3D 56, duplicates =3D 0 */
>>
>> #ifdef __GNUC__
>> __inline
>> #else
>> #ifdef __cplusplus
>> inline
>> #endif
>> #endif
>> static unsigned int
>> hash (register const char *str, register unsigned int len)
>> {
>>  static const unsigned char asso_values[] =3D
>>    {
>>      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>>      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>>      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>>      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>>      56, 56,  5, 56, 56, 56, 56, 56, 56, 56,
>>      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>>      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>>      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>>      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>>      56, 56, 56, 56, 56, 56, 56,  0, 56, 56,
>>       0, 15, 10,  0, 56, 10, 56, 56,  0,  0,
>>       5, 56,  0, 56,  0,  0, 56, 56, 56, 56,
>>      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>>      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>>      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>>      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>>      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>>      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>>      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>>      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>>      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>>      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>>      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>>      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>>      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>>      56, 56, 56, 56, 56, 56
>>    };
>>  register int hval =3D 0;
>>
>>  switch (len)
>>    {
>>      default:
>>        hval +=3D asso_values[(unsigned char)str[5]];
>>      /*FALLTHROUGH*/
>>      case 5:
>>        hval +=3D asso_values[(unsigned char)str[4]];
>>      /*FALLTHROUGH*/
>>      case 4:
>>        hval +=3D asso_values[(unsigned char)str[3]];
>>      /*FALLTHROUGH*/
>>      case 3:
>>        hval +=3D asso_values[(unsigned char)str[2]];
>>      /*FALLTHROUGH*/
>>      case 2:
>>        hval +=3D asso_values[(unsigned char)str[1]];
>>      /*FALLTHROUGH*/
>>      case 1:
>>        hval +=3D asso_values[(unsigned char)str[0]];
>>        break;
>>    }
>>  return hval;
>> }
>>
>> #ifdef __GNUC__
>> __inline
>> static
>> #if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
>> __attribute__ ((__gnu_inline__))
>> #endif
>> #endif
>> const struct KW *
>> cpp_cond_lookup (register const char *str, register unsigned int len)
>> {
>>  static const struct KW wordlist[] =3D
>>    {
>> #line 11 "src/cpp.gp"
>>      {"pragma", EIC_PRAGMA},
>>      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
>> #line 3 "src/cpp.gp"
>>      {"**", EIC_INVALID},
>>      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
>> #line 4 "src/cpp.gp"
>>      {"if", EIC_IF},
>>      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
>> #line 8 "src/cpp.gp"
>>      {"else", EIC_ELSE},
>>      {""}, {""}, {""}, {""},
>> #line 7 "src/cpp.gp"
>>      {"elif", EIC_ELIF},
>>      {""}, {""}, {""}, {""},
>> #line 9 "src/cpp.gp"
>>      {"endif", EIC_ENDIF},
>>      {""}, {""}, {""}, {""},
>> #line 5 "src/cpp.gp"
>>      {"ifdef", EIC_IFDEF},
>>      {""}, {""}, {""}, {""},
>> #line 6 "src/cpp.gp"
>>      {"ifndef", EIC_IFNDEF},
>>      {""}, {""}, {""}, {""},
>> #line 10 "src/cpp.gp"
>>      {"define", EIC_DEFINE}
>>    };
>>
>>  if (len <=3D MAX_WORD_LENGTH && len >=3D MIN_WORD_LENGTH)
>>    {
>>      register int key =3D hash (str, len);
>>
>>      if (key <=3D MAX_HASH_VALUE && key >=3D 0)
>>        {
>>          register const char *s =3D wordlist[key].name;
>>
>>          if (*str =3D=3D *s && !strcmp (str + 1, s + 1))
>>            return &wordlist[key];
>>        }
>>    }
>>  return 0;
>> }
> D=E9but du message r=E9exp=E9di=E9 :
>
>> De : Akim Demaille <akim@lrde.epita.fr>
>> Objet : R=E9p : cppi
>> Date : 30 mars 2012 13:12:42 HAEC
>> =C0 : Jim Meyering <jim@meyering.net>
>>
>>
>> Le 30 mars 2012 =E0 12:21, Jim Meyering a =E9crit :
>>
>>>> D=E9but du message r=E9exp=E9di=E9 :
>>>>
>>>>> De : Akim Demaille <akim@lrde.epita.fr>
>>>>> Date : 29 mars 2012 14:55:10 HAEC
>>>>> =C0 : bug-cppi@gnu.org
>>>>> Objet : Invalid tweaking of GPerf output
>>>>>
>>>>> I've also needed this patch.  Was not part of the first
>>>>> batch because I was looking for it in gperf, but really
>>>>> it's in cppi that the problem is.  Below is the diff
>>>>> straight-from-gperf as-patched-by-cppi of cpp-cond.c:
>>>>>
>>>>> As you can see the first hunk has twice "static", which
>>>>> my gcc dislikes.
>>>
>>> I don't see this problem with gperf-3.0.4.
>>> What version are you using?
>>
>> I was using that one, and then I installed the git
>> version.
>>
>>> What gcc?  It compiles fine for me with 4.7.0 and 4.6.x.
>>
>> It was 4.7.
>>
>>>>> --- s   2012-03-29 14:42:22.000000000 +0200
>>>>> +++ src/cpp-cond.c      2012-03-29 14:41:01.000000000 +0200
>>>>> @@ -31,20 +31,21 @@
>>>>> #line 1 "../../src/cpp.gp"
>>>>> struct KW {char const *name; int code;};
>>>>>
>>>>> #define TOTAL_KEYWORDS 9
>>>>> #define MIN_WORD_LENGTH 2
>>>>> #define MAX_WORD_LENGTH 6
>>>>> #define MIN_HASH_VALUE 0
>>>>> #define MAX_HASH_VALUE 55
>>>>> /* maximum key range =3D 56, duplicates =3D 0 */
>>>
>>> If using a newer gperf does not help, please change
>>> src/local.mk (temporarily) to do this: (inserting the "-i.bak")
>>> and see if this perl code is somehow malfunctioning for you?
>>>
>>> src/cpp-cond.c: src/cpp.gp
>>> 	$(AM_V_GEN)rm -f $@ $@-tmp
>>> 	$(AM_V_at)$(GPERF) $(GPERF_OPTIONS) $< \
>>> 	  | perl -i.bak -ne '/__GNUC_STDC_INLINE__/ and print "static\n"; prin=
t' \
>>> 	  > $@-tmp
>>> 	$(AM_V_at)chmod a-w $@-tmp
>>> 	$(AM_V_at)mv $@-tmp $@
>>
>> perl is going fine.  I had already included the diff
>> before/after perl in my message, and this snippet is adding
>> a "static" to a function which already has its one:
>>
>>> ~/src/gnu/cppi $ /opt/local/bin/gperf --version 13:02:36GNU gperf
>>> 3.0.4
>>> Copyright (C) 1989-1998, 2000-2004, 2006-2009 Free Software Foundation,=
 Inc.
>>> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl=
.html>
>>> This is free software: you are free to change and redistribute it.
>>> There is NO WARRANTY, to the extent permitted by law.
>>> Written by Douglas C. Schmidt and Bruno Haible.
>>
>>> ~/src/gnu/cppi $ /opt/local/bin/gperf -C -N cpp_cond_lookup -n -t
>>> -s 6 -k '*' --language=3DANSI-C --output-file=3D- src/cpp.gp | grep
>>> -B10 '^hash'
>>> #define MIN_HASH_VALUE 0
>>> #define MAX_HASH_VALUE 55
>>> /* maximum key range =3D 56, duplicates =3D 0 */
>>>
>>> #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >=3D 199901L) ||
>>> defined(__cplusplus) || defined(__GNUC_STDC_INLINE__)
>>> inline
>>> #elif defined(__GNUC__)
>>> __inline
>>> #endif
>>> static unsigned int
>>> hash (register const char *str, register unsigned int len)
>>
>>
>>
>> With gperf.git:
>>
>>> ~/src/gnu/cppi $ gperf --version
>>> GNU gperf 3.1
>>> Copyright (C) 1989-2011 Free Software Foundation, Inc.
>>> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl=
.html>
>>> This is free software: you are free to change and redistribute it.
>>> There is NO WARRANTY, to the extent permitted by law.
>>> Written by Douglas C. Schmidt and Bruno Haible.
>>
>>> ~/src/gnu/cppi $ gperf -C -N cpp_cond_lookup -n -t -s 6 -k '*'
>>> --language=3DANSI-C --output-file=3D- src/cpp.gp | grep -B10 '^hash'
>>> /* maximum key range =3D 56, duplicates =3D 0 */
>>>
>>> #ifdef __GNUC__
>>> __inline
>>> #else
>>> #ifdef __cplusplus
>>> inline
>>> #endif
>>> #endif
>>> static unsigned int
>>> hash (register const char *str, register unsigned int len)
>>
>> (I agree the difference is surprising here, yet static
>> is still there).
>>
>>> * .gitignore: Remove all /po/.+ entries; replace with just two:
>>> /po/ and !/po/POTFILES.in, to denote that we VC only that one file
>>
>> I did not know "!", thanks :)
>>
>>> in the po/ directory.  Reported by Akim Demaille.
>>
>>
> D=E9but du message r=E9exp=E9di=E9 :
>
>> De : Jim Meyering <jim@meyering.net>
>> Objet : R=E9p : cppi
>> Date : 30 mars 2012 12:21:22 HAEC
>> =C0 : Akim Demaille <akim@lrde.epita.fr>
>>
>> Akim Demaille wrote:
>>> Hi Jim,
>>>
>>> these messages did not appear in the archive, and usually
>>> you answer quickly, so maybe something is going wrong.
>>
>> Thanks for resending.  Indeed: I never saw the original.
>>
>>> D=E9but du message r=E9exp=E9di=E9 :
>>>
>>>> De : Akim Demaille <akim@lrde.epita.fr>
>>>> Date : 29 mars 2012 14:55:10 HAEC
>>>> =C0 : bug-cppi@gnu.org
>>>> Objet : Invalid tweaking of GPerf output
>>>>
>>>> I've also needed this patch.  Was not part of the first
>>>> batch because I was looking for it in gperf, but really
>>>> it's in cppi that the problem is.  Below is the diff
>>>> straight-from-gperf as-patched-by-cppi of cpp-cond.c:
>>>>
>>>> As you can see the first hunk has twice "static", which
>>>> my gcc dislikes.
>>
>> I don't see this problem with gperf-3.0.4.
>> What version are you using?
>> What gcc?  It compiles fine for me with 4.7.0 and 4.6.x.
>>
>>>> --- s   2012-03-29 14:42:22.000000000 +0200
>>>> +++ src/cpp-cond.c      2012-03-29 14:41:01.000000000 +0200
>>>> @@ -31,20 +31,21 @@
>>>> #line 1 "../../src/cpp.gp"
>>>> struct KW {char const *name; int code;};
>>>>
>>>> #define TOTAL_KEYWORDS 9
>>>> #define MIN_WORD_LENGTH 2
>>>> #define MAX_WORD_LENGTH 6
>>>> #define MIN_HASH_VALUE 0
>>>> #define MAX_HASH_VALUE 55
>>>> /* maximum key range =3D 56, duplicates =3D 0 */
>>
>> If using a newer gperf does not help, please change
>> src/local.mk (temporarily) to do this: (inserting the "-i.bak")
>> and see if this perl code is somehow malfunctioning for you?
>>
>> src/cpp-cond.c: src/cpp.gp
>> 	$(AM_V_GEN)rm -f $@ $@-tmp
>> 	$(AM_V_at)$(GPERF) $(GPERF_OPTIONS) $< \
>> 	  | perl -i.bak -ne '/__GNUC_STDC_INLINE__/ and print "static\n"; print=
' \
>> 	  > $@-tmp
>> 	$(AM_V_at)chmod a-w $@-tmp
>> 	$(AM_V_at)mv $@-tmp $@
>>
>> ...
>>>> BTW, I have a number of non-gitignored files.  What is supposed
>>>> to happen with these guys?
>>
>> Odd... "git st" is clean for me.
>> I see that is because I have a non-VC'd po/.gitignore file.
>>
>> Oh... bootstrap would automatically append names of things it
>> generates to a VC'd po/.gitignore file (I think)...  So that file
>> is old.  I've removed it and fixed properly with this:
>> [I'll respond to your two other patches separately]
>>
>>> From db9da8f680c307c160e2d8f6a418e726455094ce Mon Sep 17 00:00:00 2001
>> From: Jim Meyering <meyering@redhat.com>
>> Date: Fri, 30 Mar 2012 12:17:52 +0200
>> Subject: [PATCH] maint: ignore almost all po/* entries, so that "git sta=
tus"
>> is clean
>>
>> * .gitignore: Remove all /po/.+ entries; replace with just two:
>> /po/ and !/po/POTFILES.in, to denote that we VC only that one file
>> in the po/ directory.  Reported by Akim Demaille.
>> Also ignore gnulib-tool artifact, lib/gnulib.mk.bak.
>> ---
>> .gitignore |   14 +++-----------
>> 1 file changed, 3 insertions(+), 11 deletions(-)
>>
>> diff --git a/.gitignore b/.gitignore
>> index e737fec..d2cbe38 100644
>> --- a/.gitignore
>> +++ b/.gitignore
>> @@ -1,3 +1,4 @@
>> +!/po/POTFILES.in
>> *~
>> .deps
>> .dirstamp
>> @@ -30,6 +31,7 @@
>> /lib/config.h
>> /lib/configmake.h
>> /lib/glthread
>> +/lib/gnulib.mk.bak
>> /lib/libcppi.a
>> /lib/link-warning.h
>> /lib/stamp-h1
>> @@ -37,17 +39,7 @@
>> /m4
>> /m4/.gitignore
>> /maint.mk
>> -/po/.gitignore
>> -/po/.reference
>> -/po/??.gmo
>> -/po/??.po
>> -/po/LINGUAS
>> -/po/Makefile
>> -/po/Makefile.in
>> -/po/Makevars
>> -/po/POTFILES
>> -/po/cppi.pot
>> -/po/stamp-po
>> +/po/
>> /test-suite.log
>> /tests/*.log
>> /tests/*.trs
>> --
>> 1.7.9.3
> D=E9but du message r=E9exp=E9di=E9 :
>
>> De : Akim Demaille <akim@lrde.epita.fr>
>> Objet : cppi
>> Date : 30 mars 2012 09:57:50 HAEC
>> =C0 : Jim Meyering <jim@meyering.net>
>>
>> Hi Jim,
>>
>> these messages did not appear in the archive, and usually
>> you answer quickly, so maybe something is going wrong.
>>
>> Cheers!
>>
>> D=E9but du message r=E9exp=E9di=E9 :
>>
>>> De : Akim Demaille <akim@lrde.epita.fr>
>>> Date : 29 mars 2012 14:55:10 HAEC
>>> =C0 : bug-cppi@gnu.org
>>> Objet : Invalid tweaking of GPerf output
>>>
>>> I've also needed this patch.  Was not part of the first
>>> batch because I was looking for it in gperf, but really
>>> it's in cppi that the problem is.  Below is the diff
>>> straight-from-gperf as-patched-by-cppi of cpp-cond.c:
>>>
>>> As you can see the first hunk has twice "static", which
>>> my gcc dislikes.
>>>
>>> --- s   2012-03-29 14:42:22.000000000 +0200
>>> +++ src/cpp-cond.c      2012-03-29 14:41:01.000000000 +0200
>>> @@ -31,20 +31,21 @@
>>> #line 1 "../../src/cpp.gp"
>>> struct KW {char const *name; int code;};
>>>
>>> #define TOTAL_KEYWORDS 9
>>> #define MIN_WORD_LENGTH 2
>>> #define MAX_WORD_LENGTH 6
>>> #define MIN_HASH_VALUE 0
>>> #define MAX_HASH_VALUE 55
>>> /* maximum key range =3D 56, duplicates =3D 0 */
>>>
>>> +static
>>> #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >=3D 199901L) || de=
fined(__cplusplus) || defined(__GNUC_STDC_INLINE__)
>>> inline
>>> #elif defined(__GNUC__)
>>> __inline
>>> #endif
>>> static unsigned int
>>> hash (register const char *str, register unsigned int len)
>>> {
>>>  static const unsigned char asso_values[] =3D
>>>    {
>>> @@ -96,20 +97,21 @@
>>>      /*FALLTHROUGH*/
>>>      case 1:
>>>        hval +=3D asso_values[(unsigned char)str[0]];
>>>        break;
>>>    }
>>>  return hval;
>>> }
>>>
>>> #ifdef __GNUC__
>>> __inline
>>> +static
>>> #if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
>>> __attribute__ ((__gnu_inline__))
>>> #endif
>>> #endif
>>> const struct KW *
>>> cpp_cond_lookup (register const char *str, register unsigned int len)
>>> {
>>>  static const struct KW wordlist[] =3D
>>>    {
>>> #line 11 "../../src/cpp.gp"
>>>
>>>
>>>
>
>>
>>>
>>>
>>> BTW, I have a number of non-gitignored files.  What is supposed
>>> to happen with these guys?
>>>
>>> ~/src/gnu/cppi $ git st
>>> # On branch master
>>> # Your branch is ahead of 'origin/master' by 3 commits.
>>> #
>>> # Untracked files:
>>> #   (use "git add <file>..." to include in what will be committed)
>>> #
>>> #	po/Makefile.in.in
>>> #	po/Makevars.template
>>> #	po/Rules-quot
>>> #	po/boldquot.sed
>>> #	po/en@boldquot.header
>>> #	po/en@quot.header
>>> #	po/insert-header.sin
>>> #	po/quot.sed
>>> #	po/remove-potcdate.sin
>>>
>> D=E9but du message r=E9exp=E9di=E9 :
>>
>>> De : Akim Demaille <akim.demaille@gmail.com>
>>> Date : 29 mars 2012 14:33:22 HAEC
>>> =C0 : bug-cppi@gnu.org
>>> Objet : VPATH issues
>>>
>>> Hi!
>>>
>>> I've needed the following changes to be able to compile
>>> cppi properly in VPATH build.  The second patch could
>>> also have moved the -*- comment in the license header,
>>> I don't know what your favorite choice is.
>>>
>>> Cheers!
>>>
>
>
>>
>>>
>>


From MAILER-DAEMON Thu Sep 20 08:27:12 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TEfqa-0006zA-Ss
	for mharc-bug-cppi@gnu.org; Thu, 20 Sep 2012 08:27:12 -0400
Received: from eggs.gnu.org ([208.118.235.92]:50164)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1TEfqU-0006yi-Cr
	for bug-cppi@gnu.org; Thu, 20 Sep 2012 08:27:11 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1TEfqJ-0003GO-SR
	for bug-cppi@gnu.org; Thu, 20 Sep 2012 08:27:06 -0400
Received: from mx.meyering.net ([88.168.87.75]:50370)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1TEfqJ-0003GD-Fh
	for bug-cppi@gnu.org; Thu, 20 Sep 2012 08:26:55 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id DE66D600A8
	for <bug-cppi@gnu.org>; Thu, 20 Sep 2012 14:26:54 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: bug-cppi@gnu.org
Date: Thu, 20 Sep 2012 14:26:54 +0200
Message-ID: <874nmsdgmp.fsf@rho.meyering.net>
Lines: 352
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Subject: [bug-cppi] [PATCH] build: move non-recursive-gnulib-prefix-hack to
	gnulib; update
X-BeenThere: bug-cppi@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <bug-cppi.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-cppi>,
	<mailto:bug-cppi-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-cppi>
List-Post: <mailto:bug-cppi@gnu.org>
List-Help: <mailto:bug-cppi-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-cppi>,
	<mailto:bug-cppi-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 20 Sep 2012 12:27:11 -0000

FYI,

>From 8e4efc80286063eb9dee0c9b89a2fda571dd8b8d Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Thu, 20 Sep 2012 14:11:16 +0200
Subject: [PATCH] build: move non-recursive-gnulib-prefix-hack to gnulib;
 update

* gl/build-aux/prefix-gnulib-mk: Remove file.
* gl/m4/non-recursive-gnulib-prefix-hack.m4: Remove file.
* gl/modules/non-recursive-gnulib-prefix-hack: Remove file.
* gnulib: Update to latest.
---
 gl/build-aux/prefix-gnulib-mk               | 243 ----------------------------
 gl/m4/non-recursive-gnulib-prefix-hack.m4   |  35 ----
 gl/modules/non-recursive-gnulib-prefix-hack |  25 ---
 gnulib                                      |   2 +-
 4 files changed, 1 insertion(+), 304 deletions(-)
 delete mode 100755 gl/build-aux/prefix-gnulib-mk
 delete mode 100644 gl/m4/non-recursive-gnulib-prefix-hack.m4
 delete mode 100644 gl/modules/non-recursive-gnulib-prefix-hack

diff --git a/gl/build-aux/prefix-gnulib-mk b/gl/build-aux/prefix-gnulib-mk
deleted file mode 100755
index f0806d7..0000000
--- a/gl/build-aux/prefix-gnulib-mk
+++ /dev/null
@@ -1,243 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}'
-  & eval 'exec perl -wS "$0" $argv:q'
-    if 0;
-
-use strict;
-use IO::File;
-use Getopt::Long;
-use File::Basename; # for dirname
-
-my $VERSION = '2012-01-21 17:13'; # UTC
-(my $ME = $0) =~ s|.*/||;
-
-my $prefix;
-my $lib_name;
-
-sub usage ($)
-{
-  my ($exit_code) = @_;
-  my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR);
-  if ($exit_code != 0)
-    {
-      print $STREAM "Try '$ME --help' for more information.\n";
-    }
-  else
-    {
-      print $STREAM <<EOF;
-Usage: $ME --lib-name=NAME FILE
-   or: $ME [--help|--version]
-Rewrite a gnulib-tool-generated FILE like lib/gnulib.mk to work with
-automake's subdir-objects.
-
-OPTIONS:
-
-This option must be specified:
-
-   --lib-name=NAME    library name, often "lib\$project"
-
-The following are optional:
-
-   --help             display this help and exit
-   --version          output version information and exit
-
-EOF
-    }
-  exit $exit_code;
-}
-
-# contents ($FILE_NAME)
-# ---------------------
-sub contents ($)
-{
-  my ($file) = @_;
-  local $/;                     # Turn on slurp-mode.
-  my $f = new IO::File "< $file" or die "$file";
-  my $contents = $f->getline or die "$file";
-  $f->close;
-  return $contents;
-}
-
-# prefix_word ($WORD)
-# -------------------
-# Do not prefix special words such as variable dereferences.  Also,
-# "Makefile" is really "Makefile", since precisely there is no
-# lib/Makefile.
-sub prefix_word ($)
-{
-  local ($_) = @_;
-  $_ = $prefix . $_
-    unless (/^-/ || m{^\$\(\w+\)} || $_ eq "Makefile" || $_ eq '\\'
-            || $_ eq '@ALLOCA@');
-  return $_;
-}
-
-
-# prefix_words ($TEXT)
-# --------------------
-sub prefix_words ($)
-{
-  local ($_) = @_;
-  s{(\S+)}{prefix_word($1)}gem;
-  return $_;
-}
-
-
-# prefix_assignment ($LHS-AND-ASSIGN-OP, $RHS)
-# --------------------------------------------
-sub prefix_assignment ($$)
-{
-  my ($lhs_and_assign_op, $rhs) = @_;
-  my $res;
-
-  # Some variables are initialized by gnulib.mk, and we don't want
-  # that.  Change '=' to '+='.
-  if ($lhs_and_assign_op =~ /^GPERF =$/)
-    {
-      # Do not change the RHS, which specifies the GPERF program.
-    }
-  elsif ($lhs_and_assign_op =~
-      /^(SUBDIRS|EXTRA_DIST|BUILT_SOURCES|SUFFIXES|MOSTLYCLEANFILES
-         |CLEANFILES|DISTCLEANFILES|MAINTAINERCLEANFILES|AM_CFLAGS
-         |AM_CPPFLAGS|AM_GNU_GETTEXT)\ =/x)
-    {
-      $lhs_and_assign_op =~ s/=/+=/;
-    }
-  # We don't want to inherit gnulib's AUTOMAKE_OPTIONS, comment them.
-  elsif ($lhs_and_assign_op =~ /^AUTOMAKE_OPTIONS =/)
-    {
-      $lhs_and_assign_op =~ s/^/# /;
-    }
-  elsif ($lhs_and_assign_op =~ /^SUFFIXES /)
-    {
-      # Elide any SUFFIXES assignment or concatenation.
-      $lhs_and_assign_op =~ s/^/# /;
-    }
-  # The words are (probably) paths to files in lib/: prefix them.
-  else
-    {
-      $rhs = prefix_words($rhs)
-    }
-
-  # Variables which name depend on the location: libbison_a_SOURCES =>
-  # lib_libbison_a_SOURCES.
-  $lhs_and_assign_op =~ s/($lib_name)/lib_$1/g;
-
-  return $lhs_and_assign_op . $rhs;
-}
-
-# prefix $CONTENTS
-# ----------------
-# $CONTENTS is a Makefile content.  Post-process it so that each file-name
-# is prefixed with $prefix (e.g., "lib/").
-#
-# Relies heavily on the regularity of the file generated by gnulib-tool.
-sub prefix ($)
-{
-  # Work on $_.
-  local ($_) = @_;
-
-  # Prefix all the occurrence of files in rules.  If there is nothing
-  # after in the :, it's probably a phony target, or a suffix rule.
-  # Don't touch it.
-  s{^([-\w+/]+\.[-\w.]+ *: *\S.*)$}
-   {prefix_words($1)}gem;
-
-  # Prefix files in variables.
-  s{^([\w.]+\s*\+?=)(.*)$}
-   {prefix_assignment($1, $2)}gem;
-
-  # These three guys escape all the other regular rules.
-  s{(charset\.alias|ref-add\.sed|ref-del\.sed)}{$prefix$1}g;
-  # Unfortunately, as a result we sometimes have lib/lib.
-  s{($prefix){2}}{$1}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;
-
-  # $(srcdir)/ is actually $(top_srcdir)/$prefix/.
-  # The trailing slash is required to avoid matching this rule:
-  #   test '$(srcdir)' = . || rm -f $(top_builddir)/GNUmakefile
-  s{\$\(srcdir\)/}{\$(top_srcdir)/$prefix}g;
-
-  # Sometimes, t-$@ is used instead of $@-t, which, of course, does
-  # not work when we have a $@ with a directory in it.
-  s{t-\$\@}{\$\@-t}g;
-
-  # Some AC_SUBST patterns remain and would better be Make macros.
-  s{\@(MKDIR_P)\@}{\$($1)}g;
-
-  # Adjust paths in mkdir.
-  s{(\$\(MKDIR_P\))\s*(\w+)}{$1 $prefix$2}g;
-
-  return $_;
-}
-
-# process ($IN)
-# -------------
-sub process ($)
-{
-  my ($file) = @_;
-  my ($bak) = "$file.bak";
-  rename ($file, $bak) or die;
-  my $contents = contents ($bak);
-  $contents = prefix ($contents);
-  my $out = new IO::File(">$file") or die;
-  print $out $contents;
-}
-
-{
-  GetOptions
-    (
-     'lib-name=s' => \$lib_name,
-     help => sub { usage 0 },
-     version => sub { print "$ME version $VERSION\n"; exit },
-    ) or usage 1;
-
-  my $fail = 0;
-  defined $lib_name
-    or (warn "$ME: no library name; use --lib-name=NAME\n"), $fail = 1;
-
-  # There must be exactly one argument.
-  @ARGV == 0
-    and (warn "$ME: missing FILE argument\n"), $fail = 1;
-  1 < @ARGV
-    and (warn "$ME: too many arguments:\n", join ("\n", @ARGV), "\n"),
-      $fail = 1;
-  $fail
-    and usage 1;
-
-  my $file = $ARGV[0];
-  $prefix = (dirname $file) . '/';
-  warn "prefix=$prefix\n";
-
-  process $file;
-}
-
-### Setup "GNU" style for perl-mode and cperl-mode.
-## Local Variables:
-## perl-indent-level: 2
-## perl-continued-statement-offset: 2
-## perl-continued-brace-offset: 0
-## perl-brace-offset: 0
-## perl-brace-imaginary-offset: 0
-## perl-label-offset: -2
-## cperl-indent-level: 2
-## cperl-brace-offset: 0
-## cperl-continued-brace-offset: 0
-## cperl-label-offset: -2
-## cperl-extra-newline-before-brace: t
-## cperl-merge-trailing-else: nil
-## cperl-continued-statement-offset: 2
-## eval: (add-hook 'write-file-hooks 'time-stamp)
-## time-stamp-start: "my $VERSION = '"
-## time-stamp-format: "%:y-%02m-%02d %02H:%02M"
-## time-stamp-time-zone: "UTC"
-## time-stamp-end: "'; # UTC"
-## End:
diff --git a/gl/m4/non-recursive-gnulib-prefix-hack.m4 b/gl/m4/non-recursive-gnulib-prefix-hack.m4
deleted file mode 100644
index aeb0cc4..0000000
--- a/gl/m4/non-recursive-gnulib-prefix-hack.m4
+++ /dev/null
@@ -1,35 +0,0 @@
-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.
-
-dnl gl_NON_RECURSIVE_GNULIB_PREFIX_HACK LIB_DIR
-dnl Adjust configure-set $gl_LIBOBJS and each AC_SUBST'd *_H variable
-dnl with a value ending in ".h" to reflect that these files are located
-dnl in the directory specified by LIB_DIR.
-AC_DEFUN([gl_NON_RECURSIVE_GNULIB_PREFIX_HACK],
-[
-  # Tell AC_LIBSOURCES where to find source files like alloca.c.
-  AC_CONFIG_LIBOBJ_DIR([lib])
-
-  # This hack originated in bison.  It is required when using non-recursive
-  # automake rules to build from gnulib-provided lib/ sources.  Hence, LIB_DIR
-  # is usually simply "lib".  Those rules use the list of names like "fchdir.o"
-  # and "strstr.o" in gl_LIBOBJS.  With non-recursive make, we must prefix each
-  # such file name with the "lib/" prefix.  See also build-aux/prefix-gnulib-mk.
-  gl_LIBOBJS=`echo "$gl_LIBOBJS" | sed -e 's, , $1/,g'`
-
-  # Listing the names of the variables to prefix is error-prone.
-  # Rather, adjust each AC_SUBST'd variable whose name ends in '_H'
-  # and whose value ends in '.h'.
-  for ac_var in $ac_subst_vars
-  do
-    eval "ac_val=\$$ac_var"
-    case $ac_var:$ac_val in
-      (*_H:*.h) eval "$ac_var=$1/\$$ac_var";;
-    esac
-  done
-
-  # If $ALLOCA is not empty, prefix its value with "lib/".
-  test -n "$ALLOCA" && ALLOCA="lib/$ALLOCA"
-])
diff --git a/gl/modules/non-recursive-gnulib-prefix-hack b/gl/modules/non-recursive-gnulib-prefix-hack
deleted file mode 100644
index 26cd914..0000000
--- a/gl/modules/non-recursive-gnulib-prefix-hack
+++ /dev/null
@@ -1,25 +0,0 @@
-Description:
-Compute a good buffer size for dealing with two files.
-
-Files:
-build-aux/prefix-gnulib-mk
-m4/non-recursive-gnulib-prefix-hack.m4
-
-Depends-on:
-
-configure.ac:
-dnl Run our hack near the end, just before config.status creation.
-dnl It must happen late, i.e., after gl_LIBOBJS has been finalized.
-AC_CONFIG_COMMANDS_PRE([
-  gl_NON_RECURSIVE_GNULIB_PREFIX_HACK([lib])
-  ])
-
-Makefile.am:
-
-Include:
-
-License:
-unlimited
-
-Maintainer:
-Jim Meyering
diff --git a/gnulib b/gnulib
index 3ff028f..0e9bac3 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 3ff028fd56c2aa14ce5e380e81b91e27a0bf8e2c
+Subproject commit 0e9bac3a27f8e956911b787329bec6bf81d9c004
--
1.7.12.1.382.gb0576a6


From MAILER-DAEMON Mon Sep 24 05:44:07 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TG5Cx-0007s9-Uq
	for mharc-bug-cppi@gnu.org; Mon, 24 Sep 2012 05:44:07 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51988)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim.demaille@gmail.com>) id 1TG5Cq-0007rJ-SE
	for bug-cppi@gnu.org; Mon, 24 Sep 2012 05:44:06 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <akim.demaille@gmail.com>) id 1TG5Cq-0002ru-0A
	for bug-cppi@gnu.org; Mon, 24 Sep 2012 05:44:00 -0400
Received: from mail-we0-f169.google.com ([74.125.82.169]:59970)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <akim.demaille@gmail.com>) id 1TG5Cp-0002rq-QO
	for bug-cppi@gnu.org; Mon, 24 Sep 2012 05:43:59 -0400
Received: by weyu3 with SMTP id u3so1812769wey.0
	for <bug-cppi@gnu.org>; Mon, 24 Sep 2012 02:43:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=subject:mime-version:content-type:from:in-reply-to:date:cc
	:content-transfer-encoding:message-id:references:to:x-mailer;
	bh=MZL0gMQmMtqKkcLfWGFIHAlRKysMYTLnOui746GTDUk=;
	b=d+CcJbNsKHl25VhNxjRsAuAjsr8NLPMi3sAc48t+jHZ1ivCopWBaW/Ih+PtPYfHgW+
	gsNur3ywleRotd8YwKd05/p7SGv4QSDIf4sL2gk6IavuQHttfZYSGzRmVz0s7x7QeHFe
	3T7XZbDPsC6yCFUCP4mGE3Jl0Rj8FXtyb+ly3s391LEsYDehfn7LuTV35gW0ZDqBpYnG
	zhknNOWFuVIP56Ztch/ASL/3fgq20G/pRuDvmgPL4OeZmCeTpaQMyFdOE5w4D32wiC81
	LTn80XRpyk2vPqUa2YHWAW0JkeQVPH0ZEcqJ07uuPDwfHN71KrT67o2tXZVqLidVhN1X
	VJ3A==
Received: by 10.217.2.146 with SMTP id p18mr7451713wes.224.1348479838953;
	Mon, 24 Sep 2012 02:43:58 -0700 (PDT)
Received: from erebus.lrde.epita.fr (sao-paulo.lrde.epita.fr. [163.5.55.1])
	by mx.google.com with ESMTPS id dm3sm15851391wib.3.2012.09.24.02.43.57
	(version=TLSv1/SSLv3 cipher=OTHER);
	Mon, 24 Sep 2012 02:43:57 -0700 (PDT)
Mime-Version: 1.0 (Apple Message framework v1283)
Content-Type: text/plain; charset=iso-8859-1
From: Akim Demaille <akim.demaille@gmail.com>
In-Reply-To: <87fw6ddsuu.fsf@rho.meyering.net>
Date: Mon, 24 Sep 2012 11:43:56 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <8C9C2470-6923-4628-BE60-ECD2CF6926C7@gmail.com>
References: <87fw6dhprh.fsf@rho.meyering.net>
	<1C15FF5B-912C-4F4C-BA11-9A8F34B8BDB7@gmail.com>
	<87fw6ddsuu.fsf@rho.meyering.net>
To: Jim Meyering <jim@meyering.net>
X-Mailer: Apple Mail (2.1283)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.169
Cc: bug-cppi@gnu.org
Subject: Re: [bug-cppi] [PATCH 1/3] build: use new gnulib module:
	non-recursive-gnulib-prefix-hack
X-BeenThere: bug-cppi@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <bug-cppi.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-cppi>,
	<mailto:bug-cppi-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-cppi>
List-Post: <mailto:bug-cppi@gnu.org>
List-Help: <mailto:bug-cppi-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-cppi>,
	<mailto:bug-cppi-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 24 Sep 2012 09:44:06 -0000

Hi Jim,

Le 20 sept. 2012 =E0 10:02, Jim Meyering a =E9crit :

>>> 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.
>>=20
>> I don't understand well the preference of dnl over #, but that =
doesn't
>> matter.
>=20
> Using "dnl" is slightly better there, because dnl-commented lines
> don't end up in configure.

Anything outside the body of macro is never put in configure.
Using "dnl", "#", or nothing at all, is just a matter of style
(when there are no expansion of course).

And for comments, "#" is more traditional, but that's a question
of taste, I agree.  Well, not only: more tools know how to M-q
or fontify #-comments than dnl-comments.



