GNU bug report logs - #7671
Presetting various *CLEANFILES variables

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: automake; Severity: wishlist; Reported by: Behdad Esfahbod <behdad@HIDDEN>; dated Sat, 18 Dec 2010 00:50:02 UTC; Maintainer for automake is bug-automake@HIDDEN.
Severity set to 'wishlist' from 'normal' Request was from Stefano Lattarini <stefano.lattarini@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 7671 <at> debbugs.gnu.org:


Received: (at 7671) by debbugs.gnu.org; 20 Dec 2010 20:46:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 20 15:46:59 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1PUmdG-0007ZU-Kx
	for submit <at> debbugs.gnu.org; Mon, 20 Dec 2010 15:46:58 -0500
Received: from mail-qw0-f44.google.com ([209.85.216.44])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <behdad.esfahbod@HIDDEN>) id 1PUmdE-0007ZI-FF
	for 7671 <at> debbugs.gnu.org; Mon, 20 Dec 2010 15:46:57 -0500
Received: by qwg5 with SMTP id 5so3153327qwg.3
	for <7671 <at> debbugs.gnu.org>; Mon, 20 Dec 2010 12:53:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:sender:message-id:date:from
	:user-agent:mime-version:to:cc:subject:references:in-reply-to
	:x-enigmail-version:content-type:content-transfer-encoding;
	bh=olJzwmPec69Gf7G2VdGqjN21IbwIpxMFChL13lJkByk=;
	b=NnLJoYF8h4sK/176ktEmblLR0nx1jp5ol29XkBeVZMrC0eLRJQ+U6zyAmGJHXBxleI
	TkLtrs+ViM64ZD2PLNxnxEOp6Fm/6ii5MpzRkdVpPwRFWMytiHKNhscOp8O8Nc9/4M0t
	rPouStuAc/3xNbjkhyCR4dhTm+nUh7I+97QKI=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject
	:references:in-reply-to:x-enigmail-version:content-type
	:content-transfer-encoding;
	b=a9SrVpaI+11mlCL//ycT9651leJApvMdElGPhn4mFitomXXBUBRUgK/hh0zIOmB0ru
	36K+iyBwj/PvTdh+y9vsRVit3b860gihKTLkZdbjL94SlZ4zpBjOHZv4VNXcE1o0gJ/W
	F6raTrgjODMKW+uR1h2Hbox4cA7uX6uPzNjvw=
Received: by 10.229.229.18 with SMTP id jg18mr2944421qcb.276.1292878406456;
	Mon, 20 Dec 2010 12:53:26 -0800 (PST)
Received: from [172.26.50.10] ([72.14.228.1])
	by mx.google.com with ESMTPS id nb15sm1523400qcb.38.2010.12.20.12.53.24
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Mon, 20 Dec 2010 12:53:24 -0800 (PST)
Message-ID: <4D0FC243.7080709@HIDDEN>
Date: Mon, 20 Dec 2010 15:53:23 -0500
From: Behdad Esfahbod <behdad@HIDDEN>
User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US;
	rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: Ralf Wildenhues <Ralf.Wildenhues@HIDDEN>
Subject: Re: bug#7671: Presetting various *CLEANFILES variables
References: <4CA4DCAB.2050209@HIDDEN> <4D0C067A.2040904@HIDDEN>
	<20101219114353.GG7020@HIDDEN>
In-Reply-To: <20101219114353.GG7020@HIDDEN>
X-Enigmail-Version: 1.1.1
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -4.8 (----)
X-Debbugs-Envelope-To: 7671
Cc: 7671 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.5 (----)

On 12/19/10 06:43, Ralf Wildenhues wrote:
> What you can do now is either
> - require your users to pre-initialize variables, or
> - ship a header fragment to be included first, that sets the needed
>   variables.

Yeah, that's what we currently do in a few occasions, but I can't sell that to
others when they can remove files in *clean-local targets without such
conditions imposed on their users.

