From unknown Mon Jun 23 23:51:35 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#12495 <12495@debbugs.gnu.org> To: bug#12495 <12495@debbugs.gnu.org> Subject: Status: AC_CONFIG_HEADERS with Reply-To: bug#12495 <12495@debbugs.gnu.org> Date: Tue, 24 Jun 2025 06:51:35 +0000 retitle 12495 AC_CONFIG_HEADERS with reassign 12495 automake submitter 12495 Hib Eris severity 12495 normal tag 12495 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 23 14:20:22 2012 Received: (at submit) by debbugs.gnu.org; 23 Sep 2012 18:20:22 +0000 Received: from localhost ([127.0.0.1]:51492 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFqmy-0003i4-Rl for submit@debbugs.gnu.org; Sun, 23 Sep 2012 14:20:22 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45321) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFoan-0000bP-AL for submit@debbugs.gnu.org; Sun, 23 Sep 2012 11:59:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TFoZ1-0008DN-3w for submit@debbugs.gnu.org; Sun, 23 Sep 2012 11:57:48 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:33622) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFoZ1-0008D3-0g for submit@debbugs.gnu.org; Sun, 23 Sep 2012 11:57:47 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54807) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFoYz-0005gF-VA for bug-automake@gnu.org; Sun, 23 Sep 2012 11:57:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TFoYy-00088l-RG for bug-automake@gnu.org; Sun, 23 Sep 2012 11:57:45 -0400 Received: from mail-oa0-f41.google.com ([209.85.219.41]:42632) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFoYy-00086l-Lt for bug-automake@gnu.org; Sun, 23 Sep 2012 11:57:44 -0400 Received: by oagk14 with SMTP id k14so1967268oag.0 for ; Sun, 23 Sep 2012 08:57:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type :x-gm-message-state; bh=LhZVPpA0CN6obRvs8lYGMOk9YpByOPEP5tpOSsrG8Tw=; b=oJ0LsdtqhVbGHs7Be5wNsBjva3vcfmMe2p0jAMwzZaLu1upvr21Dk2kA78dhzJJpOL ktuv21hug7NwopX36yzZHPKxlAkrD/2g7qgXpsqdvzNP1BlE4P3DZR1g8G9FZz5+G1ER n1bmKim8oTxJ9ci7HfpraSf7jIsqnIX0DHGD2EimTjwaWNc2xt6KpeuBhZHZTl7P7KLZ f1bnpu2fteIcdBPkClQG9hWxgIPyJk0q0en+ZebTL5f6b6/XTnQp6uBMH/r8ViNA6jW2 ZHul/RKcyj5IXKeOYv08swDzqbrdfo+Va0oQSE/c/S36CPJIK8Lw7/CcOWTxkV7wi5PH kQMA== Received: by 10.182.131.106 with SMTP id ol10mr4305060obb.91.1348415862753; Sun, 23 Sep 2012 08:57:42 -0700 (PDT) Received: from mail-ob0-f169.google.com (mail-ob0-f169.google.com [209.85.214.169]) by mx.google.com with ESMTPS id ec1sm13597654obc.2.2012.09.23.08.57.40 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 23 Sep 2012 08:57:41 -0700 (PDT) Received: by obcva7 with SMTP id va7so1375356obc.0 for ; Sun, 23 Sep 2012 08:57:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.60.170.83 with SMTP id ak19mr7576845oec.113.1348415859651; Sun, 23 Sep 2012 08:57:39 -0700 (PDT) Received: by 10.60.172.196 with HTTP; Sun, 23 Sep 2012 08:57:39 -0700 (PDT) Date: Sun, 23 Sep 2012 17:57:39 +0200 Message-ID: Subject: AC_CONFIG_HEADERS with From: Hib Eris To: bug-automake@gnu.org Content-Type: multipart/mixed; boundary=bcaec54a336852f41504ca6088ef X-Gm-Message-State: ALoCoQmJ9zeeKEP6jHL46YynS5lDgM2laDsLRBQPjlAgdYEcgz+bvsG01tyuH3DgXcBUaso9aRaz X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 23 Sep 2012 14:20:20 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) --bcaec54a336852f41504ca6088ef Content-Type: text/plain; charset=ISO-8859-1 Hi, With AC_CONFIG_HEADERS(config.h subdir/myconfig.h) in configure.ac, automake generates a target to build config.h.in with autoheader in Makefile.in (as expected), but it also generates a target in subdir/Makefile.in to build subdir/myconfig.h.in which also runs autoheader. This last target does not create subdir/myconfig.h as autoheader only generates config.h, so this seems wrong. I could not find much in the documentation of automake about what is supposed to happen, but in the source of lib/am/remake-hdr.am I read: ## Only the first file of AC_CONFIG_HEADERS is assumed to be generated ## by autoheader. So I understand that it is not the intention to have more then one header file to trigger autoheader. This only seems to happen when the second header file is in a subdir. With AC_CONFIG_HEADERS(config.h myconfig.h) things work as expected, so I guess this might be a bug that gets triggered only with header files in subdirs. I have attached a patch that fixes this problem for me. Kind regards, Hib Eris --bcaec54a336852f41504ca6088ef Content-Type: application/octet-stream; name="0001-Do-not-call-autoheader-with-header-files-in-subdirs.patch" Content-Disposition: attachment; filename="0001-Do-not-call-autoheader-with-header-files-in-subdirs.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_h7gby12l0 RnJvbSA2MzMxZWIxMjNlNmVlNTZjZGZmZjcwMmU4NmM4ODYyYjU0MmU4ZjVkIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBIaWIgRXJpcyA8aGliQGhpYmVyaXMubmw+CkRhdGU6IFN1biwg MjMgU2VwIDIwMTIgMTc6NTQ6MjYgKzAyMDAKU3ViamVjdDogW1BBVENIXSBEbyBub3QgY2FsbCBh dXRvaGVhZGVyIHdpdGggaGVhZGVyIGZpbGVzIGluIHN1YmRpcnMKCkFDX0NPTkZJR19IRUFERVJT KGNvbmZpZy5oIHN1YmRpci9teWNvbmZpZy5oKSBzaG91bGQgbm90IGdlbmVyYXRlIGEKdGFyZ2V0 IGZvciBzdWJkaXIvbXljb25maWcuaC5pbiBjYWxsaW5nIGF1dG9oZWFkZXIuCi0tLQogYXV0b21h a2UuaW4gfCAgICAxICsKIDEgZmlsZXMgY2hhbmdlZCwgMSBpbnNlcnRpb25zKCspLCAwIGRlbGV0 aW9ucygtKQoKZGlmZiAtLWdpdCBhL2F1dG9tYWtlLmluIGIvYXV0b21ha2UuaW4KaW5kZXggYjE2 NTg1NS4uODA5MDQyMSAxMDA2NDQKLS0tIGEvYXV0b21ha2UuaW4KKysrIGIvYXV0b21ha2UuaW4K QEAgLTQxMTgsNiArNDExOCw3IEBAIHN1YiBoYW5kbGVfY29uZmlndXJlICgkJCRAKQogCQkJICAg Q09ORklHX0hJTiAgICAgICA9PiAkaW5zWzBdLAogCQkJICAgQ09ORklHX0hfREVQUyAgICA9PiAi QGlucyIsCiAJCQkgICBDT05GSUdfSF9QQVRIICAgID0+ICRjb25maWdfaF9wYXRoLAorCQkJICAg RklSU1QgICAgICAgICAgICA9PiAoJGhkcl9pbmRleCA9PSAxKSwKIAkJCSAgIFNUQU1QICAgICAg ICAgICAgPT4gIiRzdGFtcCIpOwogCiAJICBwdXNoIEBkaXN0Y2xlYW5fY29uZmlnLCAkY25fc2Fu c19kaXIsICRzdGFtcDsKLS0gCjEuNy41LjQKCg== --bcaec54a336852f41504ca6088ef-- From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 24 02:35:20 2012 Received: (at 12495) by debbugs.gnu.org; 24 Sep 2012 06:35:20 +0000 Received: from localhost ([127.0.0.1]:51981 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TG2GF-0006S4-UL for submit@debbugs.gnu.org; Mon, 24 Sep 2012 02:35:20 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:62641) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TG2GD-0006Rx-Ee for 12495@debbugs.gnu.org; Mon, 24 Sep 2012 02:35:18 -0400 Received: by pbbro8 with SMTP id ro8so1103916pbb.3 for <12495@debbugs.gnu.org>; Sun, 23 Sep 2012 23:33:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=YgGC/NZDFer6JqwhQnpZaTqkl3b2MrbEYQ9G9TDd9DE=; b=Pof00cS0qDt712Qo1XOBjwqr2kio/U0oXvrh6vqCp4UX/zYekpP7kQ4Ya973RTstM0 N3s2RcEYnAk/vxVYO7dGdq2ReGMRPhYO+p1YK/uWPVlzloVAgzTlTewltzxTUc0rMUmW Ems7+AJhyKbUgOAhmvllrTy1eHWlpAeseefft2+YRoPr6Zffyf80FIVvLrVYmPOZ0nGV 7WQZZjkpPu3029eJZveDIbFJJumBfxccupZZcTGJGiyF8KTa1kLNt+RiF43NqjP+reLV iJUeRadjBfsrTcaBIie+06aA6Mdp0hbcIodNXBCqH7TJY2SkVxXxD5ttRo2HAfUQpiub 2l8A== Received: by 10.66.78.199 with SMTP id d7mr29262023pax.77.1348468403957; Sun, 23 Sep 2012 23:33:23 -0700 (PDT) Received: from [152.98.48.237] (gateway.qimr.edu.au. [152.98.8.1]) by mx.google.com with ESMTPS id st6sm9158167pbc.58.2012.09.23.23.33.16 (version=SSLv3 cipher=OTHER); Sun, 23 Sep 2012 23:33:17 -0700 (PDT) Message-ID: <505FFDB0.2090701@gmail.com> Date: Mon, 24 Sep 2012 16:29:04 +1000 From: Peter Johansson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.7) Gecko/20120825 Thunderbird/10.0.7 MIME-Version: 1.0 To: Hib Eris Subject: Re: bug#12495: AC_CONFIG_HEADERS with References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 12495 Cc: 12495@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On 09/24/2012 01:57 AM, Hib Eris wrote: > Hi, > > With AC_CONFIG_HEADERS(config.h subdir/myconfig.h) in configure.ac, > automake generates a target to build config.h.in with autoheader in > Makefile.in (as expected), > but it also generates a target in subdir/Makefile.in to build > subdir/myconfig.h.in which also runs autoheader. > This last target does not create subdir/myconfig.h as autoheader only > generates config.h, so this seems wrong. Hi Hib, I have the setup you describe, and I have not encountered the problem you describe. I have AC_CONFIG_HEADERS([config.h lib/config_public.h]) and there is no rule to create 'lib/config_public.h.in'. Am I missing something? Cheers, Peter From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 24 04:20:06 2012 Received: (at 12495) by debbugs.gnu.org; 24 Sep 2012 08:20:06 +0000 Received: from localhost ([127.0.0.1]:52076 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TG3td-0000No-34 for submit@debbugs.gnu.org; Mon, 24 Sep 2012 04:20:05 -0400 Received: from mail-oa0-f44.google.com ([209.85.219.44]:33776) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TG3tZ-0000NJ-Pe for 12495@debbugs.gnu.org; Mon, 24 Sep 2012 04:20:03 -0400 Received: by oagn5 with SMTP id n5so4526678oag.3 for <12495@debbugs.gnu.org>; Mon, 24 Sep 2012 01:18:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=quLmawnDuXXG7SxdNyg6lQ/oapBu3BeBs70mqA37ycI=; b=c+yPWjrjLZCWz+dHgGB1Re1k8d6vj5xNleAmmpGDLFCx80xsi7BVfgebs1TrTGmUha EVSGLOBsmCCwzn8pyVFOcvrecxgUYdJex7lIhX7tg5zvlE0mUvoTCykR8Eg+TX5Hjw3A myJCLKx7RGJ4wJccU1INI7Xm7+HYyQSfq8mEDbLMcsbitLUJ58VTW7embiDH6nEG4Zwf 6e99GuFgQGXRsvF9w6zrGJQ8AeiMKzZTjPYG6J2HA8vhHL3zpl5u+ZibRyVyzQiqQvcI jRa3o+nue0bquVLv+xZ0puR6eIvib3uhK0QVb6XaVcJoUecA87709OvznjUs2Me/6lVo 0C2A== Received: by 10.60.171.16 with SMTP id aq16mr1865999oec.109.1348474688110; Mon, 24 Sep 2012 01:18:08 -0700 (PDT) Received: from mail-oa0-f44.google.com (mail-oa0-f44.google.com [209.85.219.44]) by mx.google.com with ESMTPS id d4sm15462201obx.3.2012.09.24.01.18.06 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 24 Sep 2012 01:18:07 -0700 (PDT) Received: by oagn5 with SMTP id n5so4526657oag.3 for <12495@debbugs.gnu.org>; Mon, 24 Sep 2012 01:18:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.60.7.36 with SMTP id g4mr9152407oea.112.1348474685965; Mon, 24 Sep 2012 01:18:05 -0700 (PDT) Received: by 10.60.172.196 with HTTP; Mon, 24 Sep 2012 01:18:05 -0700 (PDT) In-Reply-To: <505FFDB0.2090701@gmail.com> References: <505FFDB0.2090701@gmail.com> Date: Mon, 24 Sep 2012 10:18:05 +0200 Message-ID: Subject: Re: bug#12495: AC_CONFIG_HEADERS with From: Hib Eris To: Peter Johansson Content-Type: multipart/mixed; boundary=e89a8f64347ca543b304ca6e3a28 X-Gm-Message-State: ALoCoQmXsANJ7gt1k3bU1TQiLfV6VcteznXDrwXO2Up4uhR/SuD0+2Bfs4AbKEJTKRgvV0MA8PF6 X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 12495 Cc: 12495@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) --e89a8f64347ca543b304ca6e3a28 Content-Type: text/plain; charset=ISO-8859-1 Hi Peter, Thanks for looking into this. On Mon, Sep 24, 2012 at 8:29 AM, Peter Johansson wrote: > > I have the setup you describe, and I have not encountered the problem you > describe. > > I have AC_CONFIG_HEADERS([config.h lib/config_public.h]) > > and there is no rule to create 'lib/config_public.h.in'. Am I missing > something? I have attached an example setup. After running 'autoreconf -fi', I get a lib/Makefile.in with an rule to create $(srcdir)/config-public.h.in calling $(AUTOHEADER). Hib Eris --e89a8f64347ca543b304ca6e3a28 Content-Type: application/x-gzip; name="example.tgz" Content-Disposition: attachment; filename="example.tgz" Content-Transfer-Encoding: base64 X-Attachment-Id: f_h7hayd110 H4sIACAWYFAAA+2XXW+bMBSGueZXWMoNqTpi4xhrF7tgCV3RmtBCsl1EUUQzJ9BRqJKm2s+fTUPG Nk0sUqBqdZ4b4g9yLF6/x8fiR3T/kIqe1iBYwjlTT8IZrj5LNGJhKrup+o1lw8IaYk0uqmS3fYw2 CGl3UXaXb/89r278lSL2+geuMxy5zcRQAtt2/3/0t6hNlP425xrCzSznd0D/Qn9nOrn0g7CRGMfp L+fJNMAt0L8NSv3H7tdmxNeO1J8x5X9mEdC/DUr9B3GUrcVVvm4gxlH6c5X/KQP/t0Op/zLPVsl6 txFmtDx1jDr9KSYH/S2m8n+fEtC/FZzB4jpwA/fGsEz2vqvLtjf2JsYsFmmaz89nxMTzrt5xRkX/ QtYJ/sj57BqzVb4RyTqTg3+NFX8z8McX3qfFpSws3SA0njeYGaM0ud3vtncPu9s0WZpxV6+8cOFd uaEx00fRd7FKUqGrFw6N+fNcfzq5nk5kIP2lP+Arp/S/+shNxTji/mdxTIvzX9X/cP9rnqr+f7jS TLLTxKg9/xnd6485K+p/m2AG+b8NemdoKDNrJrboMRboSWy2SZ6Z6Kynd3bZN7FCX2T29vwxZNo3 SdX/5SFrRvcnjVHrf0p/1X+2reo/W3aB/1ugg/Y7AFXUR0Wp9dJLA1qg9H9T3lfU+p/Yh/O/mEf6 mPfB/20QTj8OvSBEH9S9DCwPAAAAAAAAAADwZvkJNN0JqQAoAAA= --e89a8f64347ca543b304ca6e3a28-- From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 24 04:56:04 2012 Received: (at 12495) by debbugs.gnu.org; 24 Sep 2012 08:56:04 +0000 Received: from localhost ([127.0.0.1]:52100 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TG4SR-0001Dm-Eg for submit@debbugs.gnu.org; Mon, 24 Sep 2012 04:56:04 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:38740) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TG4SP-0001DN-9L for 12495@debbugs.gnu.org; Mon, 24 Sep 2012 04:56:02 -0400 Received: by pbbro8 with SMTP id ro8so1309434pbb.3 for <12495@debbugs.gnu.org>; Mon, 24 Sep 2012 01:54:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=pQCUG3FgkShGJyCRjwmm1WUob46S3ax20u2WW5VTQ/g=; b=QkVVCa7QhiQBmuusKCIEFLoa8Z7HpgWpLwdk1Qi9yHE001DTeENvId9xQKfuctdGQ5 aUUxf6iuz5vDtDkwkPnVg002PrnnhTlsXL35ko2noPlvjWVJscG17sa8c91/trdQrNBr YvD31oMMHnvi01oscdRiOrnucquRweVY2hiRhlnmHBSpdH9RCBgyZPLQ+R2pSTp8r0o3 l6rS7tVtnlswTvjMcThF57vqzJObmjDCQJfpMggZcKkFJ0TnGq15aaYxp9csrsleEYmA P3VVsZ5+3g+PdXJPm2N8E4N49Lb8wTiotGRUrGoKcm7N59VPz7ZUMfyCpnNgJLNBMW0Z Z2RQ== Received: by 10.68.220.137 with SMTP id pw9mr34954064pbc.1.1348476846328; Mon, 24 Sep 2012 01:54:06 -0700 (PDT) Received: from limpar.local (124-170-69-128.dyn.iinet.net.au. [124.170.69.128]) by mx.google.com with ESMTPS id vj8sm2384945pbc.6.2012.09.24.01.54.04 (version=SSLv3 cipher=OTHER); Mon, 24 Sep 2012 01:54:05 -0700 (PDT) Message-ID: <50601F92.2020104@gmail.com> Date: Mon, 24 Sep 2012 18:53:38 +1000 From: Peter Johansson User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20 MIME-Version: 1.0 To: Hib Eris Subject: Re: bug#12495: AC_CONFIG_HEADERS with References: <505FFDB0.2090701@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 12495 Cc: 12495@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On 9/24/12 6:18 PM, Hib Eris wrote: > Hi Peter, > > Thanks for looking into this. > > On Mon, Sep 24, 2012 at 8:29 AM, Peter Johansson wrote: >> I have the setup you describe, and I have not encountered the problem you >> describe. >> >> I have AC_CONFIG_HEADERS([config.h lib/config_public.h]) >> >> and there is no rule to create 'lib/config_public.h.in'. Am I missing >> something? > I have attached an example setup. > After running 'autoreconf -fi', I get a lib/Makefile.in with an rule > to create $(srcdir)/config-public.h.in calling $(AUTOHEADER). > > Yes, this looks like a bug IMVHO. The difference between your setup and mine is that I only have one Makefile. But I just recently converted to non-recursive makefiles, and haven't noticed this bug, which suggests this is a recent regression (1.12???). Cheers, Peter -- Peter Johansson From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 24 05:22:37 2012 Received: (at 12495) by debbugs.gnu.org; 24 Sep 2012 09:22:37 +0000 Received: from localhost ([127.0.0.1]:52105 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TG4s8-0001nB-UD for submit@debbugs.gnu.org; Mon, 24 Sep 2012 05:22:37 -0400 Received: from mail-ob0-f172.google.com ([209.85.214.172]:39635) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TG4s1-0001my-8Y for 12495@debbugs.gnu.org; Mon, 24 Sep 2012 05:22:35 -0400 Received: by obbwc20 with SMTP id wc20so5093888obb.3 for <12495@debbugs.gnu.org>; Mon, 24 Sep 2012 02:20:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=Jtu9ZzGBSk1mwsflpdLmkKzjNOgnQWdy9PWrFOaABvQ=; b=kr7wO5H+JMK6PgGFGWEYUEvD3qMwoHNhUOc8CPjrLL5twvoUTSPsJFrtibCVapreYZ AhKrrepvQ7oiEShMK88hY6uXfE0wHk0X392wskeePsasIR+nJc3pRCN8RPmycBiVNuNb vGBy0srbHXwpV9nHYmSHf8/PoY+D8fYIxLNs7VM89rwFuxR94AMDqNX0thRzemZnmlvs Eb6JmKmjZvWveh60IIXLhydVTx/0bcSFl6NbPuEdC+x4ZbBEQpGPDTfOyo1j7uo5e0mr w+5Id7ud9pc7HWVeCcOqnbUYdHzRQjWffPQFN63CTOETdfCULfYYfs92JC9toEQATdFJ nN6Q== Received: by 10.60.171.76 with SMTP id as12mr9123917oec.128.1348478435508; Mon, 24 Sep 2012 02:20:35 -0700 (PDT) Received: from mail-oa0-f44.google.com (mail-oa0-f44.google.com [209.85.219.44]) by mx.google.com with ESMTPS id d4sm15560647obx.3.2012.09.24.02.20.33 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 24 Sep 2012 02:20:34 -0700 (PDT) Received: by oagn5 with SMTP id n5so4568115oag.3 for <12495@debbugs.gnu.org>; Mon, 24 Sep 2012 02:20:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.60.169.137 with SMTP id ae9mr6547968oec.91.1348478433087; Mon, 24 Sep 2012 02:20:33 -0700 (PDT) Received: by 10.60.172.196 with HTTP; Mon, 24 Sep 2012 02:20:33 -0700 (PDT) In-Reply-To: <50601F92.2020104@gmail.com> References: <505FFDB0.2090701@gmail.com> <50601F92.2020104@gmail.com> Date: Mon, 24 Sep 2012 11:20:33 +0200 Message-ID: Subject: Re: bug#12495: AC_CONFIG_HEADERS with From: Hib Eris To: Peter Johansson Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQmBZjxcGSzK36mLybE8756lIcDxjf/89UUODjfcWFppz3FS9kIKw06GxUzzzI7u6SIMaOWU X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 12495 Cc: 12495@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Hi, On Mon, Sep 24, 2012 at 10:53 AM, Peter Johansson wrote: >> I have attached an example setup. >> After running 'autoreconf -fi', I get a lib/Makefile.in with an rule >> to create $(srcdir)/config-public.h.in calling $(AUTOHEADER). >> >> > Yes, this looks like a bug IMVHO. The difference between your setup and mine > is that I only have one Makefile. But I just recently converted to > non-recursive makefiles, and haven't noticed this bug, which suggests this > is a recent regression (1.12???). I get this with both automake 1.11.1 and current master. It seems to be there since this commit: commit 262bb922f4ad55cebe9b7a7a6c6fa9ff67fb3ee9 Author: Alexandre Duret-Lutz Date: Mon Jan 5 09:02:06 2004 +0000 Cheers, Hib From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 27 04:38:21 2012 Received: (at 12495) by debbugs.gnu.org; 27 Sep 2012 08:38:21 +0000 Received: from localhost ([127.0.0.1]:58008 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TH9bw-0001sA-Tl for submit@debbugs.gnu.org; Thu, 27 Sep 2012 04:38:21 -0400 Received: from mail-bk0-f44.google.com ([209.85.214.44]:40588) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TH9bt-0001rx-2R; Thu, 27 Sep 2012 04:38:18 -0400 Received: by bkcjc3 with SMTP id jc3so1266373bkc.3 for ; Thu, 27 Sep 2012 01:38:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=562LUwASmNdUAaGeZCQQdmYpjAP6ihwqECfDftihvfg=; b=RfhiasCggxE8GUu4gDemW28EbubfEN3R77lmP4HfCsL9AciWD+2FwC70wnUGSPZQih QMRhgquUXKlxLKydyI3WfPbCWJrQl87uItr+iyBAyIS1kLaRPXpfsn7/T3tR1K/iHo+U AsL0OiM+hAi2fcxeTwNdn59UzDBv3ED4j91McdzQVkhuSK3YELK5/ho4pKnjuWhYw3xL yTEbqpm3UwEQfatz6Sf7pbnlmMElzf1HsdyTJSoPfeOgWvIupvhBcnb2zcKhrlBG8/8q W4xYwCPOtgVLmcoseLAXm2pAWBi3+XRqt9FHrjsqeNQnIbvlNYx+XclouEZpEf3u0uyp Nfqg== Received: by 10.204.130.25 with SMTP id q25mr1726044bks.119.1348735093163; Thu, 27 Sep 2012 01:38:13 -0700 (PDT) Received: from [192.168.178.21] (host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194]) by mx.google.com with ESMTPS id d13sm3743606bkw.12.2012.09.27.01.38.11 (version=SSLv3 cipher=OTHER); Thu, 27 Sep 2012 01:38:12 -0700 (PDT) Message-ID: <50641071.5040903@gmail.com> Date: Thu, 27 Sep 2012 10:38:09 +0200 From: Stefano Lattarini MIME-Version: 1.0 To: Hib Eris Subject: Re: bug#12495: AC_CONFIG_HEADERS with References: <505FFDB0.2090701@gmail.com> <50601F92.2020104@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 12495 Cc: Peter Johansson , 12495@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) tags 12495 + moreinfo thanks Hello everybody, sorry for the late reply. On 09/24/2012 11:20 AM, Hib Eris wrote: > Hi, > > On Mon, Sep 24, 2012 at 10:53 AM, Peter Johansson wrote: >>> I have attached an example setup. >>> After running 'autoreconf -fi', I get a lib/Makefile.in with an rule >>> to create $(srcdir)/config-public.h.in calling $(AUTOHEADER). >>> >>> >> Yes, this looks like a bug IMVHO. The difference between your setup and mine >> is that I only have one Makefile. But I just recently converted to >> non-recursive makefiles, and haven't noticed this bug, which suggests this >> is a recent regression (1.12???). > > I get this with both automake 1.11.1 and current master. It seems to > be there since this commit: > > commit 262bb922f4ad55cebe9b7a7a6c6fa9ff67fb3ee9 > Author: Alexandre Duret-Lutz > Date: Mon Jan 5 09:02:06 2004 +0000 Thanks for digging out all these details. However, I still don't understand why you consider the current Automake behaviour as a bug. It seems to me it's not in contrast with the documentation, which reads: AC_CONFIG_HEADERS: Automake will generate rules to rebuild these headers. Older versions of Automake required the use of AM_CONFIG_HEADER (see Macros); this is no longer the case. As with AC_CONFIG_FILES (see Requirements), parts of the specification using shell variables will be ignored as far as cleaning, distributing, and rebuilding is concerned. Also, I can't figure a situation where the current behaviour would be unhepful rather then helpful. But probably it's just me missing something here, since I have basically no first-hand experience with complex use of AC_CONFIG_HEADERS. So I'll wait for more feedback before deciding how to proceed in this matter. Thanks, Stefano From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 27 10:20:13 2012 Received: (at 12495) by debbugs.gnu.org; 27 Sep 2012 14:20:14 +0000 Received: from localhost ([127.0.0.1]:59046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1THEwn-0005AG-Ij for submit@debbugs.gnu.org; Thu, 27 Sep 2012 10:20:13 -0400 Received: from mx.scalarmail.ca ([98.158.95.75]:4122 helo=ironport-01.sms.scalar.ca) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1THEwl-0005A7-01 for 12495@debbugs.gnu.org; Thu, 27 Sep 2012 10:20:12 -0400 Received: from unknown (HELO sms-zimbra-mta-01.sms.scalar.ca) ([192.168.32.56]) by ironport-01.sms.scalar.ca with ESMTP; 27 Sep 2012 10:20:06 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by sms-zimbra-mta-01.sms.scalar.ca (Postfix) with ESMTP id DC68F17F46; Thu, 27 Sep 2012 10:20:05 -0400 (EDT) Received: from sms-zimbra-mta-01.sms.scalar.ca ([127.0.0.1]) by localhost (sms-zimbra-mta-01.sms.scalar.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id T-3l+QEI-HHM; Thu, 27 Sep 2012 10:20:04 -0400 (EDT) Received: from mail.ellipticsemi.com (dsl-67-204-24-19.acanac.net [67.204.24.19]) (Authenticated sender: nbowler@elliptictech.com) by sms-zimbra-mta-01.sms.scalar.ca (Postfix) with ESMTPSA id DF7D717F45; Thu, 27 Sep 2012 10:20:03 -0400 (EDT) Received: by mail.ellipticsemi.com (nbSMTP-1.00) for uid 550 (using TLSv1/SSLv3 with cipher DHE-RSA-AES256-SHA (256/256 bits)) nbowler@mail.ellipticsemi.com; Thu, 27 Sep 2012 10:20:04 -0400 (EDT) Date: Thu, 27 Sep 2012 10:20:03 -0400 From: Nick Bowler To: Stefano Lattarini Subject: Re: bug#12495: AC_CONFIG_HEADERS with Message-ID: <20120927142003.GA2586@elliptictech.com> References: <505FFDB0.2090701@gmail.com> <50601F92.2020104@gmail.com> <50641071.5040903@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50641071.5040903@gmail.com> Organization: Elliptic Technologies Inc. User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 12495 Cc: Peter Johansson , Hib Eris , 12495@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) On 2012-09-27 10:38 +0200, Stefano Lattarini wrote: > On 09/24/2012 11:20 AM, Hib Eris wrote: > > On Mon, Sep 24, 2012 at 10:53 AM, Peter Johansson wrote: > >>> I have attached an example setup. > >>> After running 'autoreconf -fi', I get a lib/Makefile.in with an rule > >>> to create $(srcdir)/config-public.h.in calling $(AUTOHEADER). [...] > Thanks for digging out all these details. However, I still don't understand > why you consider the current Automake behaviour as a bug. It seems to me it's > not in contrast with the documentation, which reads: > > AC_CONFIG_HEADERS: > Automake will generate rules to rebuild these headers. Older versions > of Automake required the use of AM_CONFIG_HEADER (see Macros); this is > no longer the case. As with AC_CONFIG_FILES (see Requirements), parts > of the specification using shell variables will be ignored as far as > cleaning, distributing, and rebuilding is concerned. > > Also, I can't figure a situation where the current behaviour would be unhepful > rather then helpful. But probably it's just me missing something here, since > I have basically no first-hand experience with complex use of AC_CONFIG_HEADERS. > So I'll wait for more feedback before deciding how to proceed in this matter. I /think/ the situation being described is demonstrated by the following. That being said, the behaviour doesn't seem to be harmful; just useless. % cat >configure.ac <<'EOF' AC_INIT([test], [0]) AC_CONFIG_HEADERS([config.h foo/fooconfig.h]) AM_INIT_AUTOMAKE([foreign]) AC_CONFIG_FILES([Makefile foo/Makefile]) AC_OUTPUT EOF % mkdir foo % touch Makefile.am foo/Makefile.am foo/fooconfig.h.in % autoreconf -is % ./configure % touch configure.ac % (cd foo && make fooconfig.h.in) Since Automake outputs a rule[1] in foo/Makefile.in to update fooconfig.h.in, make tries to do so (by running autoheader). But autoheader doesn't actually update fooconfig.h.in as fooconfig.h is not the first header listed in AC_CONFIG_HEADERS. So executing this rule is pointless as its commands will never modify the target. Fortunately in this case, the rule to update fooconfig.h.in also contains a simple touch command, so it does actually update the target timestamp. But it would have been better to simply do nothing since the target is not actually out of date. [1] For reference, the rule output by automake is as follows: $(srcdir)/fooconfig.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h2 touch $@ Cheers, -- Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/) From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 27 15:53:40 2012 Received: (at 12495) by debbugs.gnu.org; 27 Sep 2012 19:53:41 +0000 Received: from localhost ([127.0.0.1]:59283 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1THK9U-0004kg-79 for submit@debbugs.gnu.org; Thu, 27 Sep 2012 15:53:40 -0400 Received: from mail-ob0-f172.google.com ([209.85.214.172]:47538) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1THK9R-0004kZ-DP for 12495@debbugs.gnu.org; Thu, 27 Sep 2012 15:53:38 -0400 Received: by obqv19 with SMTP id v19so2225981obq.3 for <12495@debbugs.gnu.org>; Thu, 27 Sep 2012 12:53:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=sfnH6ejUA6jyGyHQeyAevGWpKKT4kWdaoImjO/2GWDk=; b=HszGkiesbifvpjxh13aYptysCaxAGcTzM2nkbcQNw+bmhEuZMF17Ogs90CxZDig28g jEHwFGAAYgbF/RVRGsIMMPa5SUALNctvoHbLFfJHPsRNj3VGBSCkGKP70ZLM8Hz0v9xx 3GUg4gAher9uwnedxzgI5uKhdhgiKTqvH/FG92pW+J1bIEcoZ/ehJVrcYnMCSIZwexpJ jzxI2nmC0kGMIVL5/dLrOwcaGmbtK5Ejx7yLnH91TyTwA50tXCo86rG6dY/TWV+DOcxs qOuo00yVunILG66l1rr25LwwTHXWOV/r7pMLYdZHL1bh1Jbp29Wo92VZAP2vphmMQ5T8 hm8w== Received: by 10.60.2.163 with SMTP id 3mr4134577oev.105.1348775611010; Thu, 27 Sep 2012 12:53:31 -0700 (PDT) Received: from mail-ob0-f172.google.com (mail-ob0-f172.google.com [209.85.214.172]) by mx.google.com with ESMTPS id n8sm5040722oec.5.2012.09.27.12.53.28 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 27 Sep 2012 12:53:29 -0700 (PDT) Received: by obqv19 with SMTP id v19so2225922obq.3 for <12495@debbugs.gnu.org>; Thu, 27 Sep 2012 12:53:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.60.30.229 with SMTP id v5mr3946943oeh.130.1348775607777; Thu, 27 Sep 2012 12:53:27 -0700 (PDT) Received: by 10.60.172.196 with HTTP; Thu, 27 Sep 2012 12:53:27 -0700 (PDT) In-Reply-To: <20120927142003.GA2586@elliptictech.com> References: <505FFDB0.2090701@gmail.com> <50601F92.2020104@gmail.com> <50641071.5040903@gmail.com> <20120927142003.GA2586@elliptictech.com> Date: Thu, 27 Sep 2012 21:53:27 +0200 Message-ID: Subject: Re: bug#12495: AC_CONFIG_HEADERS with From: Hib Eris To: Nick Bowler Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQnNR6iktmTwA8im1MjBUx5HbC6Z+Z26mW4ySnK8UCCanEVqsHebE4CeWv6Gq3F7TpHJq8sz X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 12495 Cc: Peter Johansson , Stefano Lattarini , 12495@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Hi all, On Thu, Sep 27, 2012 at 4:20 PM, Nick Bowler wrote: > On 2012-09-27 10:38 +0200, Stefano Lattarini wrote: >> On 09/24/2012 11:20 AM, Hib Eris wrote: >> > On Mon, Sep 24, 2012 at 10:53 AM, Peter Johansson wrote: >> >>> I have attached an example setup. >> >>> After running 'autoreconf -fi', I get a lib/Makefile.in with an rule >> >>> to create $(srcdir)/config-public.h.in calling $(AUTOHEADER). > [...] >> Thanks for digging out all these details. However, I still don't understand >> why you consider the current Automake behaviour as a bug. It seems to me it's >> not in contrast with the documentation, which reads: >> >> AC_CONFIG_HEADERS: >> Automake will generate rules to rebuild these headers. Older versions >> of Automake required the use of AM_CONFIG_HEADER (see Macros); this is >> no longer the case. As with AC_CONFIG_FILES (see Requirements), parts >> of the specification using shell variables will be ignored as far as >> cleaning, distributing, and rebuilding is concerned. IMHO the statement that automake will generate rules to rebuild these headers is suggesting that automake does more than it actually can. Automake does not really know how the headers should be rebuild, thus it assumes it can do so by running autoheader which as far as I understand always creates only a config.h.in file. >> Also, I can't figure a situation where the current behaviour would be unhepful >> rather then helpful. But probably it's just me missing something here, since >> I have basically no first-hand experience with complex use of AC_CONFIG_HEADERS. >> So I'll wait for more feedback before deciding how to proceed in this matter. > > I /think/ the situation being described is demonstrated by the > following. You are correct. This is what I described. > That being said, the behaviour doesn't seem to be harmful; > just useless. > > % cat >configure.ac <<'EOF' > AC_INIT([test], [0]) > AC_CONFIG_HEADERS([config.h foo/fooconfig.h]) > > AM_INIT_AUTOMAKE([foreign]) > AC_CONFIG_FILES([Makefile foo/Makefile]) > AC_OUTPUT > EOF > > % mkdir foo > % touch Makefile.am foo/Makefile.am foo/fooconfig.h.in > % autoreconf -is > > % ./configure > % touch configure.ac > % (cd foo && make fooconfig.h.in) > > Since Automake outputs a rule[1] in foo/Makefile.in to update > fooconfig.h.in, make tries to do so (by running autoheader). But > autoheader doesn't actually update fooconfig.h.in as fooconfig.h is > not the first header listed in AC_CONFIG_HEADERS. So executing this > rule is pointless as its commands will never modify the target. > > Fortunately in this case, the rule to update fooconfig.h.in also > contains a simple touch command, so it does actually update the > target timestamp. But it would have been better to simply do > nothing since the target is not actually out of date. I think it would even be better if the target had not existed in the first place. >From reading the source of lib/am/remake-hdr.am I think it was also the intention of automake to not generate this target for all headers except the first one, but I think this functionality was accidentally lost with commit 262bb922f4ad55cebe9b7a7a6c6fa9ff67fb3ee9 On the matter of harmfullness/helpfullness/pointlessness of this behaviour, I do not think current behaviour does any harm. For me it just causes 6 ugly lines of output that I previously did not understood when I run 'make' and which triggered me to look into it to clean up my build log. So this certainly is no show stopper, but I think it would be nice nevertheless to have it fixed. Cheers, Hib From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 27 16:13:21 2012 Received: (at 12495) by debbugs.gnu.org; 27 Sep 2012 20:13:21 +0000 Received: from localhost ([127.0.0.1]:59289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1THKSW-0005BS-D4 for submit@debbugs.gnu.org; Thu, 27 Sep 2012 16:13:21 -0400 Received: from mx.scalarmail.ca ([98.158.95.75]:63750 helo=ironport-01.sms.scalar.ca) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1THKSU-0005BL-F6 for 12495@debbugs.gnu.org; Thu, 27 Sep 2012 16:13:19 -0400 Received: from unknown (HELO sms-zimbra-mta-02.sms.scalar.ca) ([192.168.32.56]) by ironport-01.sms.scalar.ca with ESMTP; 27 Sep 2012 16:13:12 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by sms-zimbra-mta-02.sms.scalar.ca (Postfix) with ESMTP id 2CDBE87C10; Thu, 27 Sep 2012 16:13:12 -0400 (EDT) Received: from sms-zimbra-mta-02.sms.scalar.ca ([127.0.0.1]) by localhost (sms-zimbra-mta-02.sms.scalar.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id se+hNpDVJkou; Thu, 27 Sep 2012 16:13:11 -0400 (EDT) Received: from mail.ellipticsemi.com (dsl-67-204-24-19.acanac.net [67.204.24.19]) (Authenticated sender: nbowler@elliptictech.com) by sms-zimbra-mta-02.sms.scalar.ca (Postfix) with ESMTPSA id 8DB6A87C0F; Thu, 27 Sep 2012 16:13:10 -0400 (EDT) Received: by mail.ellipticsemi.com (nbSMTP-1.00) for uid 550 (using TLSv1/SSLv3 with cipher DHE-RSA-AES256-SHA (256/256 bits)) nbowler@mail.ellipticsemi.com; Thu, 27 Sep 2012 16:13:10 -0400 (EDT) Date: Thu, 27 Sep 2012 16:13:10 -0400 From: Nick Bowler To: Hib Eris Subject: Re: bug#12495: AC_CONFIG_HEADERS with Message-ID: <20120927201310.GA9779@elliptictech.com> References: <505FFDB0.2090701@gmail.com> <50601F92.2020104@gmail.com> <50641071.5040903@gmail.com> <20120927142003.GA2586@elliptictech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Elliptic Technologies Inc. User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 12495 Cc: Peter Johansson , Stefano Lattarini , 12495@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) On 2012-09-27 21:53 +0200, Hib Eris wrote: > On Thu, Sep 27, 2012 at 4:20 PM, Nick Bowler wrote: > > Fortunately in this case, the rule to update fooconfig.h.in also > > contains a simple touch command, so it does actually update the > > target timestamp. But it would have been better to simply do > > nothing since the target is not actually out of date. > > I think it would even be better if the target had not existed in the > first place. Indeed; that is what I was trying to say (perhaps not very well). Not having the rule at all should achieve the result of doing nothing (the other option being an empty rule, which would be pretty silly.) Cheers, -- Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/) From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 28 03:40:44 2012 Received: (at 12495) by debbugs.gnu.org; 28 Sep 2012 07:40:44 +0000 Received: from localhost ([127.0.0.1]:59711 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1THVBj-0004uK-RH for submit@debbugs.gnu.org; Fri, 28 Sep 2012 03:40:44 -0400 Received: from mail-bk0-f44.google.com ([209.85.214.44]:41661) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1THVBg-0004u7-OQ; Fri, 28 Sep 2012 03:40:41 -0400 Received: by bkcjc3 with SMTP id jc3so2866015bkc.3 for ; Fri, 28 Sep 2012 00:40:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=PnLsgzIiHDZv9i7zsz/ZMwTgZN5K+9vrFhxwjSijUKE=; b=ia/UxBtjs44weXekv896hJjDSbu/1XToouxk0aJzQNesapoEMzFD79eTwTIFEdO5OO PHLLxUE+qlvHj1JPBueKiRkXmY16JMFJR8KX1ndMQPGNw908diXmptbueKmmTqDO64jl 9RDMIH9XbDCXW8T01UnTDhk3BHsbQiRzOEC03vslMp+suYZ2Mj3CxoIFvB8BTXjxsGI/ joZdgf3t7hEPyhaZkhGC3+o/jykUWVBVNrQ3wlDDlKIWk9rYmVQ6V14umd88UPhRWOSS D5iA32uhtDnaYGFkv0rHFobfKTR1wQfl+M+W8NOQ9hRNv3k11t9TsCwMvSSF2cq2fXU4 1yUQ== Received: by 10.204.9.130 with SMTP id l2mr3172014bkl.56.1348818031277; Fri, 28 Sep 2012 00:40:31 -0700 (PDT) Received: from [192.168.178.21] (host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194]) by mx.google.com with ESMTPS id gy18sm5897518bkc.4.2012.09.28.00.40.29 (version=SSLv3 cipher=OTHER); Fri, 28 Sep 2012 00:40:30 -0700 (PDT) Message-ID: <50655463.3010409@gmail.com> Date: Fri, 28 Sep 2012 09:40:19 +0200 From: Stefano Lattarini MIME-Version: 1.0 To: Hib Eris Subject: Re: bug#12495: AC_CONFIG_HEADERS with References: <505FFDB0.2090701@gmail.com> <50601F92.2020104@gmail.com> <50641071.5040903@gmail.com> <20120927142003.GA2586@elliptictech.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 12495 Cc: Nick Bowler , Peter Johansson , 12495@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) tags 12495 - moreinfo thanks On 09/27/2012 09:53 PM, Hib Eris wrote: > Hi all, > > On 09/24/2012 11:20 AM, Hib Eris wrote: >> On 2012-09-27 10:38 +0200, Stefano Lattarini wrote: > >> [...] >>> Thanks for digging out all these details. However, I still don't understand >>> why you consider the current Automake behaviour as a bug. It seems to me it's >>> not in contrast with the documentation, which reads: >>> >>> AC_CONFIG_HEADERS: >>> Automake will generate rules to rebuild these headers. Older versions >>> of Automake required the use of AM_CONFIG_HEADER (see Macros); this is >>> no longer the case. As with AC_CONFIG_FILES (see Requirements), parts >>> of the specification using shell variables will be ignored as far as >>> cleaning, distributing, and rebuilding is concerned. > > IMHO the statement that automake will generate rules to rebuild these > headers is suggesting that automake does more than it actually can. > Automake does not really know how the headers should be rebuild, thus > it assumes it can do so by running autoheader which as far as I > understand always creates only a config.h.in file. > And the autoconf manual indeed reads: The autoheader program ... searches for the *first* invocation of AC_CONFIG_HEADERS in configure sources to determine the name of the template. If the first call of AC_CONFIG_HEADERS specifies more than one input file name, autoheader uses the first one. Now I understand your objections, and I agree that the current Automake behaviour is a bug (albeit a minor one). I'll commit a fix in the next days. Thanks, Stefanno From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 29 14:18:44 2012 Received: (at 12495) by debbugs.gnu.org; 29 Sep 2012 18:18:44 +0000 Received: from localhost ([127.0.0.1]:33871 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TI1ch-0008No-VQ for submit@debbugs.gnu.org; Sat, 29 Sep 2012 14:18:44 -0400 Received: from mail-bk0-f44.google.com ([209.85.214.44]:47033) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TI1ce-0008Nd-KZ; Sat, 29 Sep 2012 14:18:42 -0400 Received: by bkcjc3 with SMTP id jc3so4106623bkc.3 for ; Sat, 29 Sep 2012 11:18:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=Ms6OP61WAtRQIvfR0LOqo+avjU9MOjZEF13z2GNrilE=; b=yO/OAaKsfCJg9gqBvVcwEklvfmaL/sbIvAFMXGvdLO0dIvwrvGf2QgJVkj8IOMsdPs v+Mzua4YKNU0UTalp8n3kSkICULxkIMsEDpXZ1rddKtmJ9lU2Sr+ZyDwI56wXurVFJLV 9W/sKfYLSyE1RGDe8RoX/Y5BuJGmcEjYw7rukH7w9Kz+XsjTGe0P9i4QzzMRHg6ggC1X 2TITq33mmh07c98KkNSpsDc32kBsflYzH0FT1GSZPZLaInekr8Q/dhEDv7wCntYTJr4p ko4NMRFTT0PI4++Y/BiZGKKpY1BTttnsDArwN/ghhJ1KO4TpTeJxF7lUvRBGvURwuUYS e9qg== Received: by 10.204.9.4 with SMTP id j4mr4785704bkj.22.1348942702929; Sat, 29 Sep 2012 11:18:22 -0700 (PDT) Received: from [192.168.178.21] (host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194]) by mx.google.com with ESMTPS id z25sm8351502bkz.15.2012.09.29.11.18.19 (version=SSLv3 cipher=OTHER); Sat, 29 Sep 2012 11:18:22 -0700 (PDT) Message-ID: <50673B63.5040001@gmail.com> Date: Sat, 29 Sep 2012 20:18:11 +0200 From: Stefano Lattarini MIME-Version: 1.0 To: Hib Eris Subject: Re: bug#12495: AC_CONFIG_HEADERS with References: <505FFDB0.2090701@gmail.com> <50601F92.2020104@gmail.com> <50641071.5040903@gmail.com> <20120927142003.GA2586@elliptictech.com> <50655463.3010409@gmail.com> In-Reply-To: <50655463.3010409@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 12495 Cc: Nick Bowler , Peter Johansson , "automake-patches@gnu.org" , 12495@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) tags 12495 + patch thanks On 09/28/2012 09:40 AM, Stefano Lattarini wrote: > > Now I understand your objections, and I agree that the current Automake > behaviour is a bug (albeit a minor one). I'll commit a fix in the next > days. > Here is the patch finally. I will commit it in a couple of days if there are no objections. As usual, comments are welcome. Thanks, Stefano ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- >From 21bcf5bf85908ac98ff131467f78d584579870ea Mon Sep 17 00:00:00 2001 Message-Id: <21bcf5bf85908ac98ff131467f78d584579870ea.1348942478.git.stefano.lattarini@gmail.com> From: Stefano Lattarini Date: Fri, 28 Sep 2012 21:27:41 +0200 Subject: [PATCH] config headers: don't emit rules for headers not generated by autoheader This change fixed automake bug#12495. Even if an AC_CONFIG_HEADERS invocation is passed a list of several files as the first argument, only the first one of those file is considered by autoheader for automatic generation of the corresponding '.in' template. This is done on purpose, and is clearly documented in the Autoconf manual, which (as of the 2.69 version) reads something like this: The autoheader program searches for the first invocation of AC_CONFIG_HEADERS in configure sources to determine the name of the template. If the first call of AC_CONFIG_HEADERS specifies more than one input file name, autoheader uses the first one. That is, an invocation like: AC_CONFIG_HEADERS([config.h config2.h]) should cause autoheader to generate only a 'config.h.in' template, and not also a 'config2.h.in' one. Accordingly, automake, when tracing AC_CONFIG_HEADERS, should generate remake rules only for the template associated to the first input file name passed to that macro. In some situations, however, automake failed to properly limit itself in this way; for example, with an input like: AC_CONFIG_HEADERS([config.h sub/foo.h]) in configure.ac, and with the 'sub' directory listed in the SUBDIRS variable of the top-level Makefile, automake would erroneously generate in 'sub/Makefile.in' a rule to remake the 'foo.h.in' template by invoking autoheader. This issue was likely introduced in commit 'Release-1-8-23-g262bb92' of 2004-01-05. * NEWS: Update. * doc/automake.texi (Optional): Improve wording in the description of hat rules automake generates in response to an 'AC_CONFIG_HEADERS' invocation. * lib/am/remake-hdr.am: Only emit autoheader-invoking remake rules for the %CONFIG_HIN% template if that corresponds to the first argument of AC_CONFIG_HEADERS, as explaned above. Do so using the automake-time conditional %?FIRST-HDR%, that is properly passed ... * automake.in (handle_configure): ... from a 'file_contents' invocation in here. * t/autohdr-subdir-pr12495.sh: New test. * t/list-of-tests.mk: Add it. * THANKS: Update. Helped-by: Hib Eris Signed-off-by: Stefano Lattarini --- NEWS | 14 +++++++- THANKS | 1 + automake.in | 1 + doc/automake.texi | 8 +++-- lib/am/remake-hdr.am | 4 +-- t/autohdr-subdir-pr12495.sh | 80 +++++++++++++++++++++++++++++++++++++++++++++ t/list-of-tests.mk | 1 + 7 files changed, 103 insertions(+), 6 deletions(-) create mode 100755 t/autohdr-subdir-pr12495.sh diff --git a/NEWS b/NEWS index d67407f..aaa3ad3 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -New in 1.12.4: +New in 1.12.5: * WARNING: Future backward-incompatibilities! @@ -61,6 +61,18 @@ New in 1.12.4: giving more useful warnings than a bare "command not found" from a make recipe would. +Bugs fixed in 1.12.5: + +* Long-standing bugs: + + - Automake no longer generates spurious remake rules invoking autoheader + to regenerate the template corresponding to header files specified after + the first one in AC_CONFIG_HEADERS (automake bug#12495). + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +New in 1.12.4: + * Warnings and deprecations: - Warnings in the 'obsolete' category are enabled by default both in diff --git a/THANKS b/THANKS index ca95db8..88f539c 100644 --- a/THANKS +++ b/THANKS @@ -143,6 +143,7 @@ Harald Dunkel harald@CoWare.com Harlan Stenn Harlan.Stenn@pfcs.com He Li tippa000@yahoo.com Henrik Frystyk Nielsen frystyk@w3.org +Hib Eris hib@hiberis.nl Ian Lance Taylor ian@cygnus.com Ignacy Gawedzki i@lri.fr Илья Н. Голубев gin@mo.msk.ru diff --git a/automake.in b/automake.in index 8c8b127..944b985 100644 --- a/automake.in +++ b/automake.in @@ -4225,6 +4225,7 @@ sub handle_configure ($$$@) file_contents ('remake-hdr', new Automake::Location, FILES => "@files", + 'FIRST-HDR' => ($hdr_index == 1), CONFIG_H => $cn_sans_dir, CONFIG_HIN => $ins[0], CONFIG_H_DEPS => "@ins", diff --git a/doc/automake.texi b/doc/automake.texi index 0838822..914c1e8 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -2979,9 +2979,11 @@ Automake will require the sources file declared with macro. @item AC_CONFIG_HEADERS -Automake will generate rules to rebuild these headers. Older versions -of Automake required the use of @code{AM_CONFIG_HEADER} -(@pxref{Macros}); this is no longer the case. +Automake will generate rules to rebuild these headers from the +corresponding templates (usually, the template for a @file{foo.h} +header being @file{foo.h.in}). Older versions of Automake required +the use of @code{AM_CONFIG_HEADER} (@pxref{Macros}); this is no +longer the case. As with @code{AC_CONFIG_FILES} (@pxref{Requirements}), parts of the specification using shell variables will be ignored as far as diff --git a/lib/am/remake-hdr.am b/lib/am/remake-hdr.am index f61400a..3c7e346 100644 --- a/lib/am/remake-hdr.am +++ b/lib/am/remake-hdr.am @@ -30,7 +30,7 @@ ## Only the first file of AC_CONFIG_HEADERS is assumed to be generated ## by autoheader. -if %?FIRST% +if %?FIRST-HDR% %CONFIG_HIN%: %MAINTAINER-MODE% $(am__configure_deps) %FILES% ## Cater to parallel BSD make. ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) @@ -71,4 +71,4 @@ if %?FIRST% ## by config.status, there is no reason to make things complex for ## config.hin. touch $@ -endif %?FIRST% +endif %?FIRST-HDR% diff --git a/t/autohdr-subdir-pr12495.sh b/t/autohdr-subdir-pr12495.sh new file mode 100755 index 0000000..77d2522 --- /dev/null +++ b/t/autohdr-subdir-pr12495.sh @@ -0,0 +1,80 @@ +#! /bin/sh +# Copyright (C) 2012 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 . + +# Related to automake bug#12495: Automake shouldn't generate useless +# remake rules for AC_CONFIG_HEADERS arguments after the first one, +# not even when subdirs are involved. + +. ./defs || exit 1 + +cat >> configure.ac << 'END' +AC_CONFIG_HEADERS([a.h b.h sub/c.h]) +AC_CONFIG_FILES([sub/Makefile]) +AC_OUTPUT +END + +mkdir sub +echo SUBDIRS = sub > Makefile.am +: > sub/Makefile.am + +$ACLOCAL +$AUTOCONF +$AUTOHEADER +# Even if an AC_CONFIG_HEADERS invocation is passed several files in +# the first argument, only the first one is considered by autoheader +# for automatic generation. Otherwise, the present test case would +test -f a.h.in && test ! -f c.h.in && test ! -f sub/c.h.in \ + || fatal_ "unexpected autoheader behavior with multiple" \ + "AC_CONFIG_HEADERS arguments" +# Automake should require the missing headers though. +AUTOMAKE_fails -Wno-error -Wnone +grep "^configure\.ac:4:.* required file 'b.h.in' not found" stderr +grep "^configure\.ac:4:.* required file 'sub/c.h.in' not found" stderr +: > b.h.in +: > sub/c.h.in +$AUTOMAKE + +./configure + +# Automake should regenerate this. +grep '^$(srcdir)/a\.h\.in:' Makefile.in +# But not these. +grep '[bc]\.h\.in.*:' Makefile.in sub/Makefile.in && exit 1 + +test -f a.h && test -f b.h && test -f sub/c.h \ + || fatal_ "unexpected ./configure behavior with multiple" \ + "AC_CONFIG_HEADERS arguments" + +rm -f a.h.in a.h +$MAKE +test -f a.h.in +test -f a.h + +ocwd=$(pwd) +for x in b c; do + test $x = b || cd sub + rm -f $x.h.in + $MAKE $x.h.in 2>stderr && { cat stderr >&2; exit 1; } + cat stderr >&2 + test ! -f $x.h.in + if using_gmake; then + grep "No rule to make target [\`\"']$x\.h\.in[\`\"']" stderr + fi + : > $x.h.in + cd "$ocwd" || fatal_ "cannot chdir back" +done + +: diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk index 6effe77..b3ff6b2 100644 --- a/t/list-of-tests.mk +++ b/t/list-of-tests.mk @@ -158,6 +158,7 @@ t/autohdr.sh \ t/autohdr2.sh \ t/autohdr3.sh \ t/autohdr4.sh \ +t/autohdr-subdir-pr12495.sh \ t/autohdrdry.sh \ t/automake-cmdline.tap \ t/auxdir.sh \ -- 1.7.12.317.g1c54b74 From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 02 10:44:00 2012 Received: (at 12495) by debbugs.gnu.org; 2 Oct 2012 14:44:00 +0000 Received: from localhost ([127.0.0.1]:37861 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TJ3hY-0005sW-Da for submit@debbugs.gnu.org; Tue, 02 Oct 2012 10:44:00 -0400 Received: from mail-bk0-f44.google.com ([209.85.214.44]:46926) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TJ3hV-0005sK-Hp; Tue, 02 Oct 2012 10:43:58 -0400 Received: by bkcjc3 with SMTP id jc3so5434294bkc.3 for ; Tue, 02 Oct 2012 07:43:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=ZWynwIPJ/vw/TAqPn/Ue4iWqCeOaYk0d04DAy43Ux+s=; b=eAnzdL5T5bOoUr+fdjrtpQiEE0iN3co1Knn57l9oZD89HDykdvfsBJ+So4uHb1oLMK FWxWM0WKBn8T3fVBrnxDOg3pmCb8N68s3LqepsXzHAf3GuvDRqexTavmSYuU4DmyUfZH +gYkxSu7BoAWDIthrxoTB0yVGotD0wRYVjYFP0slP4o4B8n6enDxxu27APHpZY3jS7Lh 8EI3JsxKs7M2+hXNu4E5nfoYMcJutrXMWoHRo/3qLHXCWNZY5LWfIb1jQnT18702vIr+ gOVZr3bkiSzM9e3cfa2qfVymf/kMvIlOBd3gxiCLE2Ki4OdtLW1K3tT0FDTyJkvW4On2 LS6A== Received: by 10.204.146.13 with SMTP id f13mr6880001bkv.29.1349189004099; Tue, 02 Oct 2012 07:43:24 -0700 (PDT) Received: from [192.168.178.21] (host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194]) by mx.google.com with ESMTPS id ia2sm1458516bkc.11.2012.10.02.07.43.21 (version=SSLv3 cipher=OTHER); Tue, 02 Oct 2012 07:43:22 -0700 (PDT) Message-ID: <506AFD88.7080607@gmail.com> Date: Tue, 02 Oct 2012 16:43:20 +0200 From: Stefano Lattarini MIME-Version: 1.0 To: Hib Eris Subject: Re: bug#12495: AC_CONFIG_HEADERS with References: <505FFDB0.2090701@gmail.com> <50601F92.2020104@gmail.com> <50641071.5040903@gmail.com> <20120927142003.GA2586@elliptictech.com> <50655463.3010409@gmail.com> <50673B63.5040001@gmail.com> In-Reply-To: <50673B63.5040001@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 12495 Cc: Nick Bowler , Peter Johansson , "automake-patches@gnu.org" , 12495@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.1 (/) tags 12495 + patch close 12495 thanks On 09/29/2012 08:18 PM, Stefano Lattarini wrote: > Here is the patch finally. I will commit it in a couple of days if there > are no objections. As usual, comments are welcome. > > ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- > > Subject: [PATCH] config headers: don't emit rules for headers not generated by autoheader > > This change fixed automake bug#12495. > > Even if an AC_CONFIG_HEADERS invocation is passed a list of several files > as the first argument, only the first one of those file is considered by > autoheader for automatic generation of the corresponding '.in' template. > This is done on purpose, and is clearly documented in the Autoconf manual, > which (as of the 2.69 version) reads something like this: > > The autoheader program searches for the first invocation of > AC_CONFIG_HEADERS in configure sources to determine the name of > the template. If the first call of AC_CONFIG_HEADERS specifies > more than one input file name, autoheader uses the first one. > > That is, an invocation like: > > AC_CONFIG_HEADERS([config.h config2.h]) > > should cause autoheader to generate only a 'config.h.in' template, > and not also a 'config2.h.in' one. > > Accordingly, automake, when tracing AC_CONFIG_HEADERS, should generate > remake rules only for the template associated to the first input file > name passed to that macro. In some situations, however, automake failed > to properly limit itself in this way; for example, with an input like: > > AC_CONFIG_HEADERS([config.h sub/foo.h]) > > in configure.ac, and with the 'sub' directory listed in the SUBDIRS > variable of the top-level Makefile, automake would erroneously generate > in 'sub/Makefile.in' a rule to remake the 'foo.h.in' template by > invoking autoheader. > > This issue was likely introduced in commit 'Release-1-8-23-g262bb92' > of 2004-01-05. > > * NEWS: Update. > * doc/automake.texi (Optional): Improve wording in the description of > hat rules automake generates in response to an 'AC_CONFIG_HEADERS' > invocation. > * lib/am/remake-hdr.am: Only emit autoheader-invoking remake rules for > the %CONFIG_HIN% template if that corresponds to the first argument of > AC_CONFIG_HEADERS, as explaned above. Do so using the automake-time > conditional %?FIRST-HDR%, that is properly passed ... > * automake.in (handle_configure): ... from a 'file_contents' invocation > in here. > * t/autohdr-subdir-pr12495.sh: New test. > * t/list-of-tests.mk: Add it. > * THANKS: Update. > Pushed now. I'm thus closing this ticket. Thanks, Stefano From unknown Mon Jun 23 23:51:35 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 31 Oct 2012 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator