GNU bug report logs - #7763
Remake rules botch up when 'foreign' and 'ignore-deps' are removed from AM_INIT_AUTOMAKE

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; Reported by: Stefano Lattarini <stefano.lattarini@HIDDEN>; Keywords: confirmed help; dated Thu, 30 Dec 2010 22:33:02 UTC; Maintainer for automake is bug-automake@HIDDEN.
Added tag(s) confirmed. Request was from Karl Berry <karl@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Added tag(s) help. Request was from Karl Berry <karl@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 7763) by debbugs.gnu.org; 2 Jan 2011 11:11:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 02 06:11:58 2011
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 1PZLqw-0001JS-1e
	for submit <at> debbugs.gnu.org; Sun, 02 Jan 2011 06:11:58 -0500
Received: from mailout-de.gmx.net ([213.165.64.23] helo=mail.gmx.net)
	by debbugs.gnu.org with smtp (Exim 4.69)
	(envelope-from <Ralf.Wildenhues@HIDDEN>) id 1PZLqt-0001JE-IC
	for 7763 <at> debbugs.gnu.org; Sun, 02 Jan 2011 06:11:57 -0500
Received: (qmail invoked by alias); 02 Jan 2011 11:18:57 -0000
Received: from xdsl-78-34-215-55.netcologne.de (EHLO localhost.localdomain)
	[78.34.215.55]
	by mail.gmx.net (mp009) with SMTP; 02 Jan 2011 12:18:57 +0100
X-Authenticated: #13673931
X-Provags-ID: V01U2FsdGVkX1/g+6AENKbg54diQi+GMU8ZTLbrHwbKmN87B1eymT
	F1/ewNxXeYdVHr
Received: from ralf by localhost.localdomain with local (Exim 4.69)
	(envelope-from <Ralf.Wildenhues@HIDDEN>)
	id 1PZLxg-0002m1-Fr; Sun, 02 Jan 2011 12:18:56 +0100
Date: Sun, 2 Jan 2011 12:18:56 +0100
From: Ralf Wildenhues <Ralf.Wildenhues@HIDDEN>
To: Stefano Lattarini <stefano.lattarini@HIDDEN>
Subject: Re: bug#7763: Remake rules botch up when 'foreign' and 'ignore-deps'
	are removed from AM_INIT_AUTOMAKE
Message-ID: <20110102111856.GE10365@HIDDEN>
References: <201012302338.46211.stefano.lattarini@HIDDEN>
	<20110102055013.GH19818@HIDDEN>
	<201101021200.57508.stefano.lattarini@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <201101021200.57508.stefano.lattarini@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: -3.4 (---)
X-Debbugs-Envelope-To: 7763
Cc: 7763 <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 (---)

* Stefano Lattarini wrote on Sun, Jan 02, 2011 at 12:00:56PM CET:
> On Sunday 02 January 2011, Ralf Wildenhues wrote:
> > Question is, does removing the arguments break other, legitimate uses?
> > Or was this functionality purely added at a time before automake could
> > trace configure.ac macros?
> >
> Well, the use of `--foreign' etc. in automake calls in rebuild rules
> was already in place at least in commit `Release-1-0-5-g415b068' of
> 10/06/1996 (back then, the option really used was the now-obsolete
> `--strictness=STRICTNESS-LEVEL').
> 
> Also, the use of `--ignore-deps' in automake calls in rebuild rules
> was added with commit `Release-1-1p-11-g27ccbf2' of 27/05/1997.
> 
> At the time those commits were done, no tracing of autoconf macros nor
> setting of automake options in AM_INIT_AUTOMAKE were available, and so
> the only way to enable a particular strictness and/or the option
> `no-dependencies' globally was to pass proper command line arguments
> to automake.

Thanks for the research.  It seems we should move away from this then.
Only thing I really wonder is why Alexandre (or Akim) didn't do that at
the time autoconf tracing started to be used.  It seems like such an
obvious move to make that it makes me unsure we're overlooking
something.

> > The tests might suffer from the trace caching bug as well, haven't
> > checked.
> >
> Am I missing something, or is this a quite serious bug of autom4te?

Well, it seems to work fine when we ensure configure.ac is strictly
newer than the files in autom4te.cache.  But I wanted to avoid sleeping.
So I tried --force, but that failed.  The two things I still need to
check are: do 'aclocal --force' and 'automake --force' need to pass
--force to 'autom4te --trace' resp. 'autoconf --trace' and do things
work out then?

Cheers,
Ralf




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

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


Received: (at 7763) by debbugs.gnu.org; 2 Jan 2011 10:54:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 02 05:54:08 2011
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 1PZLZf-0000wu-G8
	for submit <at> debbugs.gnu.org; Sun, 02 Jan 2011 05:54:07 -0500
Received: from mail-wy0-f172.google.com ([74.125.82.172])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <stefano.lattarini@HIDDEN>) id 1PZLZd-0000wR-Qh
	for 7763 <at> debbugs.gnu.org; Sun, 02 Jan 2011 05:54:06 -0500
Received: by wyf23 with SMTP id 23so13108154wyf.3
	for <7763 <at> debbugs.gnu.org>; Sun, 02 Jan 2011 03:01:08 -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=6W0dZo4RvVpWrHeUOajf4I3hT5MMIPF7bTd+5w6vPiU=;
	b=JdWDNnjj88p8WVPcPKCIenQ9zXFeg7FWfHBM1d62RhVBLkcq/axk3m9HvmMBVKBxfH
	bvMaS5tnbsl1BXP78cPIZe3htrMxsYBqqlaNiPX5R6Sy8b4mj0Fqz8OBICmwudnI0ufi
	+plPfltaLeOQNEoOpN2QstBEfvx36BUm7dyY0=
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=OlL6iZhFc2AI/+xQctnTBGN1kkg+GeGhRb13jbdJ8AOVRC4TpNbxfzZ/rrZmT5GuEn
	s8SGCP5MGuSBU8BRy5D3BeNDtTrZPwURZffF33AnN0zsgvv1nSD8XtO/fYrG7UChjnhy
	TJ2aomrdpQqkEebAd/5WuZ+H/X70LcemK8itA=
Received: by 10.227.155.138 with SMTP id s10mr11066645wbw.61.1293966067613;
	Sun, 02 Jan 2011 03:01:07 -0800 (PST)
Received: from bigio.localnet
	(host42-93-dynamic.15-87-r.retail.telecomitalia.it [87.15.93.42])
	by mx.google.com with ESMTPS id j49sm8001530wer.14.2011.01.02.03.01.06
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Sun, 02 Jan 2011 03:01:06 -0800 (PST)
From: Stefano Lattarini <stefano.lattarini@HIDDEN>
To: Ralf Wildenhues <Ralf.Wildenhues@HIDDEN>
Subject: Re: bug#7763: Remake rules botch up when 'foreign' and 'ignore-deps'
	are removed from AM_INIT_AUTOMAKE
Date: Sun, 2 Jan 2011 12:00:56 +0100
User-Agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )
References: <201012302338.46211.stefano.lattarini@HIDDEN>
	<20110102055013.GH19818@HIDDEN>
In-Reply-To: <20110102055013.GH19818@HIDDEN>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-Id: <201101021200.57508.stefano.lattarini@HIDDEN>
X-Spam-Score: -3.6 (---)
X-Debbugs-Envelope-To: 7763
Cc: 7763 <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.6 (---)