That said, your concerns are real.  I let you guys decide if you want to close
this WONTFIX or address it some other way.

Cheers,
behdad




Information forwarded to owner <at> debbugs.gnu.org, bug-automake@HIDDEN:
bug#7671; Package automake. Full text available.

Message received at 7671 <at> debbugs.gnu.org:


Received: (at 7671) by debbugs.gnu.org; 19 Dec 2010 11:37:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 19 06:37:33 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1PUHZz-0000Pa-Rz
	for submit <at> debbugs.gnu.org; Sun, 19 Dec 2010 06:37:32 -0500
Received: from mailout-de.gmx.net ([213.165.64.22] helo=mail.gmx.net)
	by debbugs.gnu.org with smtp (Exim 4.69)
	(envelope-from <Ralf.Wildenhues@HIDDEN>) id 1PUHZw-0000PL-Es
	for 7671 <at> debbugs.gnu.org; Sun, 19 Dec 2010 06:37:29 -0500
Received: (qmail invoked by alias); 19 Dec 2010 11:43:53 -0000
Received: from xdsl-89-0-87-89.netcologne.de (EHLO localhost.localdomain)
	[89.0.87.89]
	by mail.gmx.net (mp022) with SMTP; 19 Dec 2010 12:43:53 +0100
X-Authenticated: #13673931
X-Provags-ID: V01U2FsdGVkX1+uBjoa7K6uCqlKFMakhYrYXrq4u6iThp932gamMk
	EmzmlJAW0hcokC
Received: from ralf by localhost.localdomain with local (Exim 4.69)
	(envelope-from <Ralf.Wildenhues@HIDDEN>)
	id 1PUHgA-0002Hj-19; Sun, 19 Dec 2010 12:43:54 +0100
Date: Sun, 19 Dec 2010 12:43:54 +0100
From: Ralf Wildenhues <Ralf.Wildenhues@HIDDEN>
To: Behdad Esfahbod <behdad@HIDDEN>
Subject: Re: bug#7671: Presetting various *CLEANFILES variables
Message-ID: <20101219114353.GG7020@HIDDEN>
References: <4CA4DCAB.2050209@HIDDEN>
 <4D0C067A.2040904@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4D0C067A.2040904@HIDDEN>
Organization: Institute for Numerical Simulation, University of Bonn
User-Agent: Mutt/1.5.20 (2010-08-04)
X-Y-GMX-Trusted: 0
X-Spam-Score: -2.7 (--)
X-Debbugs-Envelope-To: 7671
Cc: 7671 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.7 (--)

Hello Behdad, and thanks for the bug report,

* Behdad Esfahbod wrote on Sat, Dec 18, 2010 at 01:55:22AM CET:
> If instead automake was changed to always pre-initialize *CLEANFILES
> variables, all snippets could just append to do variables and my git.mk
> snippet would be more generic and much more simpler at the same time.

What you can do now is either
- require your users to pre-initialize variables, or
- ship a header fragment to be included first, that sets the needed
  variables.

Your proposed change would break typo detection, if we allowed += for
all unset variables.  The question is whether typo detection is worth
it.  If we only do it for *CLEANFILES variables, that would be very
inconsistent.  Users have the same problems with lots of other variables
(EXTRA_DIST, SUFFIXES, SUBDIRS, etc, the list is not stable; see for
example gnulib/gnulib-tool for others).  They would not be helped, while
at the same time Automake semantics becomes harder to grasp.

There are more subtle issues with conditionals and with variables that
are already set by automake or that are AC_SUBSTed from configure.ac; in
fact, most of all the uniqe/once-only/override warning machinery is to
disallow ambiguities in these cases.

For example, automake sets DIST_COMMON, an internal variable.  Assume
the user writes
  DIST_COMMON += foo

Should that add to the automake-given list?  I would guess so.  But what
about the following (assuming AC_SUBST([substed])):
  foo = foo

  if COND1
    foo = bar
    substed = bar
    DIST_COMMON = bar
  else
    foo += baz
    substed += baz
    DIST_COMMON += baz
  endif

The expectation again is clear, and for 'foo' things work out, but it is
not possible to realize for substed with the current implementation where
AC_SUBST([substed]) generates a single
  substed = @substed@

line in Makefile.in.  It might be fixable, but I haven't looked into it
and assume that at least the disjoint-condition handling may turn out
ugly.

Cheers,
Ralf




Information forwarded to owner <at> debbugs.gnu.org, bug-automake@HIDDEN:
bug#7671; Package automake. Full text available.

Message received at 7671 <at> debbugs.gnu.org:


Received: (at 7671) by debbugs.gnu.org; 19 Dec 2010 09:45:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 19 04:45:06 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1PUFpC-0006Om-BH
	for submit <at> debbugs.gnu.org; Sun, 19 Dec 2010 04:45:06 -0500
Received: from mail-iw0-f172.google.com ([209.85.214.172])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <behdad.esfahbod@HIDDEN>) id 1PUFpA-0006O4-BQ
	for 7671 <at> debbugs.gnu.org; Sun, 19 Dec 2010 04:45:04 -0500
Received: by iwn40 with SMTP id 40so2216134iwn.3
	for <7671 <at> debbugs.gnu.org>; Sun, 19 Dec 2010 01:51:30 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:sender:message-id:date:from
	:user-agent:mime-version:to:cc:subject:references:in-reply-to
	:x-enigmail-version:content-type:content-transfer-encoding;
	bh=92iC/LbXOOa0+ZVk+15Dez9lDvyv3mwPGGkEDxYc8GM=;
	b=TnNB5GDuxDZQvFSLxCqF282PJ7jVJPCxeJNs97ZgUTinLdofkzCBCZO2jPXTATwN5a
	Tlj9X5PeG4ou7LlIEoGpbpdI0Y3zqZvRqUt6AL5tMLyQKaMgfppIAAFWTU+9aEEtMJIE
	dzJWV41GAWNhieD9657bMq+hygnBw+L5dbrcE=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject
	:references:in-reply-to:x-enigmail-version:content-type
	:content-transfer-encoding;
	b=V5rfG1TciPE8oH+u1qUCJ5RWTNr73qcgSHypvoFk0oXiQQg8YETHtN5Us5s7EbkXZU
	43LgB8Fe2enVoK4hXz4M4oSvczapqlXQcBLFTymfd+KSrp1WbXNnwhy/ERBmUkQjEzxZ
	2XBom9r2coHyiKqYLTyhdP5gqLMALhpYV6f1c=
Received: by 10.42.167.71 with SMTP id r7mr2918457icy.220.1292752290373;
	Sun, 19 Dec 2010 01:51:30 -0800 (PST)
Received: from [192.168.190.115] (69-165-131-36.dsl.teksavvy.com
	[69.165.131.36])
	by mx.google.com with ESMTPS id d21sm2304487ibg.9.2010.12.19.01.51.28
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Sun, 19 Dec 2010 01:51:29 -0800 (PST)
Message-ID: <4D0DD5A1.8040001@HIDDEN>
Date: Sun, 19 Dec 2010 04:51:29 -0500
From: Behdad Esfahbod <behdad@HIDDEN>
User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US;
	rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: Stefano Lattarini <stefano.lattarini@HIDDEN>
Subject: Re: bug#7671: Presetting various *CLEANFILES variables
References: <4CA4DCAB.2050209@HIDDEN> <4D0C067A.2040904@HIDDEN>
	<201012181102.46272.stefano.lattarini@HIDDEN>
In-Reply-To: <201012181102.46272.stefano.lattarini@HIDDEN>
X-Enigmail-Version: 1.1.1
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -4.2 (----)
X-Debbugs-Envelope-To: 7671
Cc: 7671 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.1 (----)

Hi Stefano,

Thanks for the prompt reply.

On 12/18/10 05:02, Stefano Lattarini wrote:

> Note that the *CLEANFILES variables cannot be used to remove directories,
> so, for your approach to be really useful in all cases (i.e. also be able
> to git-ignore generated directories easily), a similar set of *CLEANDIRS
> variables would be needed.

Good point.  I didn't think about that.


> And IMHO adding them would be a good idea regardless of your particular
> use case.

Agreed.


>> If instead automake was changed to always pre-initialize *CLEANFILES
>> variables, all snippets could just append to do variables and my git.mk
>> snippet would be more generic and much more simpler at the same time.
>> So I want to suggest that automake be changed to initialized *CLEANFILES
>> if the Makefile.am doesn't initialize them explicitly.
>>
> If the change you propose can be implemented without breaking backward
> compatibility (and I think it probably can), then I'm all in favor of it.
> 
> I'd like to hear Ralf's opinion on this before taking any further
> action, though.

Indeed.

Cheers,
behdad


>> In another note, if that change is made and my git.mk simplified to not have
>> tool-specific logic in it, it would be a great addition to automake itself.
>>
>> Cheers,
>> behdad
>>
> 
> Thanks,
>    Stefano
> 




Information forwarded to owner <at> debbugs.gnu.org, bug-automake@HIDDEN:
bug#7671; Package automake. Full text available.

Message received at 7671 <at> debbugs.gnu.org:


Received: (at 7671) by debbugs.gnu.org; 18 Dec 2010 09:56:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 18 04:56:38 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1PTtWn-00071M-VK
	for submit <at> debbugs.gnu.org; Sat, 18 Dec 2010 04:56:38 -0500
Received: from mail-ww0-f46.google.com ([74.125.82.46])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <stefano.lattarini@HIDDEN>) id 1PTtWl-000718-Cl
	for 7671 <at> debbugs.gnu.org; Sat, 18 Dec 2010 04:56:36 -0500
Received: by wwj40 with SMTP id 40so1528540wwj.15
	for <7671 <at> debbugs.gnu.org>; Sat, 18 Dec 2010 02:02:58 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:from:to:subject:date
	:user-agent:cc:references:in-reply-to:mime-version:content-type
	:content-transfer-encoding:message-id;
	bh=Is3+9M7DFAfQ4AeR+FRr4AEkuz8N9ZEwtZ1NscZel5A=;
	b=p2rusFypWcbT46xIjnJ48xLcS6NzXD4xL2E4aQlIhrjNBjRrOkoFz5FiS+LFSyam/y
	ZXyMM/2+N6Str7amh+f64BXCT7DJOCm61wTTcMw4ZwH6PKejC17dkUz8LtMtCLzusl1e
	FUotMNLE8pkom75HCx6ihXa2fOvn6lzuRZhqU=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=from:to:subject:date:user-agent:cc:references:in-reply-to
	:mime-version:content-type:content-transfer-encoding:message-id;
	b=xt/8TFkAdlRn9JS9BoLLVL8zR+tBlaLlutnRuIIcaiCxxJ6vkry2dBBZ/TUXhoMzMQ
	gHrSQVdL7hISi21MYMs2z58atzsfPkkEuGOxgDbSEZU0tJrPohrEydqrrmGVvFIrp3jo
	slguY+7KL34T1qufzN1R/Ho9IaxyabaQFy9/o=
Received: by 10.216.168.82 with SMTP id j60mr5071252wel.47.1292666576704;
	Sat, 18 Dec 2010 02:02:56 -0800 (PST)
Received: from bigio.localnet
	(host105-53-dynamic.48-82-r.retail.telecomitalia.it [82.48.53.105])
	by mx.google.com with ESMTPS id m6sm677180wej.34.2010.12.18.02.02.54
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Sat, 18 Dec 2010 02:02:55 -0800 (PST)
From: Stefano Lattarini <stefano.lattarini@HIDDEN>
To: Behdad Esfahbod <behdad@HIDDEN>
Subject: Re: bug#7671: Presetting various *CLEANFILES variables
Date: Sat, 18 Dec 2010 11:02:45 +0100
User-Agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )
References: <4CA4DCAB.2050209@HIDDEN> <4D0C067A.2040904@HIDDEN>
In-Reply-To: <4D0C067A.2040904@HIDDEN>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-Id: <201012181102.46272.stefano.lattarini@HIDDEN>
X-Spam-Score: -3.3 (---)
X-Debbugs-Envelope-To: 7671
Cc: 7671 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.3 (---)