On Sunday 02 January 2011, Ralf Wildenhues wrote:
> Hello Stefano,
> 
> * Stefano Lattarini wrote on Thu, Dec 30, 2010 at 11:38:45PM CET:
> > Currently, the Automake-generated rebuild rules[1] invoke automake with
> > some command-line options derived from arguments given to AM_INIT_AUTOMAKE.
> > 
> > [1] For more info, see:
> >     <http://www.gnu.org/software/automake/manual/html_node/Rebuilding.html>
> > 
> > For example, putting `foreign' in AM_INIT_AUTOMAKE generates remake rules
> > that rebuild outdated Makefile.in files using "$(AUTOMAKE) --foreign";
> > similarly, `no-dependencies' in AM_INIT_AUTOMAKE generates remake rules
> > that rebuild outdated Makefile.in files using "$(AUTOMAKE) --ignore-deps".
> 
> I agree that this is a bug.
> 
> Question is, does removing the arguments break other, legitimate uses?
> Or was this functionality purely added at a time before automake could
> trace configure.ac macros?
>
Well, the use of `--foreign' etc. in automake calls in rebuild rules
was already in place at least in commit `Release-1-0-5-g415b068' of
10/06/1996 (back then, the option really used was the now-obsolete
`--strictness=STRICTNESS-LEVEL').

Also, the use of `--ignore-deps' in automake calls in rebuild rules
was added with commit `Release-1-1p-11-g27ccbf2' of 27/05/1997.

At the time those commits were done, no tracing of autoconf macros nor
setting of automake options in AM_INIT_AUTOMAKE were available, and so
the only way to enable a particular strictness and/or the option
`no-dependencies' globally was to pass proper command line arguments
to automake.

> The tests might suffer from the trace caching bug as well, haven't
> checked.
>
Am I missing something, or is this a quite serious bug of autom4te?

Thanks,
   Stefano




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

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


Received: (at 7763) by debbugs.gnu.org; 2 Jan 2011 05:43:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 02 00:43:15 2011
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 1PZGip-0002tU-Ad
	for submit <at> debbugs.gnu.org; Sun, 02 Jan 2011 00:43:15 -0500
Received: from mailout-de.gmx.net ([213.165.64.23] helo=mail.gmx.net)
	by debbugs.gnu.org with smtp (Exim 4.69)
	(envelope-from <Ralf.Wildenhues@HIDDEN>) id 1PZGim-0002tG-Bm
	for 7763 <at> debbugs.gnu.org; Sun, 02 Jan 2011 00:43:13 -0500
Received: (qmail invoked by alias); 02 Jan 2011 05:50:14 -0000
Received: from xdsl-78-35-55-111.netcologne.de (EHLO localhost.localdomain)
	[78.35.55.111]
	by mail.gmx.net (mp035) with SMTP; 02 Jan 2011 06:50:14 +0100
X-Authenticated: #13673931
X-Provags-ID: V01U2FsdGVkX1+3QOtybRm3kDaNosL35j7q0miY4vn1UY4+u6D152
	QhRKtBB8hY8hg/
Received: from ralf by localhost.localdomain with local (Exim 4.69)
	(envelope-from <Ralf.Wildenhues@HIDDEN>)
	id 1PZGpZ-00012L-Pg; Sun, 02 Jan 2011 06:50:13 +0100
Date: Sun, 2 Jan 2011 06:50:13 +0100
From: Ralf Wildenhues <Ralf.Wildenhues@HIDDEN>
To: Stefano Lattarini <stefano.lattarini@HIDDEN>
Subject: Re: bug#7763: Remake rules botch up when 'foreign' and 'ignore-deps'
	are removed from AM_INIT_AUTOMAKE
Message-ID: <20110102055013.GH19818@HIDDEN>
References: <201012302338.46211.stefano.lattarini@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <201012302338.46211.stefano.lattarini@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.6 (--)
X-Debbugs-Envelope-To: 7763
Cc: 7763 <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.6 (--)

Hello Stefano,

* Stefano Lattarini wrote on Thu, Dec 30, 2010 at 11:38:45PM CET:
> Currently, the Automake-generated rebuild rules[1] invoke automake with
> some command-line options derived from arguments given to AM_INIT_AUTOMAKE.
> 
> [1] For more info, see:
>     <http://www.gnu.org/software/automake/manual/html_node/Rebuilding.html>
> 
> For example, putting `foreign' in AM_INIT_AUTOMAKE generates remake rules
> that rebuild outdated Makefile.in files using "$(AUTOMAKE) --foreign";
> similarly, `no-dependencies' in AM_INIT_AUTOMAKE generates remake rules
> that rebuild outdated Makefile.in files using "$(AUTOMAKE) --ignore-deps".

I agree that this is a bug.

Question is, does removing the arguments break other, legitimate uses?
Or was this functionality purely added at a time before automake could
trace configure.ac macros?

The tests might suffer from the trace caching bug as well, haven't
checked.

Thanks,
Ralf




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

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


Received: (at submit) by debbugs.gnu.org; 30 Dec 2010 22:32:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 30 17:32:08 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 1PYR2W-0003Qh-0Q
	for submit <at> debbugs.gnu.org; Thu, 30 Dec 2010 17:32:08 -0500
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <stefano.lattarini@HIDDEN>) id 1PYR2U-0003QG-GB
	for submit <at> debbugs.gnu.org; Thu, 30 Dec 2010 17:32:07 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@HIDDEN>) id 1PYR9C-0003OV-LQ
	for submit <at> debbugs.gnu.org; Thu, 30 Dec 2010 17:39:03 -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, RFC_ABUSE_POST, T_DKIM_INVALID,
	T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1
Received: from lists.gnu.org ([199.232.76.165]:51060)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@HIDDEN>) id 1PYR9C-0003OR-IV
	for submit <at> debbugs.gnu.org; Thu, 30 Dec 2010 17:39:02 -0500
Received: from [140.186.70.92] (port=40859 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1PYR9B-0001sO-As
	for bug-automake@HIDDEN; Thu, 30 Dec 2010 17:39:02 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@HIDDEN>) id 1PYR99-0003Nz-Pf
	for bug-automake@HIDDEN; Thu, 30 Dec 2010 17:39:01 -0500
Received: from mail-wy0-f169.google.com ([74.125.82.169]:51676)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@HIDDEN>) id 1PYR99-0003Nu-GH
	for bug-automake@HIDDEN; Thu, 30 Dec 2010 17:38:59 -0500
Received: by wyj26 with SMTP id 26so11742840wyj.0
	for <bug-automake@HIDDEN>; Thu, 30 Dec 2010 14:38:58 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:from:subject:date:user-agent
	:mime-version:to:content-type:message-id;
	bh=51waioJG2ph0vIHet3OGfdCvr7nIHI4rlTA0zH4bWCs=;
	b=OCAHoLdZRDJqhxPOZR0fwTA0+Z57yqB3PGzx8wVNVqnjYXt0mI1P4s5RevWHXjNl05
	UQrvRpJqz+PEmzrM/pSZd27VkMYZQgNteT/x+onQ1KolrHNklRjMhyJOo+6iY+HBGRCl
	bx6MeMvi/7P8tC9REEWo519aN/x4vIBIJdnSQ=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=from:subject:date:user-agent:mime-version:to:content-type
	:message-id;
	b=Sd7C3RSWG8qZP3fbr1BAel3CF6s+o3CZykATrgh1Fk14zCmbCj7gBfk7OAW85EnIhG
	Bhn792M5PO7uFusP958FWk6MkGu1JKjZao4JstTz14yHxUFKwMGkplEr5gRitzwdF6ns
	UZ8oi6JdefwJfYxNiL6b+27RmopPwY1qWivJk=
Received: by 10.216.52.206 with SMTP id e56mr17741140wec.19.1293748736459;
	Thu, 30 Dec 2010 14:38:56 -0800 (PST)
Received: from bigio.localnet
	(host201-39-dynamic.50-82-r.retail.telecomitalia.it [82.50.39.201])
	by mx.google.com with ESMTPS id f52sm7981677wes.11.2010.12.30.14.38.54
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Thu, 30 Dec 2010 14:38:55 -0800 (PST)
From: Stefano Lattarini <stefano.lattarini@HIDDEN>
Subject: Remake rules botch up when 'foreign' and 'ignore-deps' are removed
	from AM_INIT_AUTOMAKE
Date: Thu, 30 Dec 2010 23:38:45 +0100
User-Agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )
MIME-Version: 1.0
To: bug-automake@HIDDEN
Content-Type: Multipart/Mixed;
  boundary="Boundary-00=_2nQHN5u22V9YeBc"
Message-Id: <201012302338.46211.stefano.lattarini@HIDDEN>
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.5 (-----)
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.6 (-----)

--Boundary-00=_2nQHN5u22V9YeBc
Content-Type: Text/Plain;
  charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hello automakers.

Currently, the Automake-generated rebuild rules[1] invoke automake with
some command-line options derived from arguments given to AM_INIT_AUTOMAKE.

[1] For more info, see:
    <http://www.gnu.org/software/automake/manual/html_node/Rebuilding.html>

For example, putting `foreign' in AM_INIT_AUTOMAKE generates remake rules
that rebuild outdated Makefile.in files using "$(AUTOMAKE) --foreign";
similarly, `no-dependencies' in AM_INIT_AUTOMAKE generates remake rules
that rebuild outdated Makefile.in files using "$(AUTOMAKE) --ignore-deps".

This semantic clearly breaka remake rules in the (admittedly unlikely and
corner-case) situation when e.g., `foreign' or `no-dependencies' arguments
are removed from the call to AM_INIT_AUTOMAKE (see attached testcases,
which should work with latest master -- v1.11-564-g635a250).