On Saturday 18 December 2010, Behdad Esfahbod wrote:
> Hi,
>
Hello Behdad.

> Currently, automake doesn't set any of the various *CLEANFILES variables.
> Since the "+=" syntax is not portable when the variables are not initialized
> (and causes an automake warning), this leaves no option for Makefile.am
> snippets from various tools other than using the *clean-local targets to do
> their cleanups.  The problem with this is that it's imperative as opposed to
> declarative.
>
I agree this might be quite annoying sometimes.

> I've been maintaining a pieces of Makefile.am snippet called git.mk:
> 
>   http://git.gnome.org/browse/pango/tree/git.mk
> 
> What it does is to generate .gitignore files based on what "make
> maintainer-clean" removes.  However, because of the problem stated above,
> I cannot simply aggregate the various *CLEANFILES variables and also have
> to add support for individual tools (autoconf, automake, libtool, gtk-doc,
> gnome-doc-utils, mallard, intltool, and gsettings so far).
>
Note that the *CLEANFILES variables cannot be used to remove directories,
so, for your approach to be really useful in all cases (i.e. also be able
to git-ignore generated directories easily), a similar set of *CLEANDIRS
variables would be needed.

And IMHO adding them would be a good idea regardless of your particular
use case.

> If instead automake was changed to always pre-initialize *CLEANFILES
> variables, all snippets could just append to do variables and my git.mk
> snippet would be more generic and much more simpler at the same time.
> So I want to suggest that automake be changed to initialized *CLEANFILES
> if the Makefile.am doesn't initialize them explicitly.
>
If the change you propose can be implemented without breaking backward
compatibility (and I think it probably can), then I'm all in favor of it.

I'd like to hear Ralf's opinion on this before taking any further
action, though.

> In another note, if that change is made and my git.mk simplified to not have
> tool-specific logic in it, it would be a great addition to automake itself.
> 
> Cheers,
> behdad
> 

Thanks,
   Stefano




Information forwarded to owner <at> debbugs.gnu.org, bug-automake@HIDDEN:
bug#7671; Package automake. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 18 Dec 2010 00:49:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 17 19:49:18 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1PTkz0-0003cF-BU
	for submit <at> debbugs.gnu.org; Fri, 17 Dec 2010 19:49:18 -0500
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <behdad.esfahbod@HIDDEN>) id 1PTkyx-0003c1-Li
	for submit <at> debbugs.gnu.org; Fri, 17 Dec 2010 19:49:08 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <behdad.esfahbod@HIDDEN>) id 1PTl57-0005LL-LW
	for submit <at> debbugs.gnu.org; Fri, 17 Dec 2010 19:55:30 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	RCVD_IN_DNSWL_LOW, T_DKIM_INVALID,
	T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1
Received: from lists.gnu.org ([199.232.76.165]:46703)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <behdad.esfahbod@HIDDEN>) id 1PTl57-0005LH-JB
	for submit <at> debbugs.gnu.org; Fri, 17 Dec 2010 19:55:29 -0500
Received: from [140.186.70.92] (port=56091 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1PTl56-00022e-Ke
	for bug-automake@HIDDEN; Fri, 17 Dec 2010 19:55:29 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <behdad.esfahbod@HIDDEN>) id 1PTl55-0005Ki-AP
	for bug-automake@HIDDEN; Fri, 17 Dec 2010 19:55:28 -0500
Received: from mail-qw0-f41.google.com ([209.85.216.41]:56469)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <behdad.esfahbod@HIDDEN>) id 1PTl55-0005KY-5k
	for bug-automake@HIDDEN; Fri, 17 Dec 2010 19:55:27 -0500
Received: by qwa26 with SMTP id 26so1269335qwa.0
	for <bug-automake@HIDDEN>; Fri, 17 Dec 2010 16:55:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:sender:message-id:date:from
	:user-agent:mime-version:to:subject:references:in-reply-to
	:x-enigmail-version:content-type:content-transfer-encoding;
	bh=Ye7xtN5A/ngowv04IABV5EJ+iOug0Htj4FXfTb4Z/20=;
	b=m258OyxfyPOAvZAs6cUpsgj87suL7HUisZ76QXWwU3pUijXJzs/kffR8wIZ+K0wzux
	iFgC0UGCmHNzU70xHYZbPQ1OWOeso0vahzkLyuKr+nhhmhM4DFTGZmMw7e/hsENOnWc/
	znFas/bs0TEXZ3++iMy5fvFriiRe9pad4t2HY=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=sender:message-id:date:from:user-agent:mime-version:to:subject
	:references:in-reply-to:x-enigmail-version:content-type
	:content-transfer-encoding;
	b=j2HiFTODwQYNQ7p/4UfF1umdl8CA/7yRVMmYnQ9+i3SfdwMGodiFiuj8Hc67OUCa5U
	pSUoZlSUUd3fzCdKhnCl5LvdtfaYMI1iw2T3qjlXey32r34sDNFznByA+WoQNUJDfASd
	X30n1o0dfuRbyQlmuxXNTt6SX53szrMtIFPA0=
Received: by 10.229.95.81 with SMTP id c17mr1366548qcn.99.1292633724697;
	Fri, 17 Dec 2010 16:55:24 -0800 (PST)
Received: from [172.26.48.41] ([72.14.228.1])
	by mx.google.com with ESMTPS id q12sm553400qcu.6.2010.12.17.16.55.23
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Fri, 17 Dec 2010 16:55:23 -0800 (PST)
Message-ID: <4D0C067A.2040904@HIDDEN>
Date: Fri, 17 Dec 2010 19:55:22 -0500
From: Behdad Esfahbod <behdad@HIDDEN>
User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US;
	rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: bug-automake@HIDDEN
Subject: Presetting various *CLEANFILES variables
References: <4CA4DCAB.2050209@HIDDEN>
In-Reply-To: <4CA4DCAB.2050209@HIDDEN>
X-Enigmail-Version: 1.1.1
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Spam-Score: -5.9 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -5.9 (-----)

Hi,

Currently, automake doesn't set any of the various *CLEANFILES variables.
Since the "+=" syntax is not portable when the variables are not initialized
(and causes an automake warning), this leaves no option for Makefile.am
snippets from various tools other than using the *clean-local targets to do
their cleanups.  The problem with this is that it's imperative as opposed to
declarative.

I've been maintaining a pieces of Makefile.am snippet called git.mk:

  http://git.gnome.org/browse/pango/tree/git.mk

What it does is to generate .gitignore files based on what "make
maintainer-clean" removes.  However, because of the problem stated above, I
cannot simply aggregate the various *CLEANFILES variables and also have to add
support for individual tools (autoconf, automake, libtool, gtk-doc,
gnome-doc-utils, mallard, intltool, and gsettings so far).

If instead automake was changed to always pre-initialize *CLEANFILES
variables, all snippets could just append to do variables and my git.mk
snippet would be more generic and much more simpler at the same time.

So I want to suggest that automake be changed to initialized *CLEANFILES if
the Makefile.am doesn't initialize them explicitly.

In another note, if that change is made and my git.mk simplified to not have
tool-specific logic in it, it would be a great addition to automake itself.

Cheers,
behdad




Acknowledgement sent to Behdad Esfahbod <behdad@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-automake@HIDDEN. Full text available.
Report forwarded to owner <at> debbugs.gnu.org, bug-automake@HIDDEN:
bug#7671; Package automake. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.