Let's now see explicitly and in detail how this happens (for the case of
the `foreign' option) ...

-*-*-

First, the developer creates a configure.ac that contains:
  AM_INIT_AUTOMAKE([foreign -Wall])
He runs aclocal, autoconf and automake; this generates a Makefile.in that
contains rebuild rules which call automake as "$(AUTOMAKE) --foreign".
He then runs configure, and those rebuild rules end up verbatim in the
generated Makefile.

At this point, the developer decides he wants to switch to the 'gnu'
strictness for his package; since 'gnu' is indeed the default strictness,
he simply modifies the AM_INIT_AUTOMAKE call to read:
  AM_INIT_AUTOMAKE([-Wall])
and then run "make", trusting that the rebuild rules in Makefile will
do all the required updates for him.

But alas, the existing rebuild rules in the Makefile will call
"$(AUTOMAKE) --foreign", and so, since no strictness is explicitly
specified in AM_INIT_AUTOMAKE, the 'foreign' strictness will still
be used.

-*-*-

Cooking up a patch to fix this problem shouldn't be difficult; but such a
patch would need to touch the same parts of the code modified by the pending
patch series "Explicit warning levels must always take precedence over those
implied by the strictness":
 <http://lists.gnu.org/archive/html/automake-patches/2010-12/msg00139.html>
Thus I will wait for that series to be applied first, to spare me useless
conflicts when merging and/or rebasing.

Regards,
   Stefano

--Boundary-00=_2nQHN5u22V9YeBc
Content-Type: application/x-shellscript;
  name="remake-after-removing-foreign-option.test"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
	filename="remake-after-removing-foreign-option.test"

#! /bin/sh
# Copyright (C) 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

# Check that automake-generated remake rules work when the `foreign'
# option is removed from AM_INIT_AUTOMAKE.

. ./defs || Exit 1

set -e

# We want complete control over automake options.
AUTOMAKE=$original_AUTOMAKE

set_am_opts()
{
   sed -e "s|^\\(AM_INIT_AUTOMAKE\\).*|\\1([$1])|" <$2 >$2-t  
   mv -f $2-t $2
   cat $2
}

cat >> configure.in <<'END'
AC_OUTPUT
END

: > Makefile.am

set_am_opts 'foreign' configure.in

$ACLOCAL
$AUTOCONF
$AUTOMAKE -Wall -Werror

./configure
$MAKE

$sleep

# OK, now we warn to enable 'gnu' strictness, but we "forget" to
# create the required file `AUTHORS'.
touch README INSTALL NEWS ChangeLog COPYING

set_am_opts '' configure.in
$MAKE Makefile >out 2>&1 && { cat out; Exit 1; }
cat out
grep 'required file.*AUTHORS.*not found' out

: > AUTHORS

$MAKE Makefile
$MAKE distcheck # for completeness

:

--Boundary-00=_2nQHN5u22V9YeBc
Content-Type: application/x-shellscript;
  name="remake-after-removing-nodeps-option.test"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
	filename="remake-after-removing-nodeps-option.test"

#! /bin/sh
# Copyright (C) 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

# Check that automake-generated remake rules work when the
# `no-dependencies' option is removed from AM_INIT_AUTOMAKE.

. ./defs || Exit 1

set -e

set_am_opts()
{
   set +x
   sed -e "s|^\\(AM_INIT_AUTOMAKE\\).*|\\1([$1])|" <$2 >$2-t  
   mv -f $2-t $2
   set -x
   cat $2
}

cat >> configure.in <<'END'
AC_PROG_CC
AC_OUTPUT
END

cat > Makefile.am <<'END'
bin_PROGRAMS = foo
foo_SOURCES = foo.c bar.h
.PHONY: test-nodeps test-deps
test-deps:
	ls -l '$(DEPDIR)'
	cat '$(DEPDIR)/foo.P$(OBJEXT)'
	grep '^ *foo.$(OBJEXT):.* bar\.h' '$(DEPDIR)/foo.P$(OBJEXT)'
test-nodeps:
	test -z '$(DEPDIR)'
END

cat > bar.h <<'END'
#define SUCCESS 0
END

cat > foo.c <<'END'
#include "bar.h"
int main (void)
{
  return SUCCESS;
}
END

set_am_opts 'no-dependencies' configure.in

$ACLOCAL
$AUTOCONF
$AUTOMAKE

./configure --enable-dependency-tracking

$MAKE
$MAKE test-nodeps

# We need to clean the generated objects and programs, so that the compiler
# will be re-run next turn, and generate depfiles as a side-effect.
$MAKE clean
$sleep

set_am_opts '' configure.in
$MAKE Makefile
$MAKE
$MAKE test-deps

:

--Boundary-00=_2nQHN5u22V9YeBc--




Acknowledgement sent to Stefano Lattarini <stefano.lattarini@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#7763; 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: Thu, 19 Nov 2020 02:30:02 UTC

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