From unknown Sat Jun 21 03:30:37 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#13928 <13928@debbugs.gnu.org> To: bug#13928 <13928@debbugs.gnu.org> Subject: Status: foo_SOURCES containing unexpanded $(var) breaks with 'subdir-object' option active Reply-To: bug#13928 <13928@debbugs.gnu.org> Date: Sat, 21 Jun 2025 10:30:37 +0000 retitle 13928 foo_SOURCES containing unexpanded $(var) breaks with 'subdir-= object' option active reassign 13928 automake submitter 13928 Bert Wesarg severity 13928 important tag 13928 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 11 17:03:38 2013 Received: (at submit) by debbugs.gnu.org; 11 Mar 2013 21:03:38 +0000 Received: from localhost ([127.0.0.1]:46911 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UF9sf-00013l-9K for submit@debbugs.gnu.org; Mon, 11 Mar 2013 17:03:37 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40742) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UF9sb-00013Y-NA for submit@debbugs.gnu.org; Mon, 11 Mar 2013 17:03:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UF9ra-0002fB-DM for submit@debbugs.gnu.org; Mon, 11 Mar 2013 17:02:32 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-101.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID,USER_IN_WHITELIST autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:53595) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UF9ra-0002f0-9r for submit@debbugs.gnu.org; Mon, 11 Mar 2013 17:02:30 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UF9rX-0007gD-3w for bug-automake@gnu.org; Mon, 11 Mar 2013 17:02:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UF9rR-0002dL-PM for bug-automake@gnu.org; Mon, 11 Mar 2013 17:02:27 -0400 Received: from mail-wi0-x22a.google.com ([2a00:1450:400c:c05::22a]:49539) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UF9kZ-0000WU-5u; Mon, 11 Mar 2013 16:55:15 -0400 Received: by mail-wi0-f170.google.com with SMTP id hm11so1448894wib.3 for ; Mon, 11 Mar 2013 13:55:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=6OKqRaYhyCaU5CWtPM4te8U4/b8boGSYFnpRitcjN+g=; b=qpzG/rTtwE5D16AqQX86AUawIC4IAI9MZXzJEabdPzoGZLx2I9/bvq3JtiqZabVveQ /9Aw2p+1FgO4hQnMfSLkXD/Lqxynq7mIcS2i20uEwnI6Vyc+tp5BdWFnXfF8aAHySr26 5CTPLmXFLtFEEB2JW/P+3oTz3Fi8HwoxP7KDQ4uRcFXgrv8jXz8ddCO40nX9z9fTZTML m8ozfnoa0oN5wS50o4w4QhI86ogjhxxX8/nCa/5GlX4PG9doscixz3osbXXHGcY77n5M 26HwhEabcAVyn/zN73pkJcMNRzvfP7gCK+sVtHEyclAfm765bNKbe30vmsCpOTTkAOyA Kl+g== X-Received: by 10.180.88.168 with SMTP id bh8mr15583160wib.15.1363035314228; Mon, 11 Mar 2013 13:55:14 -0700 (PDT) Received: from [192.168.178.20] (host93-95-dynamic.6-79-r.retail.telecomitalia.it. [79.6.95.93]) by mx.google.com with ESMTPS id er3sm18153434wib.1.2013.03.11.13.55.10 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 11 Mar 2013 13:55:13 -0700 (PDT) Message-ID: <513E44AC.6040705@gmail.com> Date: Mon, 11 Mar 2013 21:55:08 +0100 From: Stefano Lattarini MIME-Version: 1.0 To: Bert Wesarg Subject: VPATH issues with subdir-objects (was: [PATCH 1/2] preproc: add support for relative names in included fragments) References: <5114F008.3010300@gmail.com> <511CDB0D.2020103@gmail.com> <513DA80F.4070802@gmail.com> <513E2941.7080900@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: submit Cc: bug-automake@gnu.org, Peter Rosin , Bob Friesenhahn , Eric Blake , Miles Bader 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.1 (------) On 03/11/2013 08:45 PM, Bert Wesarg wrote: > [ Removing patches@ and 13524@ from Cc. ] > I think it's better if this discussion remains public. I'm re-adding automake-patches, and since you have apparently uncovered a new bug in automake, I'm also re-adding bug-automake, so that this discussion will be registered in the bug tracker. > On Mon, Mar 11, 2013 at 7:58 PM, Stefano Lattarini > wrote: >> On 03/11/2013 01:05 PM, Bert Wesarg wrote: >>> On Mon, Mar 11, 2013 at 10:46 AM, Stefano Lattarini >>> wrote: >>>> On 03/11/2013 10:31 AM, Bert Wesarg wrote: >>>>> I have the impression that variable references in filenames aren't >>>>> supported anyway, right? >>>>> >>>> Wrong, actually. >>> >>> But when I prefixing a source file with '$(src)/' and use >>> subdir-objects then I get something like this in the Makefile.in >>> >>> $(src)/test-test.o: $(src)/test.c >>> >>> And after a configure I get an '$(src)' directory in my build dir. >>> >> Yes -- and this is intended behavior of subdir-objects. Why do you >> think Automake is acting wrong? (Honest question, I might be missing >> something here ...) > > Why would I want a directory named '$(src)' in my build directory? > Oh, but $(src) would of course be expanded at make runtime, not used literally. > If anything than this variable should be resolved. > And it isn't? That would be a bug. (Apparently, from what I read below, this indeed the case, sadly). > Anyway, when running make I get: > > Makefile:299: .deps/test-test.Po: No such file or directory > make: *** No rule to make target `.deps/test-test.Po'. Stop. > > Because the file '.deps/test-test.Po' is here > '$(src)/.deps/test-test.Po', literally. So maybe automake is not to > blame here but the autoconf machinery which creates the dummy .Po > files at configure time. > Ah, I think I'm beginning to understand the issue. This appears to be an actual bug. And since that configure machinery comes from Automake provided macros, it is an Automake bug :-( Since I'm short of time right now, I won't be able to pursue this issue shortly, nor write a proper test case. If you can and want offer one, that would be great; otherwise, I hope I'll be able to write one myself in reasonable time. And here is a quick and brutal proposal to resolve the issue: - since it's not a regression, simply keep the buggy behaviour in the 1.x Automake series; - from Automake 2.0 onward, only enable the automatic dependency tracking if GNU make is used; we can thus assume the presence of the "-include" directive (which ignore non-existing files, rather than punting), and its use will allow us to get rid of the configure time machinery for the initial creation of .deps directories (this has already been done in Automake-NG, and has worked beautifully so far). I think the approach described above is acceptable because automatic dependency tracking is important only for developers or power users, and those should be using GNU make anyway. > Actually, I first prefixed it with '$(srcdir)/', > > test_SOURCES = $(srcdir)/test.c > > just to see the generated make rule: > > $(srcdir)/test-test.o: $(srcdir)/test.c > > which would completely circumvent VPATH builds, would it? > Yes. The answer is: don't use $(srcdir) in your source files -- they will be picked up anyway thanks to VPATH. A better and more friendly solution would be to enhance Automake so that it can understand that the object file generated from a '$(srcdir)/foo.c' is to be placed in the build directory even when the 'subdir-object' option is active -- which is clearly the right thing to do. As usual, patches welcome (just having a test case exposing the issue would be a good start). > But than I > saw the '$(srcdir)' directory which just looks very odd. Than I used > another variable to see the same behavior. > > I tried playing with this after you mentioned to make subdir-objects > the default sometime in the future and our automake files use > extensively variable references in the source file names. > And it's very appreciated that you have taken the time to bring these issues up. Thank you. Best regards, Stefano From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 11 17:25:42 2013 Received: (at control) by debbugs.gnu.org; 11 Mar 2013 21:25:42 +0000 Received: from localhost ([127.0.0.1]:46948 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UFAE2-0001ZF-A9 for submit@debbugs.gnu.org; Mon, 11 Mar 2013 17:25:42 -0400 Received: from mail-ea0-f175.google.com ([209.85.215.175]:43115) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UFADz-0001Z0-Qb for control@debbugs.gnu.org; Mon, 11 Mar 2013 17:25:40 -0400 Received: by mail-ea0-f175.google.com with SMTP id o10so1402257eaj.20 for ; Mon, 11 Mar 2013 14:24:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:mime-version:to:subject :content-type:content-transfer-encoding; bh=VPNneXyPzJk+ye62RgV6Xuv3JYkxrI/L5lTXmLrXzo0=; b=LG+uYOI1Wu28k4N3WoRE/sVen0WM5sarmnsHFnl2/Ysy22MKBHjNR1gbfclUMYOL0n ybFQol/lxt2MZ4PT43fgniOjeum06CIpQ67PbY0dDgjRiHC+W97SeurE3PrNbVAPv9fN ahCvTEBXBUceIcaMBY+jlVmxaffMqGLfuALlZQ6b7v0vJ2cCdkLITl+Xf3nNLaYMvI4E Qq5H2p9ckARf5lub49eOo8wFo/C9bV34+gmgUHzE2Vtz7St3Q8PD0E0Chif85iNnnaVb XdbFmK7i+IjZcvlV2tZOLvtI33z+cBWxsAIgKFZRxYjCciZN79UygYmJRdJwcdRCpOWF coFQ== X-Received: by 10.14.111.72 with SMTP id v48mr40682029eeg.11.1363037077584; Mon, 11 Mar 2013 14:24:37 -0700 (PDT) Received: from [192.168.178.20] (host93-95-dynamic.6-79-r.retail.telecomitalia.it. [79.6.95.93]) by mx.google.com with ESMTPS id h5sm25825979eem.1.2013.03.11.14.24.35 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 11 Mar 2013 14:24:36 -0700 (PDT) Message-ID: <513E4B92.8020008@gmail.com> Date: Mon, 11 Mar 2013 22:24:34 +0100 From: Stefano Lattarini MIME-Version: 1.0 To: GNU bug tracker automated control server Subject: x Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: control 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.7 (/) submitter 13928 Bert Wesarg retitle 13928 VPATH issues with subdir-objects thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 11 17:28:28 2013 Received: (at control) by debbugs.gnu.org; 11 Mar 2013 21:28:28 +0000 Received: from localhost ([127.0.0.1]:46958 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UFAGh-0001dl-1U for submit@debbugs.gnu.org; Mon, 11 Mar 2013 17:28:28 -0400 Received: from mail-ea0-f182.google.com ([209.85.215.182]:62124) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UFAGf-0001dX-2X for control@debbugs.gnu.org; Mon, 11 Mar 2013 17:28:25 -0400 Received: by mail-ea0-f182.google.com with SMTP id q15so1452060ead.41 for ; Mon, 11 Mar 2013 14:27:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:mime-version:to:subject :content-type:content-transfer-encoding; bh=PN+iDTcM0dpHynT/Q9PWsCQvHpMpH/39sEtZFEL4UQk=; b=ZpbwD8xkSkLfq72S1w5v3xYauxfItsgPwq5iKEW5ChrqlEEBODeZV70CeWq4nkvhhG yeuQQr/rePdv9k2e7ihrQGwgxaTKWO5IBKK1gqXzTFVVMs2+5fXaq/lQi8moS1YR17ei 7FeZ7uvLBVkbDcUDbih8iXeEc08uvVyT5uQzqHBNaIgVowahIxwQo9Eu7xMcQTRPktkT zpRd26xhHHGcxJm6IiZuWZLbLkJP2rRnbV7ZbN/9H1pHe9CIBh2Wt19eaIvRZPelipds JAj7Qy0hErK+22Y8o6PeY210JYSv5+EAWc116nDyLEQ5zT39bayF17iwspaXaHr7m67x SKqw== X-Received: by 10.14.175.129 with SMTP id z1mr40876716eel.7.1363037243303; Mon, 11 Mar 2013 14:27:23 -0700 (PDT) Received: from [192.168.178.20] (host93-95-dynamic.6-79-r.retail.telecomitalia.it. [79.6.95.93]) by mx.google.com with ESMTPS id r4sm25824244eeo.12.2013.03.11.14.27.21 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 11 Mar 2013 14:27:22 -0700 (PDT) Message-ID: <513E4C38.9060801@gmail.com> Date: Mon, 11 Mar 2013 22:27:20 +0100 From: Stefano Lattarini MIME-Version: 1.0 To: GNU bug tracker automated control server Subject: x Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: control 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.7 (/) tags 13928 - patch thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 11 17:34:40 2013 Received: (at 13928) by debbugs.gnu.org; 11 Mar 2013 21:34:40 +0000 Received: from localhost ([127.0.0.1]:46967 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UFAMi-0002gm-0d for submit@debbugs.gnu.org; Mon, 11 Mar 2013 17:34:40 -0400 Received: from mx.scalarmail.ca ([98.158.95.75]:57063 helo=ironport-01.sms.scalar.ca) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UFAMf-0002gX-OG for 13928@debbugs.gnu.org; Mon, 11 Mar 2013 17:34:38 -0400 Received: from unknown (HELO sms-zimbra-mta-01.sms.scalar.ca) ([192.168.32.56]) by ironport-01.sms.scalar.ca with ESMTP; 11 Mar 2013 17:33:35 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by sms-zimbra-mta-01.sms.scalar.ca (Postfix) with ESMTP id 83C96DBB09; Mon, 11 Mar 2013 17:33:35 -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 pPZldTOXqe6d; Mon, 11 Mar 2013 17:33:34 -0400 (EDT) Received: from mail.ellipticsemi.com (mail.elliptictech.com [209.217.122.41]) (Authenticated sender: nbowler@elliptictech.com) by sms-zimbra-mta-01.sms.scalar.ca (Postfix) with ESMTPSA id 8FC12DB948; Mon, 11 Mar 2013 17:33:34 -0400 (EDT) Date: Mon, 11 Mar 2013 17:33:34 -0400 From: Nick Bowler To: Stefano Lattarini Subject: Re: bug#13928: VPATH issues with subdir-objects (was: [PATCH 1/2] preproc: add support for relative names in included fragments) Message-ID: <20130311213333.GA9058@elliptictech.com> References: <511CDB0D.2020103@gmail.com> <513DA80F.4070802@gmail.com> <513E2941.7080900@gmail.com> <513E44AC.6040705@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <513E44AC.6040705@gmail.com> Organization: Elliptic Technologies Inc. User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 13928 Cc: 13928@debbugs.gnu.org, peda@lysator.liu.se, bfriesen@simple.dallas.tx.us, Bert Wesarg , eblake@redhat.com, miles@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.5 (/) On 2013-03-11 21:55 +0100, Stefano Lattarini wrote: [...] > - from Automake 2.0 onward, only enable the automatic dependency > tracking if GNU make is used; we can thus assume the presence > of the "-include" directive (which ignore non-existing files, > rather than punting), and its use will allow us to get rid of > the configure time machinery for the initial creation of .deps > directories (this has already been done in Automake-NG, and has > worked beautifully so far). > > I think the approach described above is acceptable because automatic > dependency tracking is important only for developers or power users, > and those should be using GNU make anyway. I can't say I'm a big fan of breaking the current wide-support of automatic dependency tracking in Automake. While not universal, the automatic dependency tracking currently works with many different make implementations (particularly those provided by the BSD flavours). I also don't agree with the rationale that only developers and "power users" need this feature. The most obvious class of users who may need this feature are those applying patches sent by a maintainer to test a bug fix. Particularly if those users are running on an exotic platform without GNU make that the maintainer would not otherwise have access to. Or users who want to run "git bisect" -- I've done this on packages with buggy incremental builds before, and it's not a lot of fun. Ideally, we should try to fix the bug before ripping out an otherwise-working feature. Cheers, -- Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/) From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 11 18:28:20 2013 Received: (at 13928) by debbugs.gnu.org; 11 Mar 2013 22:28:20 +0000 Received: from localhost ([127.0.0.1]:47020 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UFBCd-0003tb-CN for submit@debbugs.gnu.org; Mon, 11 Mar 2013 18:28:19 -0400 Received: from mail-ee0-f51.google.com ([74.125.83.51]:37956) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UFBCa-0003tN-JX for 13928@debbugs.gnu.org; Mon, 11 Mar 2013 18:28:18 -0400 Received: by mail-ee0-f51.google.com with SMTP id d17so2403839eek.38 for <13928@debbugs.gnu.org>; Mon, 11 Mar 2013 15:27:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=bIjLuP3iUeYo2ufSr9KUT+rOx4EUnUWBkKFBQLB2w0E=; b=01hhmAz1tc8sQyqY0M8CJl5yYCHmlcvdVPisVg2fH7Z1XQLApSRQGiZwtCycTfCpQS q8jaVEZ3Xm8tAKg3ZTVL9/7zEehJ8a2D015kvM5Hdjt7s4HwoaVdcoqFGyPa3Icf59uz 50SHs4q8sMsQUQNTv2hXkFbRXRJO8UhB3rvxtCbFXBiz7Ov48v63e9p7bVieTtD7WbmV zSdtuUgT9eCq+vNqtSpDcaVOLzDcKmSzXdC3tdTRbAB++r4Wbc8UPvPEgcJOz6b+Tcqc E5/yFSKtP1XoqbT583LANBV1+aRMQ1oV4AD4nvAGF14c/9HGPtfQ18mBPM5MzZyFt+Ss bk5Q== X-Received: by 10.14.223.199 with SMTP id v47mr40829583eep.18.1363040834320; Mon, 11 Mar 2013 15:27:14 -0700 (PDT) Received: from [192.168.178.20] (host93-95-dynamic.6-79-r.retail.telecomitalia.it. [79.6.95.93]) by mx.google.com with ESMTPS id z45sm26068935eeu.10.2013.03.11.15.27.12 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 11 Mar 2013 15:27:13 -0700 (PDT) Message-ID: <513E5A3F.6030906@gmail.com> Date: Mon, 11 Mar 2013 23:27:11 +0100 From: Stefano Lattarini MIME-Version: 1.0 To: Nick Bowler Subject: Re: bug#13928: VPATH issues with subdir-objects References: <511CDB0D.2020103@gmail.com> <513DA80F.4070802@gmail.com> <513E2941.7080900@gmail.com> <513E44AC.6040705@gmail.com> <20130311213333.GA9058@elliptictech.com> In-Reply-To: <20130311213333.GA9058@elliptictech.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 13928 Cc: 13928@debbugs.gnu.org, peda@lysator.liu.se, bfriesen@simple.dallas.tx.us, Bert Wesarg , eblake@redhat.com, miles@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 03/11/2013 10:33 PM, Nick Bowler wrote: > On 2013-03-11 21:55 +0100, Stefano Lattarini wrote: > [...] >> - from Automake 2.0 onward, only enable the automatic dependency >> tracking if GNU make is used; we can thus assume the presence >> of the "-include" directive >> Actually, to be more precise, we could simply test at runtime if that directive is supported by the target make implementation (there is already code that does so for the "include" directive, so we shouldn't need any real new code or logic); or at least, if some equivalent directive is available. If yes, we can enable automatic dependency tracking (without having to worry about the GNU vs. non-GNU make issue at all). But sadly, it appears that in practice GNU make is the only make flavor to actually implement this kind feature so far :-/ so all of this is moot. >> (which ignore non-existing files, >> rather than punting), and its use will allow us to get rid of >> the configure time machinery for the initial creation of .deps >> directories (this has already been done in Automake-NG, and has >> worked beautifully so far). >> >> I think the approach described above is acceptable because automatic >> dependency tracking is important only for developers or power users, >> and those should be using GNU make anyway. > > I can't say I'm a big fan of breaking the current wide-support of > automatic dependency tracking in Automake. While not universal, the > automatic dependency tracking currently works with many different make > implementations (particularly those provided by the BSD flavours). > [In fact, it works with every version of make that supports the 'include' directive -- including, e.g., Solaris make]. > I also don't agree with the rationale that only developers and "power > users" need this feature. The most obvious class of users who may need > this feature are those applying patches sent by a maintainer to test a > bug fix. > OK, fair point here. > Particularly if those users are running on an exotic platform > without GNU make > Which makes me ask again, as I've done many times already: does such platforms truly exist, and if yes, are they really relevant and worth bending over backwards for? > that the maintainer would not otherwise have access to. > > Or users who want to run "git bisect" -- I've done this on packages with > buggy incremental builds before, and it's not a lot of fun. > They could use GNU make for that. Developers should be using it anyway ;-) > Ideally, we should try to fix the bug before ripping out an > otherwise-working feature. > If someone volunteers to write a patch for such a fix, I certainly won't object to it. But I'm not going to do it myself anytime soon (and likely, not even anytime later). Regards, Stefano From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 12 10:10:43 2013 Received: (at 13928) by debbugs.gnu.org; 12 Mar 2013 14:10:43 +0000 Received: from localhost ([127.0.0.1]:48955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UFPuc-0004Er-JY for submit@debbugs.gnu.org; Tue, 12 Mar 2013 10:10:43 -0400 Received: from mx.scalarmail.ca ([98.158.95.75]:12588 helo=ironport-01.sms.scalar.ca) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UFPuW-0004EU-Gi for 13928@debbugs.gnu.org; Tue, 12 Mar 2013 10:10:42 -0400 Received: from unknown (HELO sms-zimbra-mta-02.sms.scalar.ca) ([192.168.32.56]) by ironport-01.sms.scalar.ca with ESMTP; 12 Mar 2013 10:09:30 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by sms-zimbra-mta-02.sms.scalar.ca (Postfix) with ESMTP id 762A587BDB; Tue, 12 Mar 2013 10:09:30 -0400 (EDT) X-Virus-Scanned: amavisd-new at sms-zimbra-mta-02.sms.scalar.ca 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 fTmFZrNCEeDc; Tue, 12 Mar 2013 10:09:29 -0400 (EDT) Received: from mail.ellipticsemi.com (mail.elliptictech.com [209.217.122.41]) (Authenticated sender: nbowler@elliptictech.com) by sms-zimbra-mta-02.sms.scalar.ca (Postfix) with ESMTPSA id 6458387C11; Tue, 12 Mar 2013 10:09:29 -0400 (EDT) Date: Tue, 12 Mar 2013 10:09:29 -0400 From: Nick Bowler To: Stefano Lattarini Subject: Re: bug#13928: VPATH issues with subdir-objects Message-ID: <20130312140929.GA19734@elliptictech.com> References: <511CDB0D.2020103@gmail.com> <513DA80F.4070802@gmail.com> <513E2941.7080900@gmail.com> <513E44AC.6040705@gmail.com> <20130311213333.GA9058@elliptictech.com> <513E5A3F.6030906@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <513E5A3F.6030906@gmail.com> Organization: Elliptic Technologies Inc. User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 13928 Cc: 13928@debbugs.gnu.org, peda@lysator.liu.se, bfriesen@simple.dallas.tx.us, Bert Wesarg , eblake@redhat.com, miles@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 2013-03-11 23:27 +0100, Stefano Lattarini wrote: > On 03/11/2013 10:33 PM, Nick Bowler wrote: > > On 2013-03-11 21:55 +0100, Stefano Lattarini wrote: > > [...] > >> - from Automake 2.0 onward, only enable the automatic dependency > >> tracking if GNU make is used; we can thus assume the presence > >> of the "-include" directive > >> > Actually, to be more precise, we could simply test at runtime if that > directive is supported by the target make implementation (there is > already code that does so for the "include" directive, so we shouldn't > need any real new code or logic); or at least, if some equivalent > directive is available. If yes, we can enable automatic dependency > tracking (without having to worry about the GNU vs. non-GNU make issue > at all). But sadly, it appears that in practice GNU make is the only > make flavor to actually implement this kind feature so far :-/ so all > of this is moot. FWIW, I believe that NetBSD make supports -include as well. [...] > > Particularly if those users are running on an exotic platform > > without GNU make > > > > Which makes me ask again, as I've done many times already: does such > platforms truly exist, and if yes, are they really relevant and > worth bending over backwards for? > A platform on which GNU make does not run at all? Probably not, as GNU make itself is very portable. But platforms which do not have it installed by default are easy to find: FreeBSD, for example. More importantly, the problems caused by incomplete make dependencies may not be obvious as an error when building the package: it's entirely possible that the package will build successfully, but incompletely, after modifying the sources, only causing incorrect behaviour later when the program is run. [...] > > Ideally, we should try to fix the bug before ripping out an > > otherwise-working feature. > > If someone volunteers to write a patch for such a fix, I certainly won't > object to it. But I'm not going to do it myself anytime soon (and likely, > not even anytime later). Regarding the actual bug: without knowing much (yet!) about the relevant Automake internals, I'm a bit surprised that src = src foo_SOURCES = $(src)/foo.c fails with subdir-objects, but on the other hand src = src/foo.c foo_SOURCES = $(src) seems to work just fine... Cheers, -- Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/) From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 12 10:40:29 2013 Received: (at 13928) by debbugs.gnu.org; 12 Mar 2013 14:40:29 +0000 Received: from localhost ([127.0.0.1]:48985 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UFQNP-0004yw-Kr for submit@debbugs.gnu.org; Tue, 12 Mar 2013 10:40:28 -0400 Received: from mail-lb0-f175.google.com ([209.85.217.175]:36598) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UFQNM-0004yg-PQ for 13928@debbugs.gnu.org; Tue, 12 Mar 2013 10:40:25 -0400 Received: by mail-lb0-f175.google.com with SMTP id n3so41123lbo.6 for <13928@debbugs.gnu.org>; Tue, 12 Mar 2013 07:39:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=lDzmNR5IvkTLbtQpRpG+MYz9bIro6RfAQT4tIYkwTLc=; b=P8ShBd/LUGFkQMhkV4bsb3lFJxJ9rNpFZF+kJka34PckxjSe9Ey2Ep4bR4TFIexbG7 vuo6iU1MXpAw9C408dJCqPSpccqZAW6Ad5IuqGOLIeasW1aJtejI+w5iB8sRsmN+hY0R tBpUIYa8RaR5yV87rA5rKYi/7Dq+MQ3cmpthFyVnVxm1hHqOTWXxsyH+HUGi2jDBJLuB xMrvWIcE2AvA7qDKp66UI8TIbMcA8Xe6dFzbp7/WzyPZ4Y7vX1IkewLVzEhOhbDYLPet d1JILJeAkBf/y+Y9eYlhlj8Ad2mpagKbF4AHShJ0J7Ogx0kCgItM4gWjC1e50eY1JFem kMsw== MIME-Version: 1.0 X-Received: by 10.152.104.36 with SMTP id gb4mr14294200lab.13.1363099158174; Tue, 12 Mar 2013 07:39:18 -0700 (PDT) Received: by 10.112.163.97 with HTTP; Tue, 12 Mar 2013 07:39:18 -0700 (PDT) In-Reply-To: <20130312140929.GA19734@elliptictech.com> References: <511CDB0D.2020103@gmail.com> <513DA80F.4070802@gmail.com> <513E2941.7080900@gmail.com> <513E44AC.6040705@gmail.com> <20130311213333.GA9058@elliptictech.com> <513E5A3F.6030906@gmail.com> <20130312140929.GA19734@elliptictech.com> Date: Tue, 12 Mar 2013 15:39:18 +0100 Message-ID: Subject: Re: bug#13928: VPATH issues with subdir-objects From: Bert Wesarg To: Nick Bowler Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 13928 Cc: 13928@debbugs.gnu.org, peda@lysator.liu.se, Stefano Lattarini , bfriesen@simple.dallas.tx.us, eblake@redhat.com, miles@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 (--) > Regarding the actual bug: without knowing much (yet!) about the relevant > Automake internals, I'm a bit surprised that > > src = src > foo_SOURCES = $(src)/foo.c > > fails with subdir-objects, but on the other hand > > src = src/foo.c > foo_SOURCES = $(src) > > seems to work just fine... That's because automake expands entries in _SURCES which are only variable references. It needs to because of AM_CONDITIONAL. In case the value of _SOURCES is subject to an condition, the conditional source file name is stored in an intermediate variable but the actual assignment happens only if the condition is TRUE. But the intermediate variable is unconditionally added to the _SOURCES variable. Bert > > Cheers, From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 08 17:08:40 2013 Received: (at 13928) by debbugs.gnu.org; 8 Jun 2013 21:08:41 +0000 Received: from localhost ([127.0.0.1]:59020 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UlQNJ-0005ao-Ds for submit@debbugs.gnu.org; Sat, 08 Jun 2013 17:08:40 -0400 Received: from mail-ea0-f171.google.com ([209.85.215.171]:49770) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UlQND-0005EC-Hz for 13928@debbugs.gnu.org; Sat, 08 Jun 2013 17:08:35 -0400 Received: by mail-ea0-f171.google.com with SMTP id m14so4430234eaj.2 for <13928@debbugs.gnu.org>; Sat, 08 Jun 2013 14:08:17 -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=Ebsc/ihVVhCh2Dba2+jLp+Q4yNRaRMUx3wMRJOwrAW8=; b=cozeQYuIpddgjpOT2+nA1EETLgMgYKcRv1blluMFqea1CnnsRVn1XFSasHme2+2wiP iVng0C3AOr4a8CxlUUto13DmRefUB7/TVmqGTWyoBgJCHuD6D+Lc4QQFr6DmKHkY3pR/ YtLsb8hL7C+/N3Nb6ecKa5neOh7WcAirFF6x6fLSGgoTQ4dBRdC4NWHITH7YX5l3gh75 zfVHE3F8s6omFv64IGaq1/hiOeYzOdP4FMI6Ihgctshgq54m6m8nn2aE+QyV7Cvn0bCS GmqTsKFh/r3qNuSlQfTu9gphDOaDxDegTEyFKAk5nr731lTwVl8sHyMGL4NbJrf70Ll4 egQQ== X-Received: by 10.14.94.3 with SMTP id m3mr4315329eef.66.1370725697729; Sat, 08 Jun 2013 14:08:17 -0700 (PDT) Received: from [192.168.178.20] (host93-95-dynamic.6-79-r.retail.telecomitalia.it. [79.6.95.93]) by mx.google.com with ESMTPSA id y2sm9609881eeu.2.2013.06.08.14.08.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 08 Jun 2013 14:08:16 -0700 (PDT) Message-ID: <51B39D3E.5030003@gmail.com> Date: Sat, 08 Jun 2013 23:08:14 +0200 From: Stefano Lattarini MIME-Version: 1.0 To: Bert Wesarg Subject: Re: bug#13928: VPATH issues with subdir-objects References: <511CDB0D.2020103@gmail.com> <513DA80F.4070802@gmail.com> <513E2941.7080900@gmail.com> <513E44AC.6040705@gmail.com> <20130311213333.GA9058@elliptictech.com> <513E5A3F.6030906@gmail.com> <20130312140929.GA19734@elliptictech.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 13928 Cc: Nick Bowler , 13928@debbugs.gnu.org, peda@lysator.liu.se, "automake-patches@gnu.org" , bfriesen@simple.dallas.tx.us, eblake@redhat.com, miles@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.7 (/) [+cc automake-patches] Reference: Hello everybody, sorry for the delay. On 11/03/2013 01:05 PM, Bert Wesarg wrote (more or less): > > But when I prefix a source file with '$(src)/' and use > subdir-objects then I get something like this in the Makefile.in > > $(src)/test-test.o: $(src)/test.c > > And after a configure I get in my build dir a directory named > literally "$(src)". > > Why would I want a directory named "$(src)" in my build > directory? If anything than the $(src) make variable should > be resolved. Anyway, when running make I get: > > Makefile:299: .deps/test-test.Po: No such file or directory > make: *** No rule to make target `.deps/test-test.Po'. Stop. > On 12/03/2013 03:39 PM, Bert Wesarg wrote: > > Regarding the actual bug: without knowing much (yet!) about the relevant > Automake internals, I'm a bit surprised that > > src = src > foo_SOURCES = $(src)/foo.c > > fails with subdir-objects, but on the other hand > > src = src/foo.c > foo_SOURCES = $(src) > > seems to work just fine... > Still not sure when I'll manage to look into these issues properly. But in the meantime, I've at least added a couple of test cases to expose them. See the patch below. Will soon push it to 'micro'. Regards, Stefano ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- >From 004eba9b3c19747652fa9feab9846d646c83f5d8 Mon Sep 17 00:00:00 2001 Message-Id: <004eba9b3c19747652fa9feab9846d646c83f5d8.1370725645.git.stefano.lattarini@gmail.com> From: Stefano Lattarini Date: Sat, 8 Jun 2013 22:00:32 +0200 Subject: [PATCH] tests: expose automake bug#13928 * t/subobj-indir-pr13928.sh: New test, still xfailing. * t/subobj-vpath-pr13928.sh: Likewise. * t/list-of-tests.mk (XFAIL_TESTS, handwritten_TESTS): Update. Signed-off-by: Stefano Lattarini --- t/list-of-tests.mk | 4 ++++ t/subobj-indir-pr13928.sh | 49 ++++++++++++++++++++++++++++++++++++++ t/subobj-vpath-pr13928.sh | 60 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 113 insertions(+) create mode 100644 t/subobj-indir-pr13928.sh create mode 100644 t/subobj-vpath-pr13928.sh diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk index 68ca58c..1d7cf87 100644 --- a/t/list-of-tests.mk +++ b/t/list-of-tests.mk @@ -40,6 +40,8 @@ t/java-nobase.sh \ t/objext-pr10128.sh \ t/remake-timing-bug-pr8365.sh \ t/lex-subobj-nodep.sh \ +t/subobj-indir-pr13928.sh \ +t/subobj-vpath-pr13928.sh \ t/remake-am-pr10111.sh \ t/remake-m4-pr10111.sh \ $(perl_fake_XFAIL_TESTS) @@ -1034,6 +1036,8 @@ t/subobj11c.sh \ t/subobjname.sh \ t/subobj-clean-pr10697.sh \ t/subobj-clean-lt-pr10697.sh \ +t/subobj-indir-pr13928.sh \ +t/subobj-vpath-pr13928.sh \ t/subpkg.sh \ t/subpkg2.sh \ t/subpkg3.sh \ diff --git a/t/subobj-indir-pr13928.sh b/t/subobj-indir-pr13928.sh new file mode 100644 index 0000000..11b865c --- /dev/null +++ b/t/subobj-indir-pr13928.sh @@ -0,0 +1,49 @@ +#! /bin/sh +# Copyright (C) 2013 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 . + +# Expose part of Automake bug#13928: config.status generates broken +# makefiles if the subdir-objects option is used and a _SOURCES +# variable lists sources whose directory part is specified as a +# make variable ("foo_SOURCES = $(src)/foo.c"). + +required=cc +. test-init.sh + +cat >> configure.ac << 'END' +AC_PROG_CC +AM_PROG_CC_C_O +AC_OUTPUT +END + +cat > Makefile.am <<'END' +AUTOMAKE_OPTIONS = subdir-objects +src = s +bin_PROGRAMS = foo +foo_SOURCES = $(src)/foo.c +END + +mkdir s +echo 'int main(void) { return 0; }' > s/foo.c + +$ACLOCAL && $AUTOCONF && $AUTOMAKE -a || fatal_ "autotools failed" + +./configure +$MAKE +test -f s/.deps/foo.Po +find . | $FGREP '$(src)' && exit 1 +$MAKE distcheck + +: diff --git a/t/subobj-vpath-pr13928.sh b/t/subobj-vpath-pr13928.sh new file mode 100644 index 0000000..96cb219 --- /dev/null +++ b/t/subobj-vpath-pr13928.sh @@ -0,0 +1,60 @@ +#! /bin/sh +# Copyright (C) 2013 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 . + +# Expose part of automake bug#13928: if the subdir-objects option is +# in use and a source file is listed in a _SOURCES variable with a +# leading $(srcdir) component, Automake will generate a Makefile that +# tries to create the corresponding object file in $(srcdir) as well. + +required=cc +. test-init.sh + +cat >> configure.ac << 'END' +AC_PROG_CC +AM_PROG_CC_C_O +AC_OUTPUT +END + +cat > Makefile.am <<'END' +AUTOMAKE_OPTIONS = subdir-objects +noinst_PROGRAMS = test +test_SOURCES = $(srcdir)/test.c +test-objs: + test ! -f $(srcdir)/test.$(OBJEXT) + test -f test.$(OBJEXT) +END + +$ACLOCAL && $AUTOCONF && $AUTOMAKE -a || fatal_ "autotools failed" + +$EGREP 'test\.|DEPDIR|dirstamp|srcdir' Makefile.in || : # For debugging. +$EGREP '\$.srcdir./test\.[o$]' Makefile.in && exit 1 +$FGREP '$(srcdir)/$(am__dirstamp)' Makefile.in && exit 1 +$FGREP '$(srcdir)/$(DEPDIR)' && exit 1 + +cat > test.c << 'END' +int main (void) +{ + return 0; +} +END + +mkdir build && cd build || fatal "preparation of build directory failed" +../configure || fatal_ "./configure failed" + +$MAKE +$MAKE test-objs + +: -- 1.8.3.rc3.8.g5e49f30 From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 05 17:51:07 2013 Received: (at 13928) by debbugs.gnu.org; 5 Aug 2013 21:51:08 +0000 Received: from localhost ([127.0.0.1]:41956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V6SgF-0004KB-1H for submit@debbugs.gnu.org; Mon, 05 Aug 2013 17:51:07 -0400 Received: from na3sys009aog119.obsmtp.com ([74.125.149.246]:57697) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V6SRP-0003lj-P5 for 13928@debbugs.gnu.org; Mon, 05 Aug 2013 17:35:48 -0400 Received: from mail-we0-f181.google.com ([74.125.82.181]) (using TLSv1) by na3sys009aob119.postini.com ([74.125.148.12]) with SMTP ID DSNKUgAapNM93ZM8i7TMUANUokH29c+g1YWZ@postini.com; Mon, 05 Aug 2013 14:35:47 PDT Received: by mail-we0-f181.google.com with SMTP id p58so2988521wes.12 for <13928@debbugs.gnu.org>; Mon, 05 Aug 2013 14:35:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourcefire.com; s=google; h=mime-version:date:message-id:subject:from:to:content-type; bh=AZTukmbGzb/htkpNJB6LuLZN7pMxlR1fCTFeXDTMdog=; b=AfH4zYI0HjYt0D0Z/RCdFg/yP9TgvUazTC4Oi0gml1DCSWSPwiTQFZAmYieLqxIJp7 xTlgfnFF+YjjIvEVYdw/8odBXyXQFUIDNHj8JBDg0fy1j7q2SLobKa+nwmEyR7s9V0JK teNkWSi8jWZScP2fSIEAwODL96plDejX8wvL0= 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=AZTukmbGzb/htkpNJB6LuLZN7pMxlR1fCTFeXDTMdog=; b=CzimjAu32gnPsWJTlC+glQRyqXRXyRjfns8VgO9b8on50VDQzi+QmPNXedsGno5xDV x3v6OUKxKo1k+yFwgvVJr2G41XC9qs+UVHeWwfOjyVgy4ocpS/y9Xebg2t+sx1NGROWi Vlrl9KpXID7pQIVa08hH1RMT8Krnqgz8DG/+fYgIhiAMe2nzNMUPZ97h1+snNmj0KlyG VkcuQSDMGuH0uz+HohWU3CQe1XwyG9nxIJZl7Zs7378ZqGrJi2aAvSObFlU3TUx9I2md WJjlkjc/wKuWmwxiFsgNYF4D9OFvyK3N5AK8I/d7yDL78kXNd1ecL4ko9O6OU3sWn7k3 q7VA== X-Received: by 10.180.187.175 with SMTP id ft15mr7880168wic.20.1375738525495; Mon, 05 Aug 2013 14:35:25 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.180.187.175 with SMTP id ft15mr7880166wic.20.1375738525349; Mon, 05 Aug 2013 14:35:25 -0700 (PDT) Received: by 10.216.161.71 with HTTP; Mon, 5 Aug 2013 14:35:25 -0700 (PDT) Date: Mon, 5 Aug 2013 17:35:25 -0400 Message-ID: Subject: bug#13928 From: Shawn Webb To: 13928@debbugs.gnu.org Content-Type: multipart/alternative; boundary=001a11c347701b8af504e33a1647 X-Gm-Message-State: ALoCoQnDm2YGhIg34XWQUQfhYJBzHSJ4/Kha+9Bm00FVfz1WDsdfF85J6QoyGPakc9/2QgIzNYfW9R+zm66ZaR8mHKL918BiZWz0dLYSJiECumUnVilZjl7sWhPDUyX16R0loVFej9zNa/ehcSZQL7s8yF39uRDHMg== X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 13928 X-Mailman-Approved-At: Mon, 05 Aug 2013 17:51:04 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --001a11c347701b8af504e33a1647 Content-Type: text/plain; charset=ISO-8859-1 I'm hitting this bug as well. Are there any known workarounds? Thanks, Shawn Webb --001a11c347701b8af504e33a1647 Content-Type: text/html; charset=ISO-8859-1
I'm hitting this bug as well. Are there any known workarounds?

Thanks,

Shawn Webb
--001a11c347701b8af504e33a1647-- From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 21 06:33:36 2014 Received: (at 13928) by debbugs.gnu.org; 21 Apr 2014 10:33:36 +0000 Received: from localhost ([127.0.0.1]:53800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WcBXb-0004N8-JN for submit@debbugs.gnu.org; Mon, 21 Apr 2014 06:33:35 -0400 Received: from mail-ee0-f53.google.com ([74.125.83.53]:51324) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WcBXY-0004Mn-Tk; Mon, 21 Apr 2014 06:33:33 -0400 Received: by mail-ee0-f53.google.com with SMTP id b57so3499041eek.26 for ; Mon, 21 Apr 2014 03:33: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=saXoAAs90T+Bhzqv1r8APUYAOlRMiuGBgQ+M3nUdDBY=; b=WcaXXzIJUzpoESRZa0D1X4G7RwrXpEbbbaJsULH26FnL/WrNf3xI6LmZS+Mo7YPNJJ 4KU24aO6soxAFMhXKWL4VWtJM0xpeZI17U+1FmHfxTnK23QXicbHKqaUYA+w6kPX335Q Dv9bQ4W+e31vJtEKcBhFOpO84TIejHUlabw0XbF0YEf/1JOVcpQnw/rLzXncs15F2ePv F6WJ84gkFJo4wNVd2fA8bx2kp0jlb6Y8CKiNrcjk7XhKx7ZDoAdhZptIgaBeVUlqgDzP fBJEzE8XSidwwBLcVqGL/2aFDX2pLoUCLgHHgJaExFbmJi/8YizyhcUyoZ7bULalO1kx Wnvw== X-Received: by 10.14.206.137 with SMTP id l9mr46981058eeo.40.1398076411645; Mon, 21 Apr 2014 03:33:31 -0700 (PDT) Received: from [192.168.0.102] (host66-50-dynamic.58-82-r.retail.telecomitalia.it. [82.58.50.66]) by mx.google.com with ESMTPSA id y7sm102404409eev.5.2014.04.21.03.33.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Apr 2014 03:33:31 -0700 (PDT) Message-ID: <5354F3F7.9070308@gmail.com> Date: Mon, 21 Apr 2014 11:33:27 +0100 From: Stefano Lattarini MIME-Version: 1.0 To: Diab Jerius Subject: Re: bug#16375: subdir-objects breaks build which specifies sources relative to $(top_srcdir) References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 13928 Cc: 13928@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) [+cc 13928@debbugs.gnu.org] References: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16375 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15919 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15293 Known bugs sadly -- all duplicates of http://debbugs.gnu.org/13928 See also recent thread on the automake list (with sad updates regarding the current Automake development status): http://lists.gnu.org/archive/html/automake/2014-04/msg00002.html Closing these bug as a duplicate. Feel free to continue the discussion in the http://debbugs.gnu.org/13928 thread. And if anyone manages to come up with a patch, I will certainly make time to review it. Thanks, and sorry for the lack of progress, Stefano From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 21 10:32:41 2014 Received: (at 13928) by debbugs.gnu.org; 21 Apr 2014 14:32:41 +0000 Received: from localhost ([127.0.0.1]:54239 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WcFGy-0005qS-SW for submit@debbugs.gnu.org; Mon, 21 Apr 2014 10:32:41 -0400 Received: from mail-ee0-f47.google.com ([74.125.83.47]:61243) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WcFGx-0005qK-6i for 13928@debbugs.gnu.org; Mon, 21 Apr 2014 10:32:39 -0400 Received: by mail-ee0-f47.google.com with SMTP id b15so3678955eek.20 for <13928@debbugs.gnu.org>; Mon, 21 Apr 2014 07:32:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=foSgx+8GF2jPZGkGAbemRtPrz3Z5kOrWWa8JTVH8mYU=; b=Iq+Kv2lLLP1m+Q12CNTctzbhF5+Sz3Cl3qrzzkNEHJXVLmTDMlMxqrgEIsxvM2fl8T 2+jgm386atw+tuS2akhPtbSrMf9SFaqUBiCDM9xoDxqavehSuTl6hqdt/rmvW4IGQzZE /iJKFSww9MJT7Ywd0hq9XWIMO+8tdvyXnZiCTPyRzEakW3QgaJZ5jTJ4I9xXmG+SNDg/ q5HCYATbGPZD4uXIU9Ppoo32XyLQbwjwJUK/xGW7p9hm50bY8XuWBgbKVDh4TF0a9qZ0 Br14/XrTUZ02NbG+t1oGDmt5LfwvCrapTEdDGLNIKb7QM6r8S3PMxzHG8pYMOjpCJxdk QB9w== X-Received: by 10.14.183.7 with SMTP id p7mr1320141eem.107.1398090758344; Mon, 21 Apr 2014 07:32:38 -0700 (PDT) Received: from localhost.localdomain (host66-50-dynamic.58-82-r.retail.telecomitalia.it. [82.58.50.66]) by mx.google.com with ESMTPSA id x45sm104082183eef.15.2014.04.21.07.32.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 21 Apr 2014 07:32:37 -0700 (PDT) From: Stefano Lattarini To: automake-patches@gnu.org Subject: [PATCH] plans: enabling subdir-object by default is blocked on bug#13928 Date: Mon, 21 Apr 2014 15:32:21 +0100 Message-Id: <5de7c3b47e04fe76980e9d8aa97ee5d17363140a.1398090713.git.stefano.lattarini@gmail.com> X-Mailer: git-send-email 1.9.1 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 13928 Cc: 13928@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Signed-off-by: Stefano Lattarini --- PLANS/subdir-objects.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/PLANS/subdir-objects.txt b/PLANS/subdir-objects.txt index 94c6305..3cf6101 100644 --- a/PLANS/subdir-objects.txt +++ b/PLANS/subdir-objects.txt @@ -5,6 +5,9 @@ We want to make the behaviour currently enabled by the 'subdir-objects' the default one, and in fact the *only* one, in Automake 2.0. See automake bug#13378: . +Sadly, **THIS IS IMPOSSIBLE** until automake bug#13928 is resolved: +http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13928 + Details ------- @@ -50,6 +53,12 @@ We also make sure to avoid the warning when it would be irrelevant, i.e., if all source files sit in "current" directory (thanks to Peter Johansson for suggesting this). +For some automake 1.x (*before* 2.0 can be released) +---------------------------------------------------- + +Find a proper way to fix the blocking automake bug#13928: +http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13928 + For automake 2.0 ---------------- -- 1.9.1 From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 22 04:11:51 2014 Received: (at 13928) by debbugs.gnu.org; 22 Apr 2014 08:11:51 +0000 Received: from localhost ([127.0.0.1]:54662 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WcVnx-0008CH-Tw for submit@debbugs.gnu.org; Tue, 22 Apr 2014 04:11:50 -0400 Received: from mail-ve0-f178.google.com ([209.85.128.178]:42105) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WcVnv-0008C6-N9 for 13928@debbugs.gnu.org; Tue, 22 Apr 2014 04:11:48 -0400 Received: by mail-ve0-f178.google.com with SMTP id jw12so9017861veb.37 for <13928@debbugs.gnu.org>; Tue, 22 Apr 2014 01:11:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Q3fz6CQPFjcbNTmDKBWmc5Rs+NXdqSX+Oz4JRflAMvU=; b=VvJWyopTJ03+hG86roRqOsNuit/bZBpavOt1VqMBZOCYsLK6miqMbAHOIEozeMQg6b q2KOwmL5XYb4hxtKXbJbKRY4pDSrEkAru4iD5vsKY+qv8CslEsIMWWScvNsmksdU7myk Q93dnk0XDTl0ovj8u7t1gxDuE5CdD4X2mPdOlmvYHvZmzYkRyADa7R7iztToswhOaD7b 0ThPBkp8vWYTlny+65fWlqVQXK6go/7CufZv5C5RCICIVJHrwJuyGCjWdNCCb2seKm/C L7bEaTl/8ObXC6U9VzlAi6kDnabkr45gJHX5xyUiO5RB4TrmQgSqrTVoTusAdUoDpP5k bYmw== MIME-Version: 1.0 X-Received: by 10.221.37.1 with SMTP id tc1mr36667vcb.32.1398154307201; Tue, 22 Apr 2014 01:11:47 -0700 (PDT) Received: by 10.220.132.148 with HTTP; Tue, 22 Apr 2014 01:11:47 -0700 (PDT) In-Reply-To: <5de7c3b47e04fe76980e9d8aa97ee5d17363140a.1398090713.git.stefano.lattarini@gmail.com> References: <513E44AC.6040705@gmail.com> <5de7c3b47e04fe76980e9d8aa97ee5d17363140a.1398090713.git.stefano.lattarini@gmail.com> Date: Tue, 22 Apr 2014 10:11:47 +0200 Message-ID: Subject: Re: bug#13928: [PATCH] plans: enabling subdir-object by default is blocked on bug#13928 From: Bert Wesarg To: Stefano Lattarini Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 13928 Cc: 13928@debbugs.gnu.org, automake-patches@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Stefano, may it be possible to disable the 'subdir-object is the default'-warning in the 1.14 release series than? We should have this warning only active when we are sure that this bug is resolved. Thanks. Bert On Mon, Apr 21, 2014 at 4:32 PM, Stefano Lattarini wrote: > Signed-off-by: Stefano Lattarini > --- > PLANS/subdir-objects.txt | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/PLANS/subdir-objects.txt b/PLANS/subdir-objects.txt > index 94c6305..3cf6101 100644 > --- a/PLANS/subdir-objects.txt > +++ b/PLANS/subdir-objects.txt > @@ -5,6 +5,9 @@ We want to make the behaviour currently enabled by the 'subdir-objects' > the default one, and in fact the *only* one, in Automake 2.0. > See automake bug#13378: . > > +Sadly, **THIS IS IMPOSSIBLE** until automake bug#13928 is resolved: > +http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13928 > + > Details > ------- > > @@ -50,6 +53,12 @@ We also make sure to avoid the warning when it would be irrelevant, i.e., > if all source files sit in "current" directory (thanks to Peter Johansson > for suggesting this). > > +For some automake 1.x (*before* 2.0 can be released) > +---------------------------------------------------- > + > +Find a proper way to fix the blocking automake bug#13928: > +http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13928 > + > For automake 2.0 > ---------------- > > -- > 1.9.1 > > > > From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 22 06:05:59 2014 Received: (at 13928) by debbugs.gnu.org; 22 Apr 2014 10:05:59 +0000 Received: from localhost ([127.0.0.1]:54723 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WcXaQ-0003WU-UZ for submit@debbugs.gnu.org; Tue, 22 Apr 2014 06:05:59 -0400 Received: from mail-wi0-f182.google.com ([209.85.212.182]:48346) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WcXaO-0003WI-PK for 13928@debbugs.gnu.org; Tue, 22 Apr 2014 06:05:57 -0400 Received: by mail-wi0-f182.google.com with SMTP id d1so2963768wiv.15 for <13928@debbugs.gnu.org>; Tue, 22 Apr 2014 03:05:56 -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=8h7+Y81XpYLq3opYC0/xSB26AejxTst4xF6VpKz+k28=; b=GLnlBZmm/GD2FIThf1jia3gfK9Ha7SLVYalk5TsMyTIUvmS9v113cccCSklgJ1Dcjb 48uPSq9eYo7MrYBy0/yk4iwHsRPUsxRUpK+MlkKbLukGEuCsNiOlznToID+RzS+QR8l9 Ck5ix8rfl7SZU+H9d4gpMr675HlOPzH1zb0qK84gTXAfgPRNPoCCp8/bikshJvmMnL3l O8OQnR/tBlewxysdAVNCsnlZGRtpIyyPnR8VIYztv5oHpxLC7eCgCom6t0SQv1ZqBYnw SsCmd0IFP1pQ8+ZjH+hrID9TWy79QXA00teCIu3Al/vCEwSqzlC9sYK+/canLSKeZIm8 V6QA== X-Received: by 10.180.38.107 with SMTP id f11mr17780968wik.31.1398161155922; Tue, 22 Apr 2014 03:05:55 -0700 (PDT) Received: from [192.168.0.102] (host66-50-dynamic.58-82-r.retail.telecomitalia.it. [82.58.50.66]) by mx.google.com with ESMTPSA id ez5sm61178400wjd.9.2014.04.22.03.05.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 22 Apr 2014 03:05:54 -0700 (PDT) Message-ID: <53563EF5.5090604@gmail.com> Date: Tue, 22 Apr 2014 11:05:41 +0100 From: Stefano Lattarini MIME-Version: 1.0 To: Bert Wesarg Subject: Re: bug#13928: [PATCH] plans: enabling subdir-object by default is blocked on bug#13928 References: <513E44AC.6040705@gmail.com> <5de7c3b47e04fe76980e9d8aa97ee5d17363140a.1398090713.git.stefano.lattarini@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 13928 Cc: 13928@debbugs.gnu.org, automake-patches@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 04/22/2014 09:11 AM, Bert Wesarg wrote: > Stefano, > > may it be possible to disable the 'subdir-object is the > default'-warning in the 1.14 release series than? We should have this > warning only active when we are sure that this bug is resolved. > I'd rather not take this step back, since the 'subdir-objects' option works correctly in most situations. The right thing to do would be to fix the bug once and for all. If somebody wants to give it a try, I will be happy to review any patch in that direction. Otherwise, I will try to make time to attempt a fix myself in the coming weeks, but be warned that it would likely entail dropping automatic dependency tracking support for all those make implementations that doesn't support an equivalent of GNU make "-include" directive. (FWIW, I actually believe that is the right way forward, but several people on this list have expressed their dislike toward such a change, so I will give them time to try a different approach themselves before plunging ahead). Regards, Stefano From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 05 14:00:45 2014 Received: (at 13928) by debbugs.gnu.org; 5 Jul 2014 18:00:45 +0000 Received: from localhost ([127.0.0.1]:44294 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X3UGS-0004mw-6F for submit@debbugs.gnu.org; Sat, 05 Jul 2014 14:00:44 -0400 Received: from mail-vc0-f178.google.com ([209.85.220.178]:43133) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X3UFQ-0004jo-6H for 13928@debbugs.gnu.org; Sat, 05 Jul 2014 13:59:41 -0400 Received: by mail-vc0-f178.google.com with SMTP id ij19so2596544vcb.9 for <13928@debbugs.gnu.org>; Sat, 05 Jul 2014 10:59:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=/9V+J1cpoghdgWTftQsmZVwlyChB4JBfQzW+1DFFAHU=; b=trYNdn7rtay3UkZR8LgpI63TvTnP2Pn4qSx9kt1LX8hxwQ7IxY0aXgX/V/uICKpDmY gk4SDuVxV7m5JapYEJlL/5GcyS5SaHf3P4fGcKKRM7ywM3Rlxly0yYpzBR0Srkv127Es 1Tumj6aiqb3X53gKpXQIekZTcuYBuWXE8upDkP0D6usuQKjPKSiGzb6WlhCNkXpzv87c DMuFHm/ck3v8fkKYvovwekBcNeavtQi4qFI6V2BlEXj0kSs+EcfoQ8h9Vc0+dWJWOMyE gUGGgtwGyRgXSjqw5w1GppQq5CL8MTdc2KN5Scl0UCE6XNR9p6kCY4/6BixxqAt9upRV 0rFg== MIME-Version: 1.0 X-Received: by 10.58.210.168 with SMTP id mv8mr16450032vec.12.1404583174397; Sat, 05 Jul 2014 10:59:34 -0700 (PDT) Received: by 10.58.134.230 with HTTP; Sat, 5 Jul 2014 10:59:34 -0700 (PDT) Date: Sat, 5 Jul 2014 19:59:34 +0200 Message-ID: Subject: Re: bug#13928: [PATCH] plans: enabling subdir-object by default is blocked on bug#13928 From: Johan Kristensen To: automake-patches@gnu.org, 13928@debbugs.gnu.org Content-Type: multipart/alternative; boundary=047d7bea34c62ae60904fd7601c3 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 13928 X-Mailman-Approved-At: Sat, 05 Jul 2014 14:00:43 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --047d7bea34c62ae60904fd7601c3 Content-Type: text/plain; charset=UTF-8 Hi, What is the current status of this bug? I spent some time tracking down the reason for this bug, but I am totally new to the automake sources and what would be required for a patch to be acceptable. The problem is that when the dummy dependency-files is created by "./config.status" (by code from "m4/depout.m4"), only the DEPDIR variable is substituted. Any other variable expansions are ignored. I have a couple of suggestions for a fix. The first is to somehow delegate the creation of the dummy dependency-files to make, and executing something like "make dummy-depfiles" from config.status. This seems like the most straightforward solution but raises the question of how to handle the includes that are missing. One solution to this problem would be to have some conditional include of the dependency-files based on if target "dummy-depfiles" is built. An other solution would be to generate a temporary Makefile without these includes. The other alternative is to resolve all variables in depout.m4. To be correct this would require a recursive lookup of all variable substitutions in the Makefile. Perhaps the structure imposed by automake makes this kind of trivial but I have no idea. Will automake under some circumstances output something like "+=", "?=" or conditional assigns? This would make a solution along these lines intractable. kind regards, Johan Kristensen --047d7bea34c62ae60904fd7601c3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

What is the current s= tatus of this bug? I spent some time tracking down the reason for this bug,= but I am totally new to the automake sources and what would be required fo= r a patch to be acceptable. The problem is that when the dummy dependency-f= iles is created by "./config.status" (by code from "m4/depou= t.m4"), only the DEPDIR variable is substituted. Any other variable ex= pansions are ignored.

I have a couple of suggestions for a fix. The first is to somehow deleg= ate the creation of the dummy dependency-files to make, and executing somet= hing like "make dummy-depfiles" from config.status. This seems li= ke the most straightforward solution but raises the question of how to hand= le the includes that are missing. One solution to this problem would be to = have some conditional include of the dependency-files based on if target &q= uot;dummy-depfiles" is built. An other solution would be to generate a= temporary Makefile without these includes.

The other alternative is to resolve all variables in depout.m4. T= o be correct this would require a recursive lookup of all variable substitu= tions in the Makefile. Perhaps the structure imposed by automake makes this= kind of trivial but I have no idea. Will automake under some circumstances= output something like "+=3D", "?=3D" or conditional as= signs? This would make a solution along these lines intractable.

kind regards,
Johan Kristensen
--047d7bea34c62ae60904fd7601c3-- From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 24 08:22:52 2014 Received: (at control) by debbugs.gnu.org; 24 Dec 2014 13:22:52 +0000 Received: from localhost ([127.0.0.1]:56355 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y3lts-0006Ox-0L for submit@debbugs.gnu.org; Wed, 24 Dec 2014 08:22:52 -0500 Received: from mail-wi0-f180.google.com ([209.85.212.180]:39034) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y3ltp-0006On-IM for control@debbugs.gnu.org; Wed, 24 Dec 2014 08:22:50 -0500 Received: by mail-wi0-f180.google.com with SMTP id n3so13584405wiv.7 for ; Wed, 24 Dec 2014 05:22:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:mime-version:to:subject:content-type :content-transfer-encoding; bh=fqn6vv117DVvbY6WXbraVCNp/BOQaPzRrzy1jpFwRYk=; b=uPPA7V3zEep5juA2IycXpj0UJkWACQOQESSocvGgxWHhDtyzEnNzWtJya9rCtjB2+O oZ+Ch9pd5+/QJZjX4TsXbAw3F1it/qwaHTG1bHf7TiAvEDu211OmubdC0jczN3mWfuxt 7EMZtjr7xYVnv/PEVT7qideATmsT6eNZu6c2t1iOsJOsN//DsVZ3BnIpaz9KitXSNmre gFRNs5kQ2ADP4TgbIRBQUxs2oPkDSEW+CxImwzxF0whosVD7A6r+1Td29u/rcvbqfWKg jWO6HJodhsIfwgFwNlpEfvZnK+/K+pbYXYJfIZwwMPFYPM0G5AYlwCm9e2wIJ7P6xf70 KbVg== X-Received: by 10.181.12.17 with SMTP id em17mr51913266wid.45.1419427368996; Wed, 24 Dec 2014 05:22:48 -0800 (PST) Received: from [192.168.0.101] (host159-94-dynamic.7-79-r.retail.telecomitalia.it. [79.7.94.159]) by mx.google.com with ESMTPSA id gl5sm24525206wib.0.2014.12.24.05.22.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Dec 2014 05:22:48 -0800 (PST) Message-ID: <549ABE27.90901@gmail.com> Date: Wed, 24 Dec 2014 14:22:47 +0100 From: Stefano Lattarini MIME-Version: 1.0 To: GNU bug tracker automated control server Subject: 13928 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) severity 13928 important stop From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 01 11:28:24 2015 Received: (at 13928) by debbugs.gnu.org; 1 Jan 2015 16:28:24 +0000 Received: from localhost ([127.0.0.1]:34583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y6ibo-00043P-5O for submit@debbugs.gnu.org; Thu, 01 Jan 2015 11:28:24 -0500 Received: from mail-wg0-f42.google.com ([74.125.82.42]:50313) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y6ibl-00043A-LY; Thu, 01 Jan 2015 11:28:22 -0500 Received: by mail-wg0-f42.google.com with SMTP id k14so23248821wgh.1; Thu, 01 Jan 2015 08:28:21 -0800 (PST) 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=wNfUPW2yHvTciKmKAPTwgdcEKKs/ZZ+iNP7bPGnYCHA=; b=x4p9mdOHjWtRb3yQQV7CffIb5ZDW31h/x4J413Z5ChB7+gxGY+Y2J9ufFj3ktHq2oL cCmGIdVNB2yRN2mh8R0cZFGANZvtmnt9rpia/U6rMwG9UFO77SWxlEwqwwnLdof7x9oq 44esCW0LHPtVmbAWEo5imeexeCzWB7xDUrLxouTx3o/el7MRGt583nxX/aUWnlGj2DPU WY+eR270uWqphUm4Os2k+1dcMIdZfvFgEVyJHr6Vh14xylSLnNmWmzv8tEsNH+KygkYw WR7Y11n5v7+kK6wUOo6aUgRTuLqf78ZljGNroYwJxkD2z7PP6ACRm+szf6xbv3rYoSjF tTGQ== X-Received: by 10.180.14.136 with SMTP id p8mr88200627wic.20.1420129701081; Thu, 01 Jan 2015 08:28:21 -0800 (PST) Received: from [192.168.0.100] ([87.13.74.29]) by mx.google.com with ESMTPSA id h8sm51160067wiy.17.2015.01.01.08.28.19 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Jan 2015 08:28:20 -0800 (PST) Message-ID: <54A5759A.3020003@gmail.com> Date: Thu, 01 Jan 2015 17:28:10 +0100 From: Stefano Lattarini MIME-Version: 1.0 To: Johan Kristensen , automake@gnu.org, 13928@debbugs.gnu.org Subject: The 'subdir-object' option breaks makefiles where foo_SOURCES contains $(var) References: In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 13928 Cc: Nick Bowler , Bert Wesarg X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) retitle 13928 foo_SOURCES containing unexpanded $(var) breaks with 'subdir-object' option active stop Reference: http://debbugs.gnu.org/13928 Hi Johan and everybody, sorry for the awful delay. On 07/05/2014 07:59 PM, Johan Kristensen wrote: > Hi, > > What is the current status of this bug? > > [MEGA-SNIP] > I'm trying a simple approach (which seems quite promising so far) in the experimental Git branch experimental/deps-pr13928-take-2. The new code seems to work with the following make versions: - GNU - NetBSD 5.1 - FreeBSD 8.0 - Solaris 10 - AIX 7.1 Notice that the new code will not land in Automake 1.15 (that I hope to be able to release in less than a week, as soon as my new GPG key is accepted by ftp-upload@gnu.org). But unless any unanticipated issue arises, I definitely want the fix to land in Automake 1.16 (and the fix for this bug alone would IMHO be enough to justify a new minor release). Thanks, Stefano From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 01 15:57:56 2015 Received: (at 13928) by debbugs.gnu.org; 1 Jan 2015 20:57:56 +0000 Received: from localhost ([127.0.0.1]:34660 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y6mob-0003Sy-Uf for submit@debbugs.gnu.org; Thu, 01 Jan 2015 15:57:56 -0500 Received: from mail-wi0-f181.google.com ([209.85.212.181]:44993) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y6moX-0003Sn-F0 for 13928@debbugs.gnu.org; Thu, 01 Jan 2015 15:57:51 -0500 Received: by mail-wi0-f181.google.com with SMTP id r20so27020883wiv.2 for <13928@debbugs.gnu.org>; Thu, 01 Jan 2015 12:57:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=ytK7GYXIXPejZG7rOPzfDDYqPZ1eAsqMkDm3e7omDXY=; b=N3/lIf94g59sjlhe/0GwXHx5TMgInUF3Ymck+ndK07M5qr8/XazfvJ8/VccuXmrLu4 oXdYAC8b1scj+5gppx3WgM8xnLKXZB5SbHT2exbCzEPNhG0GslxN2txqCnWGbFw7JkMa HhA7AhrjEBz9qLiHYcfMlVoCY5tl6DjtsvUSLvPt04hDaI0wx2c+uhN/7hXlaMPqypZ+ RTPpg+77FDC+COhK4abIsfpk5kf8gcoQj0JeBNIsqZAofHGDyaySH5eRUZaEaG6aUfUv bvwA6i3k+FwizOANnn/FLfPy1Fmhs94eWaFOxBYUQpjWzK/LKEfOoNa9Zofo8M2izgA9 Jong== X-Received: by 10.180.21.178 with SMTP id w18mr125325815wie.78.1420145868755; Thu, 01 Jan 2015 12:57:48 -0800 (PST) Received: from localhost.localdomain ([87.13.74.29]) by mx.google.com with ESMTPSA id x6sm28639212wjf.24.2015.01.01.12.57.46 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 01 Jan 2015 12:57:48 -0800 (PST) From: Stefano Lattarini To: automake-patches@gnu.org Subject: [PATCH] deps: 'subdir-object' option now works when foo_SOURCES contains $(var) Date: Thu, 1 Jan 2015 21:57:38 +0100 Message-Id: <62d45785515e37d49afd437fa5640f489f21268f.1420145843.git.stefano.lattarini@gmail.com> X-Mailer: git-send-email 2.1.3 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 13928 Cc: nbowler@elliptictech.com, 13928@debbugs.gnu.org, peda@lysator.liu.se, jujulicca@gmail.com, johankristensen@gmail.com, bfriesen@simple.dallas.tx.us, bert.wesarg@googlemail.com, eblake@redhat.com, miles@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Following a suggestions of Johan Kristensen, we have config.status use 'make' invocations rather than Makefile-parsing 'sed' hacks to bootstrap the dependency-tracking '.Po' and '.Plo' makefile fragments. To handle the inclusion of such files that are still missing when make is first we basically generate a temporary Makefile without these includes, and call 'make' on that Makefile. This fixes the serious bug bug#13928, which was an hard blocker to make the behavior mandated by the 'subdir-object' active by default (which we want to do in Automake 2.0). The issue has also been reported in bug#15919. * NEWS, THANKS, PLANS/subdir-objects.txt: Update * bin/automake.in (handle_languages): Add a trailing "marking" comment ("# am--include-marker") to the generated Makefile lines issuing 'include' directives for the dependency-tracking '.Po' and '.Plo' makefile fragments. Also rename the generated Makefile variable 'am__depfiles_maybe' to the clearer 'am__maybe_remake_depfiles'. Minor unrelated refactoring. * lib/am/configure.am: Adjust to account for the 'am__depfiles_maybe' -> 'am__maybe_remake_depfiles' renaming. * lib/am/depend.am: Add rules to generate a dummy version of all the dependency-tracking '.Po' and '.Plo' makefile fragments. * m4/depout.m4: Use make invocations rather than Makefile-parsing sed hacks to bootstrap the dependency-tracking '.Po' and '.Plo' makefile fragments. We still use some sed trickery in order to remove the inclusion of the still non existing .Po and .Plo files from the Makefile we invoke make upon; this is done stripping lines that contain the magic string "# am--include-marker". * m4/make.m4 (AM_MAKE_INCLUDE): Given that now automake generates Makefiles containing include statements with trailing comment, adjust the checks done here to make sure $MAKE support that; e.g., "include foo.mk # comment" rather than just "include foo.mk". Also refactor and adjust to leave better debugging info in config.log. * t/postproc.sh: Rename ... * t/depend-postproc.sh: ... to this, and adjust and enhance. * t/list-of-tests.mk (handwritten_TESTS): Adjust. (XFAIL_TESTS): Remove 't/subobj-indir-pr13928.sh', which is now succeeding. * t/subobj-indir-pr13928.sh: Simplify slightly, now that we expect it to pass. * t/depcomp8a.sh: Adjust grepping check to account for the changes in the generated Makefile, and tp be somewhat more robust in light of possible future modifications. * t/depcomp8b.sh: Likewise. * t/subobj11b.sh: Likewise. * t/subobj11c.sh: Likewise. * t/extra-sources.sh: Likewise. * t/lex-depend-grep.sh: Likewise. * t/lex-depend-cxx.sh: Add a command to help debugging in case of test failure. Helped-by: Johan Kristensen Signed-off-by: Stefano Lattarini --- NEWS | 28 ++++++++++++ PLANS/subdir-objects.txt | 10 ++--- THANKS | 1 + bin/automake.in | 84 ++++++++++++++++++----------------- lib/am/configure.am | 6 +-- lib/am/depend.am | 7 +++ m4/depout.m4 | 78 ++++++++++++++------------------ m4/make.m4 | 59 +++++++++++------------- t/depcomp8a.sh | 16 +++---- t/depcomp8b.sh | 16 +++---- t/{postproc.sh => depend-postproc.sh} | 29 ++++++++++-- t/extra-sources.sh | 5 ++- t/lex-depend-cxx.sh | 5 +++ t/lex-depend-grep.sh | 2 +- t/list-of-tests.mk | 3 +- t/subobj-indir-pr13928.sh | 4 +- t/subobj11b.sh | 10 ++--- t/subobj11c.sh | 2 +- 18 files changed, 206 insertions(+), 159 deletions(-) rename t/{postproc.sh => depend-postproc.sh} (68%) diff --git a/NEWS b/NEWS index 84a5e0a..a930049 100644 --- a/NEWS +++ b/NEWS @@ -62,6 +62,34 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +New in 1.16: + +* Bugs fixed: + + - Automatic dependency tracking has been fixed to work also when the + subdir-object option is used and some 'foo_SOURCES' definition contains + unexpanded references to make variables, as in, e.g.: + + a_src = sources/libs/aaa + b_src = sources/bbb + foo_SOURCES = $(a_src)/bar.c $(b_src)/baz.c + + With such a setup, the created makefile fragment containing dependency + tracking information will be correctly placed under the directories + named 'sources/libs/aaa/.deps' and 'sources/bbb/.deps', rather than + mistakenly under directories named (literally!) '$(src_a)/.deps' and + '$(src_b)/.deps' (this was automake bug#13928). + + Notice that in order to fix this bug we had to slightly change the + semantics of how config.status bootstraps the makefile fragments + required for the dependency tracking to work: rather than attempting + to parse the Makefiles via grep and sed trickeries only, we actually + invoke 'make' on a slightly preprocessed version of those Makefiles, + using a private target that is only meant to bootstrap the required + makefile fragments. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + New in 1.15: * Improvements and refactorings in the install-sh script: diff --git a/PLANS/subdir-objects.txt b/PLANS/subdir-objects.txt index 3cf6101..39b42da 100644 --- a/PLANS/subdir-objects.txt +++ b/PLANS/subdir-objects.txt @@ -5,9 +5,6 @@ We want to make the behaviour currently enabled by the 'subdir-objects' the default one, and in fact the *only* one, in Automake 2.0. See automake bug#13378: . -Sadly, **THIS IS IMPOSSIBLE** until automake bug#13928 is resolved: -http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13928 - Details ------- @@ -53,11 +50,10 @@ We also make sure to avoid the warning when it would be irrelevant, i.e., if all source files sit in "current" directory (thanks to Peter Johansson for suggesting this). -For some automake 1.x (*before* 2.0 can be released) ----------------------------------------------------- +For automake 1.16 (*before* 2.0 can be released) +------------------------------------------------ -Find a proper way to fix the blocking automake bug#13928: -http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13928 +Submit the patch fixing http://debbugs.gnu.org/13928 For automake 2.0 ---------------- diff --git a/THANKS b/THANKS index b66f744..8b87d58 100644 --- a/THANKS +++ b/THANKS @@ -192,6 +192,7 @@ Joel N. Weber II nemo@koa.iolani.honolulu.hi.us Joerg-Martin Schwarz jms@jms.prima.ruhr.de Johan Dahlin jdahlin@async.com.br Johan Danielsson joda@pdc.kth.se +Johan Kristensen johankristensen@gmail.com Johannes Nicolai johannes.nicolai@student.hpi.uni-potsdam.de John Calcote john.calcote@gmail.com John F Trudeau JohnTrudeau@firsthealth.com diff --git a/bin/automake.in b/bin/automake.in index eedc8bc..f19be92 100644 --- a/bin/automake.in +++ b/bin/automake.in @@ -1230,48 +1230,50 @@ sub check_user_variables sub handle_languages () { if (! option 'no-dependencies') - { - # Include auto-dep code. Don't include it if DEP_FILES would - # be empty. - if (keys %extension_seen && keys %dep_files) - { - # Set location of depcomp. - define_variable ('depcomp', - "\$(SHELL) $am_config_aux_dir/depcomp", - INTERNAL); - define_variable ('am__depfiles_maybe', 'depfiles', INTERNAL); - - require_conf_file ("$am_file.am", FOREIGN, 'depcomp'); - - my @deplist = sort keys %dep_files; - # Generate each 'include' individually. Irix 6 make will - # not properly include several files resulting from a - # variable expansion; generating many separate includes - # seems safest. - $output_rules .= "\n"; - foreach my $iter (@deplist) - { - $output_rules .= (subst ('AMDEP_TRUE') - . subst ('am__include') - . ' ' - . subst ('am__quote') - . $iter - . subst ('am__quote') - . "\n"); - } - - # Compute the set of directories to remove in distclean-depend. - my @depdirs = uniq (map { dirname ($_) } @deplist); - $output_rules .= file_contents ('depend', - new Automake::Location, - DEPDIRS => "@depdirs"); - } - } + { + # Include auto-dep code. Don't include it if DEP_FILES would + # be empty. + if (keys %extension_seen && keys %dep_files) + { + my @dep_files = sort keys %dep_files; + # Set location of depcomp. + define_variable ('depcomp', + "\$(SHELL) $am_config_aux_dir/depcomp", + INTERNAL); + define_variable ('am__maybe_remake_depfiles', 'depfiles', INTERNAL); + define_variable ('am__depfiles_remade', "@dep_files", INTERNAL); + # Generate each 'include' directive individually. Several make + # implementations (IRIX 6, Solaris 10, FreeBSD 8) will fail to + # properly include several files resulting from a variable + # expansion. Just Generating many separate includes seems thus + # safest. + $output_rules .= "\n"; + foreach my $depfile (@dep_files) + { + $output_rules .= subst ('AMDEP_TRUE') . + subst ('am__include') . + " " . + subst('am__quote') . + $depfile . + subst('am__quote') . + " " . + "# am--include-marker\n"; + } + + require_conf_file ("$am_file.am", FOREIGN, 'depcomp'); + + # Compute the set of directories to remove in distclean-depend. + my @dep_dirs = uniq (map { dirname ($_) } @dep_files); + $output_rules .= file_contents ('depend', + new Automake::Location, + DEPDIRS => "@dep_dirs"); + } + } else - { - define_variable ('depcomp', '', INTERNAL); - define_variable ('am__depfiles_maybe', '', INTERNAL); - } + { + define_variable ('depcomp', '', INTERNAL); + define_variable ('am__maybe_remake_depfiles', '', INTERNAL); + } my %done; diff --git a/lib/am/configure.am b/lib/am/configure.am index 34ebd17..a6086dd 100644 --- a/lib/am/configure.am +++ b/lib/am/configure.am @@ -76,10 +76,10 @@ endif %?TOPDIR_P% ?TOPDIR_P? $(SHELL) ./config.status;; \ ?!TOPDIR_P? cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ -## FIXME: $(am__depfiles_maybe) lets us re-run the rule to create the +## FIXME: $(am__maybe_remake_depfiles) lets us re-run the rule to create the ## .P files. Ideally we wouldn't have to do this by hand. - echo ' cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE% $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE% $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE% $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE% $(am__maybe_remake_depfiles);; \ esac; ## Avoid the "deleted header file" problem for the dependencies. diff --git a/lib/am/depend.am b/lib/am/depend.am index 00ba5b3..0b226b6 100644 --- a/lib/am/depend.am +++ b/lib/am/depend.am @@ -16,6 +16,13 @@ am__mv = mv -f +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) +.PHONY: am--depfiles + ## This Makefile depends on Depdirs' files, so we should never ## erase them in -am or -recursive rules; that would prevent any other ## rules from being recursive (for instance multilib clean rules are diff --git a/m4/depout.m4 b/m4/depout.m4 index a59dcf5..2109bb3 100644 --- a/m4/depout.m4 +++ b/m4/depout.m4 @@ -6,7 +6,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. - # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], @@ -14,49 +13,41 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac + # TODO: see whether this extra hack can be removed once we start + # requiring Autoconf 2.70 or later. + AS_CASE([$CONFIG_FILES], + [*\'*], [eval set x "$CONFIG_FILES"], + [*], [set x $CONFIG_FILES]) shift - for mf + # Used to flag and report bootstrapping failures. + am_rc=0 + for am_mf do # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line + am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile which includes + # dependency-tracking related rules and includes. + # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done + sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ + || continue + am_dirpart=`AS_DIRNAME(["$am_mf"])` + am_filepart=`AS_BASENAME(["$am_mf"])` + AM_RUN_LOG([cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles]) || am_rc=$? done + if test $am_rc -ne 0; then + AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments + for automatic dependency tracking. Try re-running configure with the + '--disable-dependency-tracking' option to at least be able to build + the package (albeit without support for automatic dependency tracking).]) + fi + AS_UNSET([am_dirpart]) + AS_UNSET([am_filepart]) + AS_UNSET([am_mf]) + AS_UNSET([am_rc]) + rm -f conftest-deps.mk } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS @@ -65,11 +56,10 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each '.P' file that we will -# need in order to bootstrap the dependency handling code. +# This code is only required when automatic dependency tracking is enabled. +# This creates each '.Po' and '.Plo' makefile fragment that we'll need in +# order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) + [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) diff --git a/m4/make.m4 b/m4/make.m4 index a82d2d2..f5520b1 100644 --- a/m4/make.m4 +++ b/m4/make.m4 @@ -8,42 +8,35 @@ # AM_MAKE_INCLUDE() # ----------------- -# Check to see how make treats includes. +# Check whether make has an 'include' directive that can support all +# the idioms we need for our automatic dependency tracking code. AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' +[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) +cat > confinc.mk << 'END' am__doit: - @echo this is the am__doit target + @echo this is the am__doit target >confinc.out .PHONY: am__doit END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) +# BSD make does it like this. +echo '.include "confinc.mk" # ignored' > confmf.BSD +# Other make implementations (GNU, Solaris 10, AIX) do it like this. +echo 'include confinc.mk # ignored' > confmf.GNU +_am_result=no +for s in GNU BSD; do + AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) + AS_CASE([$?:`cat confinc.out 2>/dev/null`], + ['0:this is the am__doit target'], + [AS_CASE([$s], + [BSD], [am__include='.include' am__quote='"'], + [am__include='include' am__quote=''])]) + if test "$am__include" != "#"; then + _am_result="yes ($s style)" + break + fi +done +rm -f confinc.* confmf.* +AC_MSG_RESULT([${_am_result}]) +AC_SUBST([am__include])]) +AC_SUBST([am__quote])]) diff --git a/t/depcomp8a.sh b/t/depcomp8a.sh index 94b7afa..ee440ed 100644 --- a/t/depcomp8a.sh +++ b/t/depcomp8a.sh @@ -51,10 +51,10 @@ $ACLOCAL # FIXME: stop disabling the warnings in the 'unsupported' category # FIXME: once the 'subdir-objects' option has been mandatory. $AUTOMAKE -a -Wno-unsupported -grep include Makefile.in # For debugging. -grep 'include.*\./\$(DEPDIR)/foo\.P' Makefile.in -grep 'include.*\./\$(DEPDIR)/bar\.P' Makefile.in -grep 'include.*/\./\$(DEPDIR)' Makefile.in && exit 1 +grep '\.P' Makefile.in # For debugging. +grep '\./\$(DEPDIR)/foo\.Po' Makefile.in +grep '\./\$(DEPDIR)/bar\.Po' Makefile.in +grep '/\./\$(DEPDIR)' Makefile.in && exit 1 $AUTOCONF # Don't reject slower dependency extractors, for better coverage. @@ -68,10 +68,10 @@ DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' $MAKE distcheck echo AUTOMAKE_OPTIONS = subdir-objects >> Makefile.am $AUTOMAKE -grep include Makefile.in # For debugging. -grep 'include.*\./\$(DEPDIR)/foo\.P' Makefile.in -grep 'include.*[^a-zA-Z0-9_/]sub/\$(DEPDIR)/bar\.P' Makefile.in -$EGREP 'include.*/(\.|sub)/\$\(DEPDIR\)' Makefile.in && exit 1 +grep '\.P' Makefile.in # For debugging. +grep '\./\$(DEPDIR)/foo\.Po' Makefile.in +grep '[^a-zA-Z0-9_/]sub/\$(DEPDIR)/bar\.Po' Makefile.in +$EGREP '/(\.|sub)/\$\(DEPDIR\)' Makefile.in && exit 1 $AUTOCONF # Don't reject slower dependency extractors, for better coverage. diff --git a/t/depcomp8b.sh b/t/depcomp8b.sh index 47bf5c5..f1f65f3 100644 --- a/t/depcomp8b.sh +++ b/t/depcomp8b.sh @@ -48,10 +48,10 @@ $ACLOCAL # FIXME: stop disabling the warnings in the 'unsupported' category # FIXME: once the 'subdir-objects' option has been mandatory. $AUTOMAKE -a -Wno-unsupported -grep include Makefile.in # For debugging. -grep 'include.*\./\$(DEPDIR)/foo\.P' Makefile.in -grep 'include.*\./\$(DEPDIR)/bar\.P' Makefile.in -grep 'include.*/\./\$(DEPDIR)' Makefile.in && exit 1 +grep '\.P' Makefile.in # For debugging. +grep '\./\$(DEPDIR)/foo\.Plo' Makefile.in +grep '\./\$(DEPDIR)/bar\.Plo' Makefile.in +grep '/\./\$(DEPDIR)' Makefile.in && exit 1 $AUTOCONF # Don't reject slower dependency extractors, for better coverage. @@ -64,10 +64,10 @@ DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' $MAKE distcheck echo AUTOMAKE_OPTIONS += subdir-objects >> Makefile.am $AUTOMAKE -grep include Makefile.in # For debugging. -grep 'include.*\./\$(DEPDIR)/foo\.P' Makefile.in -grep 'include.*[^a-zA-Z0-9_/]sub/\$(DEPDIR)/bar\.P' Makefile.in -$EGREP 'include.*/(\.|sub)/\$\(DEPDIR\)' Makefile.in && exit 1 +grep '\.P' Makefile.in # For debugging. +grep '\./\$(DEPDIR)/foo\.Plo' Makefile.in +grep '[^a-zA-Z0-9_/]sub/\$(DEPDIR)/bar\.Plo' Makefile.in +$EGREP '/(\.|sub)/\$\(DEPDIR\)' Makefile.in && exit 1 $AUTOCONF # Don't reject slower dependency extractors, for better coverage. diff --git a/t/postproc.sh b/t/depend-postproc.sh similarity index 68% rename from t/postproc.sh rename to t/depend-postproc.sh index 3ac64a4..74088db0 100644 --- a/t/postproc.sh +++ b/t/depend-postproc.sh @@ -15,20 +15,22 @@ # along with this program. If not, see . # Check to make sure we recognize a Makefile.in, even if post-processed -# and renamed. +# and renamed. The particularly tricky code for automatic dependency +# tracking support used to have issues with that. required=cc . test-init.sh -cat >configure.ac < configure.ac < myMakefile.am << 'END' +cat > myMakefile.am <<'END' bin_PROGRAMS = fred fred_SOURCES = fred.c END @@ -45,4 +47,25 @@ cat myMakefile.old >> myMakefile.in test -f .deps/fred.Po || test -f _deps/fred.Po || exit 1 +$sleep + +cat > Makefile <<'END' +include myMakefile +END + +sed 's/^dnl: *//' configure.ac >t +mv -f t configure.ac + +$MAKE myMakefile Makefile + +rm -rf .deps _deps +./config.status + +test ! -e fred.c +echo 'int main (void) { return 0; }' > fred.c + +$MAKE +test -f .deps/fred.Po || test -f _deps/fred.Po || exit 1 +$MAKE distcheck + : diff --git a/t/extra-sources.sh b/t/extra-sources.sh index e3f15c8..8e204a5 100644 --- a/t/extra-sources.sh +++ b/t/extra-sources.sh @@ -21,7 +21,7 @@ echo AC_PROG_CC >> configure.ac -cat > Makefile.am << 'END' +cat > Makefile.am <<'END' bin_PROGRAMS = www www_SOURCES = www.c EXTRA_www_SOURCES = xtra.c @@ -31,6 +31,7 @@ END $ACLOCAL $AUTOMAKE -grep '@am__include@ .*/xtra\.P' Makefile.in +grep '@am__include@ .*/xtra\.Po' Makefile.in +grep '^am__depfiles_remade =.*/xtra.Po' Makefile.in : diff --git a/t/lex-depend-cxx.sh b/t/lex-depend-cxx.sh index 2abb101..eee2f5c 100644 --- a/t/lex-depend-cxx.sh +++ b/t/lex-depend-cxx.sh @@ -82,6 +82,11 @@ $AUTOCONF # using slow dependency extractors. ./configure --enable-dependency-tracking +# For debugging. +for f in $(find . -name '*.Po'); do + cat $f +done + $MAKE test-deps-exist $MAKE diff --git a/t/lex-depend-grep.sh b/t/lex-depend-grep.sh index 4a6473b..be9be29 100644 --- a/t/lex-depend-grep.sh +++ b/t/lex-depend-grep.sh @@ -40,7 +40,7 @@ $AUTOMAKE -a $EGREP '([mj]oe|_[01234]|include|\.P)' Makefile.in # For debugging. for x in joe moe _0 _1 _2 _3 _4; do - grep "include.*$x\.Po" Makefile.in + $EGREP '\$\(DEPDIR\)/'"$x"'\.Po( |$)' Makefile.in done : diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk index 9363ee3..5085780 100644 --- a/t/list-of-tests.mk +++ b/t/list-of-tests.mk @@ -41,7 +41,6 @@ t/java-nobase.sh \ t/objext-pr10128.sh \ t/remake-timing-bug-pr8365.sh \ t/lex-subobj-nodep.sh \ -t/subobj-indir-pr13928.sh \ t/subobj-vpath-pr13928.sh \ t/remake-am-pr10111.sh \ t/remake-m4-pr10111.sh \ @@ -391,6 +390,7 @@ t/depend3.sh \ t/depend4.sh \ t/depend5.sh \ t/depend6.sh \ +t/depend-postproc.sh \ t/deprecated-acinit.sh \ t/destdir.sh \ t/dir-named-obj-is-bad.sh \ @@ -866,7 +866,6 @@ t/posixsubst-programs.sh \ t/posixsubst-scripts.sh \ t/posixsubst-sources.sh \ t/posixsubst-tests.sh \ -t/postproc.sh \ t/ppf77.sh \ t/pr2.sh \ t/pr9.sh \ diff --git a/t/subobj-indir-pr13928.sh b/t/subobj-indir-pr13928.sh index 22cb7f5..3ccd037 100644 --- a/t/subobj-indir-pr13928.sh +++ b/t/subobj-indir-pr13928.sh @@ -38,7 +38,9 @@ END mkdir s echo 'int main(void) { return 0; }' > s/foo.c -$ACLOCAL && $AUTOCONF && $AUTOMAKE -a || fatal_ "autotools failed" +$ACLOCAL +$AUTOCONF +$AUTOMAKE -a ./configure $MAKE diff --git a/t/subobj11b.sh b/t/subobj11b.sh index 5ebb42a..613fa26 100644 --- a/t/subobj11b.sh +++ b/t/subobj11b.sh @@ -56,9 +56,9 @@ END $ACLOCAL $AUTOMAKE -a -# Be lax in the regexp, to account for automake conditionals, the -# use of @am__include@, and similar stuff. -grep 'include.*//.*foobar' Makefile.in && exit 1 +grep '\.P' Makefile.in # For debugging. + +grep '//.*foobar\.P' Makefile.in && exit 1 # These checks depend on automake internals, but presently this is # the only way to test the code path we are interested in. @@ -71,12 +71,12 @@ for x in zardoz0 zardoz1 path/to/zardoz2 another/path/to/zardoz3; do esac # Be a little lax in the regexp, to account for automake conditionals, # quoting, and similar stuff. - grep "^[^/]*am__include[^/]*//server/$d\\\$(DEPDIR)/$b\\.[^/]*$" Makefile.in + grep "[ ]//server/$d\\\$(DEPDIR)/$b\\.Po" Makefile.in done # Sanity checks. for i in 0 1 2 3 4 5 6 7 8 9; do - grep "am__include.*/foobar$i\\." Makefile.in + grep "\$(DEPDIR)/foobar$i\\.Po" Makefile.in done : diff --git a/t/subobj11c.sh b/t/subobj11c.sh index a80d760..f5e8340 100644 --- a/t/subobj11c.sh +++ b/t/subobj11c.sh @@ -43,6 +43,6 @@ $AUTOMAKE -a # # FIXME: Are we sure this is the most sensible output in our situation? # -grep '^[^/]*am__include[^/]*//\$(DEPDIR)/zardoz\.[^/]*$' Makefile.in +grep 'am__depfiles_remade =.* //\$(DEPDIR)/zardoz\.Po' Makefile.in : -- 2.1.3 From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 01 21:03:01 2015 Received: (at 13928) by debbugs.gnu.org; 2 Jan 2015 02:03:01 +0000 Received: from localhost ([127.0.0.1]:34755 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y6rZs-0002bQ-Mf for submit@debbugs.gnu.org; Thu, 01 Jan 2015 21:03:01 -0500 Received: from stenn.ntp.org ([149.20.68.30]:54392) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y6qqX-0001S6-FB for 13928@debbugs.gnu.org; Thu, 01 Jan 2015 20:16:09 -0500 Received: from localhost.ntp.org ([::1] helo=stenn.ntp.org) by stenn.ntp.org with esmtp (Exim 4.84 (FreeBSD)) (envelope-from ) id 1Y6qqR-000Csg-6R; Fri, 02 Jan 2015 01:16:03 +0000 From: Harlan Stenn To: Stefano Lattarini Subject: Re: The 'subdir-object' option breaks makefiles where foo_SOURCES contains $(var) In-reply-to: <54A5759A.3020003@gmail.com> References: <54A5759A.3020003@gmail.com> Comments: In-reply-to Stefano Lattarini message dated "Thu, 01 Jan 2015 17:28:10 +0100." X-Mailer: MH-E 7.4.2; nmh 1.6; XEmacs 21.4 (patch 22) Mime-Version: 1.0 (generated by tm-edit 1.8) Content-Type: text/plain; charset=US-ASCII Date: Fri, 02 Jan 2015 01:16:03 +0000 Message-Id: X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 13928 X-Mailman-Approved-At: Thu, 01 Jan 2015 21:02:59 -0500 Cc: Nick Bowler , 13928@debbugs.gnu.org, Johan Kristensen , automake@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Excellent timing, thanks! Now that ntp-4.2.8 is settling down, I'm looking to update our Makefile.am's to use subdir-objects, and it's not being fun. I may wait until 1.15 is released to continue this effort. H From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 02 05:52:39 2015 Received: (at 13928) by debbugs.gnu.org; 2 Jan 2015 10:52:39 +0000 Received: from localhost ([127.0.0.1]:34825 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y6zqQ-0007Z4-Fe for submit@debbugs.gnu.org; Fri, 02 Jan 2015 05:52:38 -0500 Received: from mail-wg0-f50.google.com ([74.125.82.50]:37826) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y6zqN-0007Yu-On for 13928@debbugs.gnu.org; Fri, 02 Jan 2015 05:52:36 -0500 Received: by mail-wg0-f50.google.com with SMTP id a1so23901869wgh.23 for <13928@debbugs.gnu.org>; Fri, 02 Jan 2015 02:52:34 -0800 (PST) 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=WQfkRS6fH7/+H860OuSoIph+JGXop+/7mzE1n7HgWRw=; b=FngeTevutCmB3GxSQjM6PWS6QnoEY4Rxd7h37IR5SQQ0DiagHSZOYgvrfYPDmQua0e LZjokd33V5hyahnT+mYAfhza6Ml9DnqKeSKviS77wHvhmuK5KSn+F+iCy0D1VYV7r144 rkaFqzve+6/pnSORD/B9xPap6m+QBA0XQSAjVxhGo8WlYs/z2ds4uSehH0HXMCY529jN KlpUGcujkOFWrOIze1S2Er+08ER0L85S4RadycJWI9+Z9uAgYe9m4kyHq2Nc/N60zuBB SAjnU/u0lLRge+YzxSyvijvyCNA6PsELe9IOc4+hksgGC2t+Tb8Xwtin7ii7L/Q8Z0Dd j5rw== X-Received: by 10.195.12.15 with SMTP id em15mr128867244wjd.80.1420195954681; Fri, 02 Jan 2015 02:52:34 -0800 (PST) Received: from [192.168.0.100] ([87.13.74.29]) by mx.google.com with ESMTPSA id a1sm15377758wjx.28.2015.01.02.02.52.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Jan 2015 02:52:34 -0800 (PST) Message-ID: <54A67871.6040402@gmail.com> Date: Fri, 02 Jan 2015 11:52:33 +0100 From: Stefano Lattarini MIME-Version: 1.0 To: Harlan Stenn Subject: Re: The 'subdir-object' option breaks makefiles where foo_SOURCES contains $(var) References: <54A5759A.3020003@gmail.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 13928 Cc: Nick Bowler , 13928@debbugs.gnu.org, Johan Kristensen , automake@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 01/02/2015 02:16 AM, Harlan Stenn wrote: > Excellent timing, thanks! > > Now that ntp-4.2.8 is settling down, I'm looking to update our > Makefile.am's to use subdir-objects, and it's not being fun. > (An aside: I see that ntp still uses a recursive Makefile setup. Given that you are about to mess with the ntp build system anyway, have you thought about trying to convert it to a non-recursive make setup? That is the suggested way to go nowadays...) > I may wait until 1.15 is released to continue this effort. > Well, actually, Automake 1.15 is already tagged in the Git repository and ready to be released (as soon as my new GPG key, replacing the one that expired 2 months ago, will be accepted by fpt-upload@gnu.org). So this patch will not be available before Automake 1.16. But then again, I believe the fix for this bug alone would be enough to justify a new minor Automake release, so don't worry, this fix will go in some release soon enough :-) Also, more importantly, notice that this patch do not yet solve the issue of '.deps' directories and object files being created in the source directory (rather than in the build directory) for source files that contains an explicit reference to $(srcdir), when the 'subdir-object' option is enabled; see the still XFAIL'ing test 't/subobj-vpath-pr13928.sh'. This issue should *hopefully* be easy to fix, especially with the new dependency-bootstrapping logic; and I will try hard to make that happen before the 1.16 release. Thanks, Stefano From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 02 07:05:41 2015 Received: (at 13928) by debbugs.gnu.org; 2 Jan 2015 12:05:41 +0000 Received: from localhost ([127.0.0.1]:34856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y70z5-0000x5-Hw for submit@debbugs.gnu.org; Fri, 02 Jan 2015 07:05:41 -0500 Received: from stenn.ntp.org ([149.20.68.30]:23278) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y70z1-0000wq-Nn for 13928@debbugs.gnu.org; Fri, 02 Jan 2015 07:05:36 -0500 Received: from localhost.ntp.org ([::1] helo=stenn.ntp.org) by stenn.ntp.org with esmtp (Exim 4.84 (FreeBSD)) (envelope-from ) id 1Y70xk-000DTM-ND; Fri, 02 Jan 2015 12:04:16 +0000 From: Harlan Stenn To: Stefano Lattarini Subject: Re: The 'subdir-object' option breaks makefiles where foo_SOURCES contains $(var) In-reply-to: <54A67871.6040402@gmail.com> References: <54A5759A.3020003@gmail.com> <54A67871.6040402@gmail.com> Comments: In-reply-to Stefano Lattarini message dated "Fri, 02 Jan 2015 11:52:33 +0100." X-Mailer: MH-E 7.4.2; nmh 1.6; XEmacs 21.4 (patch 22) Mime-Version: 1.0 (generated by tm-edit 1.8) Content-Type: text/plain; charset=US-ASCII Date: Fri, 02 Jan 2015 12:04:16 +0000 Message-Id: X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 13928 Cc: Harlan Stenn , Nick Bowler , 13928@debbugs.gnu.org, Johan Kristensen , automake@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Stefano Lattarini writes: > On 01/02/2015 02:16 AM, Harlan Stenn wrote: > > Excellent timing, thanks! > > > > Now that ntp-4.2.8 is settling down, I'm looking to update our > > Makefile.am's to use subdir-objects, and it's not being fun. > > (An aside: I see that ntp still uses a recursive Makefile setup. > Given that you are about to mess with the ntp build system anyway, > have you thought about trying to convert it to a non-recursive > make setup? That is the suggested way to go nowadays...) I'd *love* to go non-recursive. I've tried before, and haven't been able to make it work. The documentation wasn't there before, and my brain didn't "see" what the new paradigm was trying to do. > > I may wait until 1.15 is released to continue this effort. > > Well, actually, Automake 1.15 is already tagged in the Git repository > and ready to be released (as soon as my new GPG key, replacing the one > that expired 2 months ago, will be accepted by fpt-upload@gnu.org). > So this patch will not be available before Automake 1.16. But then > again, I believe the fix for this bug alone would be enough to > justify a new minor Automake release, so don't worry, this fix will > go in some release soon enough :-) Fair enough, thanks! > Also, more importantly, notice that this patch do not yet solve the > issue of '.deps' directories and object files being created in the > source directory (rather than in the build directory) for source > files that contains an explicit reference to $(srcdir), when the > 'subdir-object' option is enabled; see the still XFAIL'ing test > 't/subobj-vpath-pr13928.sh'. I'm likely seeing that problem too. > This issue should *hopefully* be easy to fix, especially with the > new dependency-bootstrapping logic; and I will try hard to make > that happen before the 1.16 release. Cool, thanks! H From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 02 13:49:57 2015 Received: (at 13928) by debbugs.gnu.org; 2 Jan 2015 18:49:57 +0000 Received: from localhost ([127.0.0.1]:35275 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y77IK-0003qL-4R for submit@debbugs.gnu.org; Fri, 02 Jan 2015 13:49:57 -0500 Received: from mail-wg0-f46.google.com ([74.125.82.46]:58903) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y77IG-0003q9-QH for 13928@debbugs.gnu.org; Fri, 02 Jan 2015 13:49:54 -0500 Received: by mail-wg0-f46.google.com with SMTP id x13so24454585wgg.5 for <13928@debbugs.gnu.org>; Fri, 02 Jan 2015 10:49:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=hUrYzdSitvm8b6fCBcVcamHBlFetvfx+pBDRWISNr8M=; b=YWIhPZJ9M+ne/7n8RFro3mrtX4rNcT92EHUabzPFtbGBIRQVP12EACpT88UkDsAXLI nk9J+heibvtR48s3a4F9acnI5r4jwtYT1qYEv4slo7AhT6/3lRh3mtlADUA/BeAwsQjt LiTtfUar600+ao4OwCSjoJJPA1XABOFaR7u3cbcKZhgM/ZtExMRMmm92qeD0Wwn1OC1z 7vBT3jx/cI576sP5AI/euRsBdx5AAxJJVTYHI8KDXCUijfderyI9JPN3FZ4XOUwAXOxU XKMriCdvai3zkxJgKY36kK28xFb2gy6UtglWTmmVSE1NwD+zXOjVFs9gQ83C3CsKGkzY m3jA== X-Received: by 10.180.73.101 with SMTP id k5mr117294wiv.43.1420224591924; Fri, 02 Jan 2015 10:49:51 -0800 (PST) Received: from localhost.localdomain ([87.13.74.29]) by mx.google.com with ESMTPSA id b10sm53078wiw.9.2015.01.02.10.49.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 02 Jan 2015 10:49:51 -0800 (PST) From: Stefano Lattarini To: automake-patches@gnu.org Subject: [PATCH] compile: don't place built object files in $(srcdir), ever ... Date: Fri, 2 Jan 2015 19:49:43 +0100 Message-Id: <997cfe38a1ae2a0554fedaf76925a951a6e67722.1420224463.git.stefano.lattarini@gmail.com> X-Mailer: git-send-email 2.1.3 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 13928 Cc: Eric Blake , Diab Jerius , 13928@debbugs.gnu.org, Oleg Latin , Bert Wesarg X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) ... even when a source file is specified as '$(srdir)/foo.c' or '$(top_srcdir)/bar.c'. And ditto for dependency-tracking makefile fragments (those under '.deps' directories). Such issues used to occur when the 'subdir-objects' option was given. This change should fix the second and last part of automake bug#13928. See also bug#16375 and bug#15293. * NEWS: Update. * bin/automake.in (handle_single_transform): Make sure object files and dependency-tracking makefile fragments coming from source like '$(srcdir)/foo.c' and '$(top_srcdir)/bar.c' are placed respectively under $(builddir) and $(top_builddir). * t/subobj-vpath-pr13928.sh: Enhance to expose even more aspects of the bug we've just fixed. * t/subobj-pr13928-more-langs.sh: New test, similar to the one above, but with non-C languages as well. * t/list-of-tests.mk (XFAIL_TESTS): Remove 'subobj-vpath-pr13928.sh', it's now supposed to pass. (handwritten_TESTS): Add 'subobj-pr13928-more-langs.sh'. Signed-off-by: Stefano Lattarini --- NEWS | 21 ++++++- bin/automake.in | 49 ++++++++++----- t/list-of-tests.mk | 2 +- t/subobj-pr13928-more-langs.sh | 138 +++++++++++++++++++++++++++++++++++++++++ t/subobj-vpath-pr13928.sh | 89 ++++++++++++++++++++++---- 5 files changed, 268 insertions(+), 31 deletions(-) create mode 100644 t/subobj-pr13928-more-langs.sh diff --git a/NEWS b/NEWS index a930049..6355f74 100644 --- a/NEWS +++ b/NEWS @@ -67,8 +67,8 @@ New in 1.16: * Bugs fixed: - Automatic dependency tracking has been fixed to work also when the - subdir-object option is used and some 'foo_SOURCES' definition contains - unexpanded references to make variables, as in, e.g.: + 'subdir-object' option is used and some 'foo_SOURCES' definition + contains unexpanded references to make variables, as in, e.g.: a_src = sources/libs/aaa b_src = sources/bbb @@ -78,7 +78,7 @@ New in 1.16: tracking information will be correctly placed under the directories named 'sources/libs/aaa/.deps' and 'sources/bbb/.deps', rather than mistakenly under directories named (literally!) '$(src_a)/.deps' and - '$(src_b)/.deps' (this was automake bug#13928). + '$(src_b)/.deps' (this was the first part of automake bug#13928). Notice that in order to fix this bug we had to slightly change the semantics of how config.status bootstraps the makefile fragments @@ -88,6 +88,21 @@ New in 1.16: using a private target that is only meant to bootstrap the required makefile fragments. + - The 'subdir-object' option no longer causes object files corresponding + to source files specified with an explicit '$(srcdir)' component to be + placed in the source tree rather than in the build tree. + + For example, if Makefile.am contains: + + AUTOMAKE_OPTIONS = subdir-objects + foo_SOURCES = $(srcdir)/foo.c $(srcdir)/s/bar.c $(top_srcdir)/baz.c + + then "make all" will create 'foo.o' and 's/bar.o' $(builddir) rather + than in $(srcdir), and 'baz.o' in $(top_builddir) rather than in + $(top_srcdir). + + This was the second part of automake bug#13928. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ New in 1.15: diff --git a/bin/automake.in b/bin/automake.in index f19be92..f4327fc 100644 --- a/bin/automake.in +++ b/bin/automake.in @@ -1617,9 +1617,9 @@ sub handle_single_transform my $renamed = 0; my ($linker, $object); - # This records whether we've seen a derived source file (e.g. - # yacc output). - my $derived_source = 0; + # This records whether we've seen a derived source file (e.g., yacc + # or lex output). + my $derived_source; # This holds the 'aggregate context' of the file we are # currently examining. If the file is compiled with @@ -1667,17 +1667,35 @@ sub handle_single_transform # Now extract linker and other info. $linker = $lang->linker; - my $this_obj_ext; - if (defined $source_extension) - { - $this_obj_ext = $source_extension; - $derived_source = 1; - } - else - { - $this_obj_ext = $obj; - } - $object = $base . $this_obj_ext; + my $this_obj_ext; + if (defined $source_extension) + { + $this_obj_ext = $source_extension; + $derived_source = 1; + } + else + { + $this_obj_ext = $obj; + $derived_source = 0; + # Don't ever place built object files in $(srcdir), even when + # sources are specified explicitly as (say) '$(srcdir)/foo.c' + # or '$(top_srcdir)/foo.c'. See automake bug#13928. + my @d = split '/', $directory; + if (@d) + { + my $d = $d[0]; + if ($d eq '$(srcdir)' or $d eq '${srcdir}') + { + shift @d; + } + elsif ($d eq '$(top_srcdir)' or $d eq '${top_srcdir}') + { + $d[0] = '$(top_builddir)'; + } + $directory = join '/', @d; + } + } + $object = $base . $this_obj_ext; if ($have_per_exec_flags) { @@ -1710,8 +1728,7 @@ sub handle_single_transform $renamed = 1; } - # If rewrite said it was ok, put the object into a - # subdir. + # If rewrite said it was ok, put the object into a subdir. if ($directory ne '') { if ($r == LANG_SUBDIR) diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk index 5085780..ddf5fdf 100644 --- a/t/list-of-tests.mk +++ b/t/list-of-tests.mk @@ -41,7 +41,6 @@ t/java-nobase.sh \ t/objext-pr10128.sh \ t/remake-timing-bug-pr8365.sh \ t/lex-subobj-nodep.sh \ -t/subobj-vpath-pr13928.sh \ t/remake-am-pr10111.sh \ t/remake-m4-pr10111.sh \ $(perl_fake_XFAIL_TESTS) @@ -1063,6 +1062,7 @@ t/subobj-clean-pr10697.sh \ t/subobj-clean-lt-pr10697.sh \ t/subobj-indir-pr13928.sh \ t/subobj-vpath-pr13928.sh \ +t/subobj-pr13928-more-langs.sh \ t/subpkg.sh \ t/subpkg2.sh \ t/subpkg3.sh \ diff --git a/t/subobj-pr13928-more-langs.sh b/t/subobj-pr13928-more-langs.sh new file mode 100644 index 0000000..323e248 --- /dev/null +++ b/t/subobj-pr13928-more-langs.sh @@ -0,0 +1,138 @@ +#! /bin/sh +# Copyright (C) 2015 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 . + +# Expose part of automake bug#13928, also for non-C languages: if the +# subdir-objects option is in use and a source file is listed in a +# _SOURCES variable with a leading $(srcdir) component, Automake will +# generate a Makefile that tries to create the corresponding object +# file in $(srcdir) as well. + +required='cc c++ fortran77 fortran' +. test-init.sh + +cat >> configure.ac <<'END' +AC_PROG_CC +AC_PROG_CXX +AC_PROG_F77 +AC_PROG_FC +AM_CONDITIONAL([OBVIOUS], [:]) +AC_CONFIG_FILES([sub/Makefile]) +AC_OUTPUT +END + +cat > Makefile.am <<'END' +AUTOMAKE_OPTIONS = subdir-objects +SUBDIRS = sub + +LESS = m/o/r/e + +noinst_PROGRAMS = test test2 +test_SOURCES = $(srcdir)/test.f90 + +test2_SOURCES = $(indir) + +indir = ${indir2} $(empty) +indir2 = +if OBVIOUS +indir2 += ${srcdir}/$(LESS)///test.f +else +endif + +test-objs: + ls -la @srcdir@ . + : + test ! -f @srcdir@/test.$(OBJEXT) + test -f test.$(OBJEXT) + test ! -f @srcdir@/m/o/r/e/test.$(OBJEXT) + test -f m/o/r/e/test.$(OBJEXT) + : + test ! -f @srcdir@/bar.$(OBJEXT) + test -f bar.$(OBJEXT) + test ! -f @srcdir@/baz.$(OBJEXT) + test -f baz.$(OBJEXT) + : + test ! -d @srcdir@/$(DEPDIR) + test ! -d @srcdir@/m/o/r/e/$(DEPDIR) + test -d $(DEPDIR) + test -d m/o/r/e/$(DEPDIR) + +check-local: test-objs +END + +mkdir sub +cat > sub/Makefile.am <<'END' +AUTOMAKE_OPTIONS = subdir-objects +bin_PROGRAMS = foo +foo = baz +foo_SOURCES = foo.h \ + $(top_srcdir)/bar.cc \ + ${top_srcdir}/$(foo).c +END + + +$ACLOCAL +$AUTOCONF +$AUTOMAKE -a + +mkfiles='Makefile.in sub/Makefile.in' +$EGREP '(test|ba[rz])\.|DEPDIR|dirstamp|srcdir' $mkfiles # For debugging. +$EGREP '\$.(top_)?srcdir./(test|ba[rz]|\$.foo.)\.[o$]' $mkfiles && exit 1 +$FGREP '\$.(top_)?srcdir./.*$(am__dirstamp)' $mkfiles && exit 1 +$FGREP '\$.(top_)?srcdir./.*$(DEPDIR)' $mkfiles && exit 1 + +cat > test.f90 <<'EOF' + program foo + stop + end +EOF + +mkdir -p m/o/r/e +cp test.f90 m/o/r/e/test.f + +cat > sub/foo.h <<'END' +#ifdef __cplusplus +extern "C" +#endif +int foo (void); +END + +cat > bar.cc <<'END' +#include "foo.h" +#include +int main (void) +{ + std::cout << "OK!" << "\n"; + return foo (); +} +END + +cat > baz.c <<'END' +#include "foo.h" +int foo (void) +{ + return 0; +} +END + +mkdir build +cd build +../configure + +$MAKE +$MAKE test-objs +$MAKE distcheck + +: diff --git a/t/subobj-vpath-pr13928.sh b/t/subobj-vpath-pr13928.sh index 8c3a6c5..24eff1d 100644 --- a/t/subobj-vpath-pr13928.sh +++ b/t/subobj-vpath-pr13928.sh @@ -22,39 +22,106 @@ required=cc . test-init.sh -cat >> configure.ac << 'END' +cat >> configure.ac <<'END' AC_PROG_CC AM_PROG_CC_C_O +AM_CONDITIONAL([OBVIOUS], [:]) +AC_CONFIG_FILES([sub/Makefile]) AC_OUTPUT END cat > Makefile.am <<'END' AUTOMAKE_OPTIONS = subdir-objects -noinst_PROGRAMS = test +SUBDIRS = sub + +LESS = more + +noinst_PROGRAMS = test test2 test_SOURCES = $(srcdir)/test.c + +test2_SOURCES = $(indir) + +indir = +if OBVIOUS +indir += ${srcdir}/$(LESS)/test.c +else +endif + test-objs: - test ! -f '@srcdir@/test.$(OBJEXT)' + ls -la @srcdir@ . + : + test ! -f @srcdir@/test.$(OBJEXT) test -f test.$(OBJEXT) + test ! -f @srcdir@/more/test.$(OBJEXT) + test -f more/test.$(OBJEXT) + : + test ! -f @srcdir@/bar.$(OBJEXT) + test -f bar.$(OBJEXT) + test ! -f @srcdir@/baz.$(OBJEXT) + test -f baz.$(OBJEXT) + : + test ! -d @srcdir@/$(DEPDIR) + test ! -d @srcdir@/more/$(DEPDIR) + test -d $(DEPDIR) + test -d more/$(DEPDIR) + +check-local: test-objs +END + +mkdir sub +cat > sub/Makefile.am <<'END' +AUTOMAKE_OPTIONS = subdir-objects +bin_PROGRAMS = foo +foo_SOURCES = foo.h \ + $(top_srcdir)/bar.c \ + ${top_srcdir}/baz.c +END + + +$ACLOCAL +$AUTOCONF +$AUTOMAKE -a + +mkfiles='Makefile.in sub/Makefile.in' +$EGREP '(test|ba[rz])\.|DEPDIR|dirstamp|srcdir' $mkfiles # For debugging. +$EGREP '\$.(top_)?srcdir./(test|ba[rz])\.[o$]' $mkfiles && exit 1 +$FGREP '\$.(top_)?srcdir./.*$(am__dirstamp)' $mkfiles && exit 1 +$FGREP '\$.(top_)?srcdir./.*$(DEPDIR)' $mkfiles && exit 1 + +cat > test.c <<'END' +int main (void) +{ + return 0; +} END -$ACLOCAL && $AUTOCONF && $AUTOMAKE -a || fatal_ "autotools failed" +mkdir more +cp test.c more/test.c -$EGREP 'test\.|DEPDIR|dirstamp|srcdir' Makefile.in || : # For debugging. -$EGREP '\$.srcdir./test\.[o$]' Makefile.in && exit 1 -$FGREP '$(srcdir)/$(am__dirstamp)' Makefile.in && exit 1 -$FGREP '$(srcdir)/$(DEPDIR)' Makefile.in && exit 1 +echo 'int foo (void);' > sub/foo.h -cat > test.c << 'END' +cat > bar.c <<'END' +#include "foo.h" int main (void) { + return foo (); +} +END + +cat > baz.c <<'END' +#include "foo.h" +int foo (void) +{ return 0; } END -mkdir build && cd build || fatal "preparation of build directory failed" -../configure || fatal_ "./configure failed" +mkdir build +cd build +../configure $MAKE $MAKE test-objs +$MAKE distcheck : -- 2.1.3 From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 02 18:14:51 2015 Received: (at 13928) by debbugs.gnu.org; 2 Jan 2015 23:14:51 +0000 Received: from localhost ([127.0.0.1]:35310 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y7BQh-0004yB-E3 for submit@debbugs.gnu.org; Fri, 02 Jan 2015 18:14:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44231) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y7BQf-0004y3-M9 for 13928@debbugs.gnu.org; Fri, 02 Jan 2015 18:14:50 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t02NEkJw004298 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 2 Jan 2015 18:14:46 -0500 Received: from [10.3.113.113] (ovpn-113-113.phx2.redhat.com [10.3.113.113]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t02NEidq009617; Fri, 2 Jan 2015 18:14:45 -0500 Message-ID: <54A72664.40601@redhat.com> Date: Fri, 02 Jan 2015 16:14:44 -0700 From: Eric Blake Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Stefano Lattarini , automake-patches@gnu.org Subject: Re: [PATCH] compile: don't place built object files in $(srcdir), ever ... References: <997cfe38a1ae2a0554fedaf76925a951a6e67722.1420224463.git.stefano.lattarini@gmail.com> In-Reply-To: <997cfe38a1ae2a0554fedaf76925a951a6e67722.1420224463.git.stefano.lattarini@gmail.com> OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Q5gpXH13FVXmuKpc7nD6EH5opAHX8dCNT" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 13928 Cc: Oleg Latin , Diab Jerius , 13928@debbugs.gnu.org, Bert Wesarg X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Q5gpXH13FVXmuKpc7nD6EH5opAHX8dCNT Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 01/02/2015 11:49 AM, Stefano Lattarini wrote: > ... even when a source file is specified as '$(srdir)/foo.c' or > '$(top_srcdir)/bar.c'. And ditto for dependency-tracking makefile > fragments (those under '.deps' directories). > +++ b/NEWS > @@ -88,6 +88,21 @@ New in 1.16: > using a private target that is only meant to bootstrap the require= d > makefile fragments. > =20 > + - The 'subdir-object' option no longer causes object files correspon= ding > + to source files specified with an explicit '$(srcdir)' component t= o be > + placed in the source tree rather than in the build tree. > + > + For example, if Makefile.am contains: > + > + AUTOMAKE_OPTIONS =3D subdir-objects > + foo_SOURCES =3D $(srcdir)/foo.c $(srcdir)/s/bar.c $(top_srcdir= )/baz.c > + > + then "make all" will create 'foo.o' and 's/bar.o' $(builddir) rath= er s|'s/bar.o'|'s/bar.o' in| > + than in $(srcdir), and 'baz.o' in $(top_builddir) rather than in > + $(top_srcdir). > + > + This was the second part of automake bug#13928. > + > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~~ And thanks for tackling this! --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --Q5gpXH13FVXmuKpc7nD6EH5opAHX8dCNT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJUpyZkAAoJEKeha0olJ0Nqi0QH+gLH44p1VCqiVmQ5NltMUqfh RydswVBJiy/aZ6sN/oldfJWYCUWYczPE7ySFjbzKCYt2Oa2FiNjLPmVgOma/nCIO JWITr1vGUE0xcKREtN8G8w0w5yKkXavUBD/AxIS4sWGp5b2YCWrhsFtrwaoreSln nK0ei46iZkgTgcT+ENripR4teLzP7nuOMYN3B8kQEOBfz9a/xmXj1G6ey3+rD+oF ODhu3s4RCOlDyURM1yuT8GrIoj34up5gWHYym44xO2AaDTg14wR57cfVbR/xAvY9 LQuhpd/Qjh2X4wKcMSEc60FgQgV7ABSKfNkNkTbFxduXeopEsJboX6dhmPAI4JA= =9q4O -----END PGP SIGNATURE----- --Q5gpXH13FVXmuKpc7nD6EH5opAHX8dCNT-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 02 18:23:42 2015 Received: (at 13928) by debbugs.gnu.org; 2 Jan 2015 23:23:43 +0000 Received: from localhost ([127.0.0.1]:35315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y7BZG-0005BX-Do for submit@debbugs.gnu.org; Fri, 02 Jan 2015 18:23:42 -0500 Received: from mail-wi0-f174.google.com ([209.85.212.174]:52310) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y7BZ7-0005BI-Cs for 13928@debbugs.gnu.org; Fri, 02 Jan 2015 18:23:41 -0500 Received: by mail-wi0-f174.google.com with SMTP id h11so281578wiw.1 for <13928@debbugs.gnu.org>; Fri, 02 Jan 2015 15:23:32 -0800 (PST) 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=t8LtrZv3RP1zQwegn/3dOx2vwhi+rxgb7zP7RbeANME=; b=jKSXX5oqyGLFWEmdkApBXwsowuZMwHyPlKMhz8lF8QpytkiuJH5Lu+tBAY68RRlppz eQ5WH4XZTEEqvzv9fMqjjM1C5sjdXw0zokOy1O6pyabTVftPwJmJIrznB7m/cjnJtV0H M8AVkMHGZMNhgQkc0wgHxSWN2RQ8cewXLFXFjOgNhEY/HgaZ+yVWbH3As7L9KoQQZCTK ujsaDE73mrgI5ydwHi2QsHsNLiPC8BbsHGZffkO6uN8A1RdLRzUeSo5iSE+zwdAt2Dg+ RmlD3mbmuO/PL6KsqxlsbMjcNWMiq7cnCRNSCQE0c/AHLY7NrGyp9yhNsB3EWgjBQthX 1P4Q== X-Received: by 10.180.103.201 with SMTP id fy9mr1948825wib.31.1420241012788; Fri, 02 Jan 2015 15:23:32 -0800 (PST) Received: from [192.168.0.100] ([87.13.74.29]) by mx.google.com with ESMTPSA id lg7sm753209wic.0.2015.01.02.15.23.31 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Jan 2015 15:23:32 -0800 (PST) Message-ID: <54A72872.4070507@gmail.com> Date: Sat, 03 Jan 2015 00:23:30 +0100 From: Stefano Lattarini MIME-Version: 1.0 To: Eric Blake , automake-patches@gnu.org Subject: Re: bug#13928: [PATCH] compile: don't place built object files in $(srcdir), ever ... References: <997cfe38a1ae2a0554fedaf76925a951a6e67722.1420224463.git.stefano.lattarini@gmail.com> <54A72664.40601@redhat.com> In-Reply-To: <54A72664.40601@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 13928 Cc: Oleg Latin , Diab Jerius , 13928@debbugs.gnu.org, Bert Wesarg X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Hi Eric. On 01/03/2015 12:14 AM, Eric Blake wrote: > On 01/02/2015 11:49 AM, Stefano Lattarini wrote: >> ... even when a source file is specified as '$(srdir)/foo.c' or >> '$(top_srcdir)/bar.c'. And ditto for dependency-tracking makefile >> fragments (those under '.deps' directories). > >> +++ b/NEWS > >> @@ -88,6 +88,21 @@ New in 1.16: >> using a private target that is only meant to bootstrap the required >> makefile fragments. >> >> + - The 'subdir-object' option no longer causes object files corresponding >> + to source files specified with an explicit '$(srcdir)' component to be >> + placed in the source tree rather than in the build tree. >> + >> + For example, if Makefile.am contains: >> + >> + AUTOMAKE_OPTIONS = subdir-objects >> + foo_SOURCES = $(srcdir)/foo.c $(srcdir)/s/bar.c $(top_srcdir)/baz.c >> + >> + then "make all" will create 'foo.o' and 's/bar.o' $(builddir) rather > > s|'s/bar.o'|'s/bar.o' in| > Thanks, will fix before merging this in a non-rewindable branch (that can't happen before Automake 1.16 is released anyway). >> + than in $(srcdir), and 'baz.o' in $(top_builddir) rather than in >> + $(top_srcdir). >> + >> + This was the second part of automake bug#13928. >> + >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > And thanks for tackling this! > Wait to thank me, I've found another pre-existing bug in this area, affecting non-GNU makes :-/ And by that I mean non-borked ones, like BSD make and Solaris 10 CCS make. On the plus side, the bug only affects "make distclean" (causing spurious failures), and only for packages using a recursive setup and referencing source files in a parent directory from a subdir Make; so it's a minor one. On the negative side, I probably introduced it myself in some 1.12.x release... Hopefully I'll have a fix in a week or so (I'll be AFK for most time in the coming days). From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 02 20:14:43 2015 Received: (at 13928) by debbugs.gnu.org; 3 Jan 2015 01:14:43 +0000 Received: from localhost ([127.0.0.1]:35329 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y7DIg-0007yi-Ef for submit@debbugs.gnu.org; Fri, 02 Jan 2015 20:14:42 -0500 Received: from mail-wi0-f171.google.com ([209.85.212.171]:61613) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y7DIe-0007ya-4o for 13928@debbugs.gnu.org; Fri, 02 Jan 2015 20:14:40 -0500 Received: by mail-wi0-f171.google.com with SMTP id bs8so344484wib.4 for <13928@debbugs.gnu.org>; Fri, 02 Jan 2015 17:14:39 -0800 (PST) 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=WtWj5BdgfD93x8O5Lt/KgZk9o85XmcXvG6Q54ApbWfQ=; b=WMhWInr3HQ0YaFUUlh7bVQBaE2kSmnkMuMv4PKk5t5pSUUWp0DTMczgHJFOkCl3NVO h7dI5+e6HQF76iGETHjcg/CsNv63r+E4m7djyl9GohnLYkvYXN69c5AavKNimjliqkvV lJJIU3fOMfQiwDqK/9BOd98D7vIRwbA4b5hEZpU/9+6qYnPqCYrHBgWu3HTFstc29QwT pzJKT1jEy2P5Clct5VBq7xbjZPQahU5DcRcb0HTzVrIkEuiICjlHA81MJagwMVbncf9x q8kO+RRd/JXDY9M52z++M2UeHigLr3LxgdRdhMI32FXBtnuFsVUm14jA3ca79cnJHfzS YFHw== X-Received: by 10.194.62.235 with SMTP id b11mr77510135wjs.73.1420247679603; Fri, 02 Jan 2015 17:14:39 -0800 (PST) Received: from [192.168.0.100] ([87.13.74.29]) by mx.google.com with ESMTPSA id n8sm66425385wjx.0.2015.01.02.17.14.38 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Jan 2015 17:14:39 -0800 (PST) Message-ID: <54A7427E.1080101@gmail.com> Date: Sat, 03 Jan 2015 02:14:38 +0100 From: Stefano Lattarini MIME-Version: 1.0 To: Eric Blake , automake-patches@gnu.org Subject: Re: bug#13928: [PATCH] compile: don't place built object files in $(srcdir), ever ... References: <997cfe38a1ae2a0554fedaf76925a951a6e67722.1420224463.git.stefano.lattarini@gmail.com> <54A72664.40601@redhat.com> <54A72872.4070507@gmail.com> In-Reply-To: <54A72872.4070507@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 13928 Cc: Oleg Latin , Diab Jerius , 13928@debbugs.gnu.org, Bert Wesarg X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 01/03/2015 12:23 AM, Stefano Lattarini wrote: > Hi Eric. > > On 01/03/2015 12:14 AM, Eric Blake wrote: >> On 01/02/2015 11:49 AM, Stefano Lattarini wrote: >>> ... even when a source file is specified as '$(srdir)/foo.c' or >>> '$(top_srcdir)/bar.c'. And ditto for dependency-tracking makefile >>> fragments (those under '.deps' directories). >> >>> +++ b/NEWS >> >>> @@ -88,6 +88,21 @@ New in 1.16: >>> using a private target that is only meant to bootstrap the required >>> makefile fragments. >>> >>> + - The 'subdir-object' option no longer causes object files corresponding >>> + to source files specified with an explicit '$(srcdir)' component to be >>> + placed in the source tree rather than in the build tree. >>> + >>> + For example, if Makefile.am contains: >>> + >>> + AUTOMAKE_OPTIONS = subdir-objects >>> + foo_SOURCES = $(srcdir)/foo.c $(srcdir)/s/bar.c $(top_srcdir)/baz.c >>> + >>> + then "make all" will create 'foo.o' and 's/bar.o' $(builddir) rather >> >> s|'s/bar.o'|'s/bar.o' in| >> > Thanks, will fix before merging this in a non-rewindable branch (that > can't happen before Automake 1.16 is released anyway). > >>> + than in $(srcdir), and 'baz.o' in $(top_builddir) rather than in >>> + $(top_srcdir). >>> + >>> + This was the second part of automake bug#13928. >>> + >>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> >> And thanks for tackling this! >> > Wait to thank me, I've found another pre-existing bug in this area, affecting > non-GNU makes :-/ And by that I mean non-borked ones, like BSD make and > Solaris 10 CCS make. > > On the plus side, the bug only affects "make distclean" (causing spurious > failures), and only for packages using a recursive setup and referencing > source files in a parent directory from a subdir Make; so it's a minor one. > On the negative side, I probably introduced it myself in some 1.12.x > release... > > Hopefully I'll have a fix in a week or so (I'll be AFK for most time in the > coming days). > Also, it appears this is causing another new testsuite failure with BSD make. The following squash-in diff seems to take care of that: -*-*-*- diff --git a/bin/automake.in b/bin/automake.in index f4327fc..0c44703 100644 --- a/bin/automake.in +++ b/bin/automake.in @@ -1677,12 +1677,15 @@ sub handle_single_transform { $this_obj_ext = $obj; $derived_source = 0; - # Don't ever place built object files in $(srcdir), even when - # sources are specified explicitly as (say) '$(srcdir)/foo.c' - # or '$(top_srcdir)/foo.c'. See automake bug#13928. - my @d = split '/', $directory; - if (@d) + do { + last unless option 'subdir-objects'; + # Don't ever place built object files in $(srcdir), + # even when sources are specified explicitly as (say) + # '$(srcdir)/foo.c' or '$(top_srcdir)/foo.c'. + # See automake bug#13928. + my @d = split '/', $directory; + last unless @d; my $d = $d[0]; if ($d eq '$(srcdir)' or $d eq '${srcdir}') { @@ -1690,7 +1693,7 @@ sub handle_single_transform } elsif ($d eq '$(top_srcdir)' or $d eq '${top_srcdir}') { - $d[0] = '$(top_builddir)'; + $d[0] = '$(top_builddir)'; } $directory = join '/', @d; } -*-*-*- I will re-run the whole testsuite with all the affected make implementations in the coming days, to make sure this change doesn't introduce new failures. Sorry for the noise, Stefano From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 04 12:18:45 2015 Received: (at 13928) by debbugs.gnu.org; 4 Jan 2015 17:18:45 +0000 Received: from localhost ([127.0.0.1]:36538 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y7opA-0002l3-Jp for submit@debbugs.gnu.org; Sun, 04 Jan 2015 12:18:45 -0500 Received: from mail-we0-f175.google.com ([74.125.82.175]:49541) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y7op8-0002kt-Jo for 13928@debbugs.gnu.org; Sun, 04 Jan 2015 12:18:43 -0500 Received: by mail-we0-f175.google.com with SMTP id k11so6599437wes.6 for <13928@debbugs.gnu.org>; Sun, 04 Jan 2015 09:18:42 -0800 (PST) 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=f7xL25RvkWGPUQ10rYuoNxZzCPHhc5E+1cZQK4KPY68=; b=FKbnZQGtln7MqTv7TUT8hSODhJVQr9YnvPtZ4EiSwgVTgsDsxmykke/dE0aXpGId8P bIzrVBcL7Ahw9f03jPRprRCoZycyxmJYPxl/0BZVuFW3CptqZPJNclQbaIDNWQ98D2ZP SJC+WkLPM2TIHdTYfaiLGkwwG/XHsusPJhAfLe54d7oc4T/DHFyzPC9cx7tqvs9NnE6R +SGirddbh3K6LXS+fsNjtKLMoZcriGtPhwCqqt1rHFWVQ7JUcKjXV/BVDEB10CvFuBrj y2JUfwtteKLLJRonJMnV2S3TJCN5FvtPOc2Chei7GdWvtVhcrl1svYDvwIWL1MmEKjWD M45A== X-Received: by 10.194.2.34 with SMTP id 2mr173971229wjr.58.1420391921979; Sun, 04 Jan 2015 09:18:41 -0800 (PST) Received: from [192.168.0.100] ([87.13.74.29]) by mx.google.com with ESMTPSA id c10sm72237392wjy.4.2015.01.04.09.18.39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Jan 2015 09:18:41 -0800 (PST) Message-ID: <54A975E9.7030004@gmail.com> Date: Sun, 04 Jan 2015 18:18:33 +0100 From: Stefano Lattarini MIME-Version: 1.0 To: Eric Blake , automake-patches@gnu.org Subject: Re: bug#13928: [PATCH] compile: don't place built object files in $(srcdir), ever ... References: <997cfe38a1ae2a0554fedaf76925a951a6e67722.1420224463.git.stefano.lattarini@gmail.com> <54A72664.40601@redhat.com> <54A72872.4070507@gmail.com> <54A7427E.1080101@gmail.com> In-Reply-To: <54A7427E.1080101@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 13928 Cc: Oleg Latin , Diab Jerius , 13928@debbugs.gnu.org, Bert Wesarg X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) [I once again have to correct myself, sigh] On 01/03/2015 02:14 AM, Stefano Lattarini wrote: > On 01/03/2015 12:23 AM, Stefano Lattarini wrote: >> Hi Eric. >> >> On 01/03/2015 12:14 AM, Eric Blake wrote: >>> On 01/02/2015 11:49 AM, Stefano Lattarini wrote: >>>> ... even when a source file is specified as '$(srdir)/foo.c' or >>>> '$(top_srcdir)/bar.c'. And ditto for dependency-tracking makefile >>>> fragments (those under '.deps' directories). >>> >>>> +++ b/NEWS >>> >>>> @@ -88,6 +88,21 @@ New in 1.16: >>>> using a private target that is only meant to bootstrap the required >>>> makefile fragments. >>>> >>>> + - The 'subdir-object' option no longer causes object files corresponding >>>> + to source files specified with an explicit '$(srcdir)' component to be >>>> + placed in the source tree rather than in the build tree. >>>> + >>>> + For example, if Makefile.am contains: >>>> + >>>> + AUTOMAKE_OPTIONS = subdir-objects >>>> + foo_SOURCES = $(srcdir)/foo.c $(srcdir)/s/bar.c $(top_srcdir)/baz.c >>>> + >>>> + then "make all" will create 'foo.o' and 's/bar.o' $(builddir) rather >>> >>> s|'s/bar.o'|'s/bar.o' in| >>> >> Thanks, will fix before merging this in a non-rewindable branch (that >> can't happen before Automake 1.16 is released anyway). >> >>>> + than in $(srcdir), and 'baz.o' in $(top_builddir) rather than in >>>> + $(top_srcdir). >>>> + >>>> + This was the second part of automake bug#13928. >>>> + >>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>> >>> And thanks for tackling this! >>> >> Wait to thank me, I've found another pre-existing bug in this area, affecting >> non-GNU makes :-/ And by that I mean non-borked ones, like BSD make and >> Solaris 10 CCS make. >> >> On the plus side, the bug only affects "make distclean" (causing spurious >> failures), and only for packages using a recursive setup and referencing >> source files in a parent directory from a subdir Make; so it's a minor one. >> On the negative side, I probably introduced it myself in some 1.12.x >> release... >> Nope, it was pre-existing. And I appear to have found an easy enough fix for it; I will soon post a patch if the testsuite is happy on BSD and Solaris. >> Hopefully I'll have a fix in a week or so (I'll be AFK for most time in the >> coming days). > > > Also, it appears this is causing another new testsuite failure with BSD make. > The following squash-in diff seems to take care of that: > > -*-*-*- > > diff --git a/bin/automake.in b/bin/automake.in > index f4327fc..0c44703 100644 > --- a/bin/automake.in > +++ b/bin/automake.in > @@ -1677,12 +1677,15 @@ sub handle_single_transform > { > $this_obj_ext = $obj; > $derived_source = 0; > - # Don't ever place built object files in $(srcdir), even when > - # sources are specified explicitly as (say) '$(srcdir)/foo.c' > - # or '$(top_srcdir)/foo.c'. See automake bug#13928. > - my @d = split '/', $directory; > - if (@d) > + do > { > + last unless option 'subdir-objects'; > + # Don't ever place built object files in $(srcdir), > + # even when sources are specified explicitly as (say) > + # '$(srcdir)/foo.c' or '$(top_srcdir)/foo.c'. > + # See automake bug#13928. > + my @d = split '/', $directory; > + last unless @d; > my $d = $d[0]; > if ($d eq '$(srcdir)' or $d eq '${srcdir}') > { > @@ -1690,7 +1693,7 @@ sub handle_single_transform > } > elsif ($d eq '$(top_srcdir)' or $d eq '${top_srcdir}') > { > - $d[0] = '$(top_builddir)'; > + $d[0] = '$(top_builddir)'; > } > $directory = join '/', @d; > } > > -*-*-*- > This change was serious bugged BTW. I've now fixed it, but rather than posting another squash-in, I will re-post the whole adjust patch series once I've made sure there are no regressions on an of the UNIX flavors I can test with (GNU/Linux, Solaris 10, AIX 7.1, NetBSD 5.1, FreeBSD 8.0) Regards, Stefano From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 05 06:16:18 2015 Received: (at 13928) by debbugs.gnu.org; 5 Jan 2015 11:16:18 +0000 Received: from localhost ([127.0.0.1]:36978 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y85dq-0005Uj-7n for submit@debbugs.gnu.org; Mon, 05 Jan 2015 06:16:17 -0500 Received: from mail-wg0-f43.google.com ([74.125.82.43]:33809) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y85do-0005UZ-GA for 13928@debbugs.gnu.org; Mon, 05 Jan 2015 06:16:09 -0500 Received: by mail-wg0-f43.google.com with SMTP id k14so9586982wgh.16 for <13928@debbugs.gnu.org>; Mon, 05 Jan 2015 03:16:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=NLQBtqHiWacxMC3ctOwv414Xf9CoPlqwEjOB8DDBzNg=; b=HFTB5GcTPudabEDtmMtnOXNQ1mCM4ZUMcSsZWSWoW8jJ2rVg+XEzBBUvgCDdfDZuzf aygwmv8sApCPEYbMkOstvf51NVyprw1+cWJUF8XhRzKXJkC3iS32S6V2GUqbJcJIT54f rbeZOVDme7CJlkjM2acRVXqYixvzS99txWuV5JaToxc/hitnKiNOu+/5UeQ6oVh/CZny hX4GsnVtngRahIIDhzJ4hw+l3eTzGdTB71GjE91Wv9KMjfRI7m02kauD0g4GuOljLZOh l3RxYqSvF9Ylaw1THz0TJhsOsk0IpfrunwrrsPuDF6NJYhy4iXgzPOlXbIn0dX1Sp9Qq SX8w== X-Received: by 10.194.234.40 with SMTP id ub8mr183284082wjc.100.1420456567553; Mon, 05 Jan 2015 03:16:07 -0800 (PST) Received: from localhost.localdomain (host151-101-dynamic.20-79-r.retail.telecomitalia.it. [79.20.101.151]) by mx.google.com with ESMTPSA id be4sm9482279wib.16.2015.01.05.03.16.06 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 05 Jan 2015 03:16:07 -0800 (PST) From: Stefano Lattarini To: automake-patches@gnu.org Subject: [PATCH 0/4] Fix automake bug#13928 Date: Mon, 5 Jan 2015 12:15:49 +0100 Message-Id: X-Mailer: git-send-email 2.1.3 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 13928 Cc: 13928@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Stefano Lattarini (4): deps: 'subdir-object' option now works when foo_SOURCES contains $(var) tests: fix some bugs in an XFAILing test compile: don't place built object files in $(srcdir), ever ... deps: fix corner-case "make distclean" bug NEWS | 43 +++++++++++ PLANS/subdir-objects.txt | 10 +-- THANKS | 1 + bin/automake.in | 134 +++++++++++++++++++-------------- lib/am/configure.am | 6 +- lib/am/depend.am | 14 +++- m4/depout.m4 | 78 +++++++++---------- m4/make.m4 | 59 +++++++-------- t/depcomp8a.sh | 16 ++-- t/depcomp8b.sh | 16 ++-- t/{postproc.sh => depend-postproc.sh} | 29 ++++++- t/extra-sources.sh | 5 +- t/lex-depend-cxx.sh | 5 ++ t/lex-depend-grep.sh | 2 +- t/list-of-tests.mk | 5 +- t/pr224.sh | 4 +- t/subobj-indir-pr13928.sh | 4 +- t/subobj-pr13928-more-langs.sh | 138 ++++++++++++++++++++++++++++++++++ t/subobj-vpath-pr13928.sh | 89 +++++++++++++++++++--- t/subobj11b.sh | 10 +-- t/subobj11c.sh | 2 +- 21 files changed, 478 insertions(+), 192 deletions(-) rename t/{postproc.sh => depend-postproc.sh} (68%) create mode 100644 t/subobj-pr13928-more-langs.sh -- 2.1.3 From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 05 06:16:20 2015 Received: (at 13928) by debbugs.gnu.org; 5 Jan 2015 11:16:20 +0000 Received: from localhost ([127.0.0.1]:36984 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y85dy-0005VD-6t for submit@debbugs.gnu.org; Mon, 05 Jan 2015 06:16:20 -0500 Received: from mail-we0-f180.google.com ([74.125.82.180]:43500) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y85dq-0005Ui-Eq for 13928@debbugs.gnu.org; Mon, 05 Jan 2015 06:16:13 -0500 Received: by mail-we0-f180.google.com with SMTP id w62so7633030wes.25 for <13928@debbugs.gnu.org>; Mon, 05 Jan 2015 03:16:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=UYTAFGWH0fe2Cv5dFHaOEJSIUmg3bz6joMP0d0x3qTw=; b=cwlc49V4ZwrBK6bAXItfN3NOxIRIJdxvgULfCj1s9flwpY7bAMADMZRzWEiaA2a2tx MpdVF1Yf0E/QjMLN6mVuatKkOqmPMgD3Ap9lnAGdqCiJ/K/5ddUs/Yxq08l76Jlutl6i TArKro9y80ynXm/hhRxh4ucXtvIFH9JnBQjnZ/5KWkZzW94PPbuohUJrJpOhKhoh280R rDhg1K6xpVx7cfkBTQ6JHVBwVi2tMBGVLkV1uKppQLI2lfFUMxGJSHr8fkNt9wMNe4BE lNVp63j5z7lsaLjrorpcta1GCBSOuGpPIWD2mfh+jwgdzJEIvirY32IP112ffIYRLLtF ezMQ== X-Received: by 10.180.108.143 with SMTP id hk15mr25345328wib.6.1420456569924; Mon, 05 Jan 2015 03:16:09 -0800 (PST) Received: from localhost.localdomain (host151-101-dynamic.20-79-r.retail.telecomitalia.it. [79.20.101.151]) by mx.google.com with ESMTPSA id be4sm9482279wib.16.2015.01.05.03.16.07 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 05 Jan 2015 03:16:09 -0800 (PST) From: Stefano Lattarini To: automake-patches@gnu.org Subject: [PATCH 1/4] deps: 'subdir-object' option now works when foo_SOURCES contains $(var) Date: Mon, 5 Jan 2015 12:15:50 +0100 Message-Id: X-Mailer: git-send-email 2.1.3 In-Reply-To: References: In-Reply-To: References: X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 13928 Cc: 13928@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Following a suggestions of Johan Kristensen, we have config.status use 'make' invocations rather than Makefile-parsing 'sed' hacks to bootstrap the dependency-tracking '.Po' and '.Plo' makefile fragments. To handle the inclusion of such files that are still missing when make is first we basically generate a temporary Makefile without these includes, and call 'make' on that Makefile. This fixes the serious bug bug#13928, which was an hard blocker to make the behavior mandated by the 'subdir-object' active by default (which we want to do in Automake 2.0). The issue has also been reported in bug#15919. * NEWS, THANKS: Update. * bin/automake.in (handle_languages): Add a trailing "marking" comment ("# am--include-marker") to the generated Makefile lines issuing 'include' directives for the dependency-tracking '.Po' and '.Plo' makefile fragments. Also rename the generated Makefile variable 'am__depfiles_maybe' to the clearer 'am__maybe_remake_depfiles'. Minor unrelated refactoring. * lib/am/configure.am: Adjust to account for the 'am__depfiles_maybe' -> 'am__maybe_remake_depfiles' renaming. * lib/am/depend.am: Add rules to generate a dummy version of all the dependency-tracking '.Po' and '.Plo' makefile fragments. * m4/depout.m4: Use make invocations rather than Makefile-parsing sed hacks to bootstrap the dependency-tracking '.Po' and '.Plo' makefile fragments. We still use some sed trickery in order to remove the inclusion of the still non existing .Po and .Plo files from the Makefile we invoke make upon; this is done stripping lines that contain the magic string "# am--include-marker". * m4/make.m4 (AM_MAKE_INCLUDE): Given that now automake generates Makefiles containing include statements with trailing comment, adjust the checks done here to make sure $MAKE support that; e.g., "include foo.mk # comment" rather than just "include foo.mk". Also refactor and adjust to leave better debugging info in config.log. * t/postproc.sh: Rename ... * t/depend-postproc.sh: ... to this, and adjust and enhance. * t/list-of-tests.mk (handwritten_TESTS): Adjust. (XFAIL_TESTS): Remove 't/subobj-indir-pr13928.sh', which is now succeeding. * t/subobj-indir-pr13928.sh: Simplify slightly, now that we expect it to pass. * t/depcomp8a.sh: Adjust grepping check to account for the changes in the generated Makefile, and tp be somewhat more robust in light of possible future modifications. * t/depcomp8b.sh: Likewise. * t/subobj11b.sh: Likewise. * t/subobj11c.sh: Likewise. * t/extra-sources.sh: Likewise. * t/lex-depend-grep.sh: Likewise. * t/lex-depend-cxx.sh: Add a command to help debugging in case of test failure. Helped-by: Johan Kristensen Signed-off-by: Stefano Lattarini --- NEWS | 28 ++++++++++++ THANKS | 1 + bin/automake.in | 84 ++++++++++++++++++----------------- lib/am/configure.am | 6 +-- lib/am/depend.am | 7 +++ m4/depout.m4 | 78 ++++++++++++++------------------ m4/make.m4 | 59 +++++++++++------------- t/depcomp8a.sh | 16 +++---- t/depcomp8b.sh | 16 +++---- t/{postproc.sh => depend-postproc.sh} | 29 ++++++++++-- t/extra-sources.sh | 5 ++- t/lex-depend-cxx.sh | 5 +++ t/lex-depend-grep.sh | 2 +- t/list-of-tests.mk | 3 +- t/subobj-indir-pr13928.sh | 4 +- t/subobj11b.sh | 10 ++--- t/subobj11c.sh | 2 +- 17 files changed, 203 insertions(+), 152 deletions(-) rename t/{postproc.sh => depend-postproc.sh} (68%) diff --git a/NEWS b/NEWS index 84a5e0a..a930049 100644 --- a/NEWS +++ b/NEWS @@ -62,6 +62,34 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +New in 1.16: + +* Bugs fixed: + + - Automatic dependency tracking has been fixed to work also when the + subdir-object option is used and some 'foo_SOURCES' definition contains + unexpanded references to make variables, as in, e.g.: + + a_src = sources/libs/aaa + b_src = sources/bbb + foo_SOURCES = $(a_src)/bar.c $(b_src)/baz.c + + With such a setup, the created makefile fragment containing dependency + tracking information will be correctly placed under the directories + named 'sources/libs/aaa/.deps' and 'sources/bbb/.deps', rather than + mistakenly under directories named (literally!) '$(src_a)/.deps' and + '$(src_b)/.deps' (this was automake bug#13928). + + Notice that in order to fix this bug we had to slightly change the + semantics of how config.status bootstraps the makefile fragments + required for the dependency tracking to work: rather than attempting + to parse the Makefiles via grep and sed trickeries only, we actually + invoke 'make' on a slightly preprocessed version of those Makefiles, + using a private target that is only meant to bootstrap the required + makefile fragments. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + New in 1.15: * Improvements and refactorings in the install-sh script: diff --git a/THANKS b/THANKS index b66f744..8b87d58 100644 --- a/THANKS +++ b/THANKS @@ -192,6 +192,7 @@ Joel N. Weber II nemo@koa.iolani.honolulu.hi.us Joerg-Martin Schwarz jms@jms.prima.ruhr.de Johan Dahlin jdahlin@async.com.br Johan Danielsson joda@pdc.kth.se +Johan Kristensen johankristensen@gmail.com Johannes Nicolai johannes.nicolai@student.hpi.uni-potsdam.de John Calcote john.calcote@gmail.com John F Trudeau JohnTrudeau@firsthealth.com diff --git a/bin/automake.in b/bin/automake.in index eedc8bc..f19be92 100644 --- a/bin/automake.in +++ b/bin/automake.in @@ -1230,48 +1230,50 @@ sub check_user_variables sub handle_languages () { if (! option 'no-dependencies') - { - # Include auto-dep code. Don't include it if DEP_FILES would - # be empty. - if (keys %extension_seen && keys %dep_files) - { - # Set location of depcomp. - define_variable ('depcomp', - "\$(SHELL) $am_config_aux_dir/depcomp", - INTERNAL); - define_variable ('am__depfiles_maybe', 'depfiles', INTERNAL); - - require_conf_file ("$am_file.am", FOREIGN, 'depcomp'); - - my @deplist = sort keys %dep_files; - # Generate each 'include' individually. Irix 6 make will - # not properly include several files resulting from a - # variable expansion; generating many separate includes - # seems safest. - $output_rules .= "\n"; - foreach my $iter (@deplist) - { - $output_rules .= (subst ('AMDEP_TRUE') - . subst ('am__include') - . ' ' - . subst ('am__quote') - . $iter - . subst ('am__quote') - . "\n"); - } - - # Compute the set of directories to remove in distclean-depend. - my @depdirs = uniq (map { dirname ($_) } @deplist); - $output_rules .= file_contents ('depend', - new Automake::Location, - DEPDIRS => "@depdirs"); - } - } + { + # Include auto-dep code. Don't include it if DEP_FILES would + # be empty. + if (keys %extension_seen && keys %dep_files) + { + my @dep_files = sort keys %dep_files; + # Set location of depcomp. + define_variable ('depcomp', + "\$(SHELL) $am_config_aux_dir/depcomp", + INTERNAL); + define_variable ('am__maybe_remake_depfiles', 'depfiles', INTERNAL); + define_variable ('am__depfiles_remade', "@dep_files", INTERNAL); + # Generate each 'include' directive individually. Several make + # implementations (IRIX 6, Solaris 10, FreeBSD 8) will fail to + # properly include several files resulting from a variable + # expansion. Just Generating many separate includes seems thus + # safest. + $output_rules .= "\n"; + foreach my $depfile (@dep_files) + { + $output_rules .= subst ('AMDEP_TRUE') . + subst ('am__include') . + " " . + subst('am__quote') . + $depfile . + subst('am__quote') . + " " . + "# am--include-marker\n"; + } + + require_conf_file ("$am_file.am", FOREIGN, 'depcomp'); + + # Compute the set of directories to remove in distclean-depend. + my @dep_dirs = uniq (map { dirname ($_) } @dep_files); + $output_rules .= file_contents ('depend', + new Automake::Location, + DEPDIRS => "@dep_dirs"); + } + } else - { - define_variable ('depcomp', '', INTERNAL); - define_variable ('am__depfiles_maybe', '', INTERNAL); - } + { + define_variable ('depcomp', '', INTERNAL); + define_variable ('am__maybe_remake_depfiles', '', INTERNAL); + } my %done; diff --git a/lib/am/configure.am b/lib/am/configure.am index 34ebd17..a6086dd 100644 --- a/lib/am/configure.am +++ b/lib/am/configure.am @@ -76,10 +76,10 @@ endif %?TOPDIR_P% ?TOPDIR_P? $(SHELL) ./config.status;; \ ?!TOPDIR_P? cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ -## FIXME: $(am__depfiles_maybe) lets us re-run the rule to create the +## FIXME: $(am__maybe_remake_depfiles) lets us re-run the rule to create the ## .P files. Ideally we wouldn't have to do this by hand. - echo ' cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE% $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE% $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE% $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE% $(am__maybe_remake_depfiles);; \ esac; ## Avoid the "deleted header file" problem for the dependencies. diff --git a/lib/am/depend.am b/lib/am/depend.am index 00ba5b3..0b226b6 100644 --- a/lib/am/depend.am +++ b/lib/am/depend.am @@ -16,6 +16,13 @@ am__mv = mv -f +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) +.PHONY: am--depfiles + ## This Makefile depends on Depdirs' files, so we should never ## erase them in -am or -recursive rules; that would prevent any other ## rules from being recursive (for instance multilib clean rules are diff --git a/m4/depout.m4 b/m4/depout.m4 index a59dcf5..2109bb3 100644 --- a/m4/depout.m4 +++ b/m4/depout.m4 @@ -6,7 +6,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. - # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], @@ -14,49 +13,41 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac + # TODO: see whether this extra hack can be removed once we start + # requiring Autoconf 2.70 or later. + AS_CASE([$CONFIG_FILES], + [*\'*], [eval set x "$CONFIG_FILES"], + [*], [set x $CONFIG_FILES]) shift - for mf + # Used to flag and report bootstrapping failures. + am_rc=0 + for am_mf do # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line + am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile which includes + # dependency-tracking related rules and includes. + # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done + sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ + || continue + am_dirpart=`AS_DIRNAME(["$am_mf"])` + am_filepart=`AS_BASENAME(["$am_mf"])` + AM_RUN_LOG([cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles]) || am_rc=$? done + if test $am_rc -ne 0; then + AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments + for automatic dependency tracking. Try re-running configure with the + '--disable-dependency-tracking' option to at least be able to build + the package (albeit without support for automatic dependency tracking).]) + fi + AS_UNSET([am_dirpart]) + AS_UNSET([am_filepart]) + AS_UNSET([am_mf]) + AS_UNSET([am_rc]) + rm -f conftest-deps.mk } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS @@ -65,11 +56,10 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each '.P' file that we will -# need in order to bootstrap the dependency handling code. +# This code is only required when automatic dependency tracking is enabled. +# This creates each '.Po' and '.Plo' makefile fragment that we'll need in +# order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) + [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) diff --git a/m4/make.m4 b/m4/make.m4 index a82d2d2..f5520b1 100644 --- a/m4/make.m4 +++ b/m4/make.m4 @@ -8,42 +8,35 @@ # AM_MAKE_INCLUDE() # ----------------- -# Check to see how make treats includes. +# Check whether make has an 'include' directive that can support all +# the idioms we need for our automatic dependency tracking code. AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' +[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) +cat > confinc.mk << 'END' am__doit: - @echo this is the am__doit target + @echo this is the am__doit target >confinc.out .PHONY: am__doit END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) +# BSD make does it like this. +echo '.include "confinc.mk" # ignored' > confmf.BSD +# Other make implementations (GNU, Solaris 10, AIX) do it like this. +echo 'include confinc.mk # ignored' > confmf.GNU +_am_result=no +for s in GNU BSD; do + AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) + AS_CASE([$?:`cat confinc.out 2>/dev/null`], + ['0:this is the am__doit target'], + [AS_CASE([$s], + [BSD], [am__include='.include' am__quote='"'], + [am__include='include' am__quote=''])]) + if test "$am__include" != "#"; then + _am_result="yes ($s style)" + break + fi +done +rm -f confinc.* confmf.* +AC_MSG_RESULT([${_am_result}]) +AC_SUBST([am__include])]) +AC_SUBST([am__quote])]) diff --git a/t/depcomp8a.sh b/t/depcomp8a.sh index 94b7afa..ee440ed 100644 --- a/t/depcomp8a.sh +++ b/t/depcomp8a.sh @@ -51,10 +51,10 @@ $ACLOCAL # FIXME: stop disabling the warnings in the 'unsupported' category # FIXME: once the 'subdir-objects' option has been mandatory. $AUTOMAKE -a -Wno-unsupported -grep include Makefile.in # For debugging. -grep 'include.*\./\$(DEPDIR)/foo\.P' Makefile.in -grep 'include.*\./\$(DEPDIR)/bar\.P' Makefile.in -grep 'include.*/\./\$(DEPDIR)' Makefile.in && exit 1 +grep '\.P' Makefile.in # For debugging. +grep '\./\$(DEPDIR)/foo\.Po' Makefile.in +grep '\./\$(DEPDIR)/bar\.Po' Makefile.in +grep '/\./\$(DEPDIR)' Makefile.in && exit 1 $AUTOCONF # Don't reject slower dependency extractors, for better coverage. @@ -68,10 +68,10 @@ DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' $MAKE distcheck echo AUTOMAKE_OPTIONS = subdir-objects >> Makefile.am $AUTOMAKE -grep include Makefile.in # For debugging. -grep 'include.*\./\$(DEPDIR)/foo\.P' Makefile.in -grep 'include.*[^a-zA-Z0-9_/]sub/\$(DEPDIR)/bar\.P' Makefile.in -$EGREP 'include.*/(\.|sub)/\$\(DEPDIR\)' Makefile.in && exit 1 +grep '\.P' Makefile.in # For debugging. +grep '\./\$(DEPDIR)/foo\.Po' Makefile.in +grep '[^a-zA-Z0-9_/]sub/\$(DEPDIR)/bar\.Po' Makefile.in +$EGREP '/(\.|sub)/\$\(DEPDIR\)' Makefile.in && exit 1 $AUTOCONF # Don't reject slower dependency extractors, for better coverage. diff --git a/t/depcomp8b.sh b/t/depcomp8b.sh index 47bf5c5..f1f65f3 100644 --- a/t/depcomp8b.sh +++ b/t/depcomp8b.sh @@ -48,10 +48,10 @@ $ACLOCAL # FIXME: stop disabling the warnings in the 'unsupported' category # FIXME: once the 'subdir-objects' option has been mandatory. $AUTOMAKE -a -Wno-unsupported -grep include Makefile.in # For debugging. -grep 'include.*\./\$(DEPDIR)/foo\.P' Makefile.in -grep 'include.*\./\$(DEPDIR)/bar\.P' Makefile.in -grep 'include.*/\./\$(DEPDIR)' Makefile.in && exit 1 +grep '\.P' Makefile.in # For debugging. +grep '\./\$(DEPDIR)/foo\.Plo' Makefile.in +grep '\./\$(DEPDIR)/bar\.Plo' Makefile.in +grep '/\./\$(DEPDIR)' Makefile.in && exit 1 $AUTOCONF # Don't reject slower dependency extractors, for better coverage. @@ -64,10 +64,10 @@ DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' $MAKE distcheck echo AUTOMAKE_OPTIONS += subdir-objects >> Makefile.am $AUTOMAKE -grep include Makefile.in # For debugging. -grep 'include.*\./\$(DEPDIR)/foo\.P' Makefile.in -grep 'include.*[^a-zA-Z0-9_/]sub/\$(DEPDIR)/bar\.P' Makefile.in -$EGREP 'include.*/(\.|sub)/\$\(DEPDIR\)' Makefile.in && exit 1 +grep '\.P' Makefile.in # For debugging. +grep '\./\$(DEPDIR)/foo\.Plo' Makefile.in +grep '[^a-zA-Z0-9_/]sub/\$(DEPDIR)/bar\.Plo' Makefile.in +$EGREP '/(\.|sub)/\$\(DEPDIR\)' Makefile.in && exit 1 $AUTOCONF # Don't reject slower dependency extractors, for better coverage. diff --git a/t/postproc.sh b/t/depend-postproc.sh similarity index 68% rename from t/postproc.sh rename to t/depend-postproc.sh index 3ac64a4..74088db0 100644 --- a/t/postproc.sh +++ b/t/depend-postproc.sh @@ -15,20 +15,22 @@ # along with this program. If not, see . # Check to make sure we recognize a Makefile.in, even if post-processed -# and renamed. +# and renamed. The particularly tricky code for automatic dependency +# tracking support used to have issues with that. required=cc . test-init.sh -cat >configure.ac < configure.ac < myMakefile.am << 'END' +cat > myMakefile.am <<'END' bin_PROGRAMS = fred fred_SOURCES = fred.c END @@ -45,4 +47,25 @@ cat myMakefile.old >> myMakefile.in test -f .deps/fred.Po || test -f _deps/fred.Po || exit 1 +$sleep + +cat > Makefile <<'END' +include myMakefile +END + +sed 's/^dnl: *//' configure.ac >t +mv -f t configure.ac + +$MAKE myMakefile Makefile + +rm -rf .deps _deps +./config.status + +test ! -e fred.c +echo 'int main (void) { return 0; }' > fred.c + +$MAKE +test -f .deps/fred.Po || test -f _deps/fred.Po || exit 1 +$MAKE distcheck + : diff --git a/t/extra-sources.sh b/t/extra-sources.sh index e3f15c8..8e204a5 100644 --- a/t/extra-sources.sh +++ b/t/extra-sources.sh @@ -21,7 +21,7 @@ echo AC_PROG_CC >> configure.ac -cat > Makefile.am << 'END' +cat > Makefile.am <<'END' bin_PROGRAMS = www www_SOURCES = www.c EXTRA_www_SOURCES = xtra.c @@ -31,6 +31,7 @@ END $ACLOCAL $AUTOMAKE -grep '@am__include@ .*/xtra\.P' Makefile.in +grep '@am__include@ .*/xtra\.Po' Makefile.in +grep '^am__depfiles_remade =.*/xtra.Po' Makefile.in : diff --git a/t/lex-depend-cxx.sh b/t/lex-depend-cxx.sh index 2abb101..eee2f5c 100644 --- a/t/lex-depend-cxx.sh +++ b/t/lex-depend-cxx.sh @@ -82,6 +82,11 @@ $AUTOCONF # using slow dependency extractors. ./configure --enable-dependency-tracking +# For debugging. +for f in $(find . -name '*.Po'); do + cat $f +done + $MAKE test-deps-exist $MAKE diff --git a/t/lex-depend-grep.sh b/t/lex-depend-grep.sh index 4a6473b..be9be29 100644 --- a/t/lex-depend-grep.sh +++ b/t/lex-depend-grep.sh @@ -40,7 +40,7 @@ $AUTOMAKE -a $EGREP '([mj]oe|_[01234]|include|\.P)' Makefile.in # For debugging. for x in joe moe _0 _1 _2 _3 _4; do - grep "include.*$x\.Po" Makefile.in + $EGREP '\$\(DEPDIR\)/'"$x"'\.Po( |$)' Makefile.in done : diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk index 9363ee3..5085780 100644 --- a/t/list-of-tests.mk +++ b/t/list-of-tests.mk @@ -41,7 +41,6 @@ t/java-nobase.sh \ t/objext-pr10128.sh \ t/remake-timing-bug-pr8365.sh \ t/lex-subobj-nodep.sh \ -t/subobj-indir-pr13928.sh \ t/subobj-vpath-pr13928.sh \ t/remake-am-pr10111.sh \ t/remake-m4-pr10111.sh \ @@ -391,6 +390,7 @@ t/depend3.sh \ t/depend4.sh \ t/depend5.sh \ t/depend6.sh \ +t/depend-postproc.sh \ t/deprecated-acinit.sh \ t/destdir.sh \ t/dir-named-obj-is-bad.sh \ @@ -866,7 +866,6 @@ t/posixsubst-programs.sh \ t/posixsubst-scripts.sh \ t/posixsubst-sources.sh \ t/posixsubst-tests.sh \ -t/postproc.sh \ t/ppf77.sh \ t/pr2.sh \ t/pr9.sh \ diff --git a/t/subobj-indir-pr13928.sh b/t/subobj-indir-pr13928.sh index 22cb7f5..3ccd037 100644 --- a/t/subobj-indir-pr13928.sh +++ b/t/subobj-indir-pr13928.sh @@ -38,7 +38,9 @@ END mkdir s echo 'int main(void) { return 0; }' > s/foo.c -$ACLOCAL && $AUTOCONF && $AUTOMAKE -a || fatal_ "autotools failed" +$ACLOCAL +$AUTOCONF +$AUTOMAKE -a ./configure $MAKE diff --git a/t/subobj11b.sh b/t/subobj11b.sh index 5ebb42a..613fa26 100644 --- a/t/subobj11b.sh +++ b/t/subobj11b.sh @@ -56,9 +56,9 @@ END $ACLOCAL $AUTOMAKE -a -# Be lax in the regexp, to account for automake conditionals, the -# use of @am__include@, and similar stuff. -grep 'include.*//.*foobar' Makefile.in && exit 1 +grep '\.P' Makefile.in # For debugging. + +grep '//.*foobar\.P' Makefile.in && exit 1 # These checks depend on automake internals, but presently this is # the only way to test the code path we are interested in. @@ -71,12 +71,12 @@ for x in zardoz0 zardoz1 path/to/zardoz2 another/path/to/zardoz3; do esac # Be a little lax in the regexp, to account for automake conditionals, # quoting, and similar stuff. - grep "^[^/]*am__include[^/]*//server/$d\\\$(DEPDIR)/$b\\.[^/]*$" Makefile.in + grep "[ ]//server/$d\\\$(DEPDIR)/$b\\.Po" Makefile.in done # Sanity checks. for i in 0 1 2 3 4 5 6 7 8 9; do - grep "am__include.*/foobar$i\\." Makefile.in + grep "\$(DEPDIR)/foobar$i\\.Po" Makefile.in done : diff --git a/t/subobj11c.sh b/t/subobj11c.sh index a80d760..f5e8340 100644 --- a/t/subobj11c.sh +++ b/t/subobj11c.sh @@ -43,6 +43,6 @@ $AUTOMAKE -a # # FIXME: Are we sure this is the most sensible output in our situation? # -grep '^[^/]*am__include[^/]*//\$(DEPDIR)/zardoz\.[^/]*$' Makefile.in +grep 'am__depfiles_remade =.* //\$(DEPDIR)/zardoz\.Po' Makefile.in : -- 2.1.3 From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 05 06:16:20 2015 Received: (at 13928) by debbugs.gnu.org; 5 Jan 2015 11:16:20 +0000 Received: from localhost ([127.0.0.1]:36986 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y85e0-0005VM-6x for submit@debbugs.gnu.org; Mon, 05 Jan 2015 06:16:20 -0500 Received: from mail-wg0-f51.google.com ([74.125.82.51]:61752) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y85ds-0005Um-3f for 13928@debbugs.gnu.org; Mon, 05 Jan 2015 06:16:13 -0500 Received: by mail-wg0-f51.google.com with SMTP id x12so27339447wgg.10 for <13928@debbugs.gnu.org>; Mon, 05 Jan 2015 03:16:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=k9oUdHGtGUkNZ96i5YjBLr2Mz4IX4d4y5cOF5Va2aec=; b=V/9Upub/hLae7lNSOtjzP9wtF4kOMx1VVCIJFXHtrw0LbkcqdaW1UbIsC2/TSNbo9Y R5Q73L1vtjTzJHTJ3Zm++WOA/VJ0xJ02Y1o+x28P/3K7iQJV0qBSRJ/lK5v//NloFpAS jL8qENB885BPyHci1cmXisn/QxofvTTdlThC+PrbsRo3B3StZuu29BeFe/+7sNyT64pQ hB5hBlvaXb8DxMb0raVAUZMxmCjVCFeUH4HwV7pLEnFWEb/WmB9l/ELkZPORp50Gb4Ue 5mC2e+TnabxFSK/J5h1DNvah5Ku48Me7eqVXJCrKWj9T/V4Kth6QmAYJ4JbsILK6n6jj 9pLA== X-Received: by 10.181.29.170 with SMTP id jx10mr24935266wid.50.1420456571600; Mon, 05 Jan 2015 03:16:11 -0800 (PST) Received: from localhost.localdomain (host151-101-dynamic.20-79-r.retail.telecomitalia.it. [79.20.101.151]) by mx.google.com with ESMTPSA id be4sm9482279wib.16.2015.01.05.03.16.10 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 05 Jan 2015 03:16:11 -0800 (PST) From: Stefano Lattarini To: automake-patches@gnu.org Subject: [PATCH 2/4] tests: fix some bugs in an XFAILing test Date: Mon, 5 Jan 2015 12:15:51 +0100 Message-Id: X-Mailer: git-send-email 2.1.3 In-Reply-To: References: In-Reply-To: References: X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 13928 Cc: 13928@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) * t/subobj-vpath-pr13928.sh: This one. The test would have failed (or hung!) even if the bug it was testing against were fixed. Signed-off-by: Stefano Lattarini --- t/subobj-vpath-pr13928.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/subobj-vpath-pr13928.sh b/t/subobj-vpath-pr13928.sh index 9c78d2e..8c3a6c5 100644 --- a/t/subobj-vpath-pr13928.sh +++ b/t/subobj-vpath-pr13928.sh @@ -33,7 +33,7 @@ AUTOMAKE_OPTIONS = subdir-objects noinst_PROGRAMS = test test_SOURCES = $(srcdir)/test.c test-objs: - test ! -f $(srcdir)/test.$(OBJEXT) + test ! -f '@srcdir@/test.$(OBJEXT)' test -f test.$(OBJEXT) END @@ -42,7 +42,7 @@ $ACLOCAL && $AUTOCONF && $AUTOMAKE -a || fatal_ "autotools failed" $EGREP 'test\.|DEPDIR|dirstamp|srcdir' Makefile.in || : # For debugging. $EGREP '\$.srcdir./test\.[o$]' Makefile.in && exit 1 $FGREP '$(srcdir)/$(am__dirstamp)' Makefile.in && exit 1 -$FGREP '$(srcdir)/$(DEPDIR)' && exit 1 +$FGREP '$(srcdir)/$(DEPDIR)' Makefile.in && exit 1 cat > test.c << 'END' int main (void) -- 2.1.3 From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 05 06:16:24 2015 Received: (at 13928) by debbugs.gnu.org; 5 Jan 2015 11:16:24 +0000 Received: from localhost ([127.0.0.1]:36988 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y85e0-0005VV-It for submit@debbugs.gnu.org; Mon, 05 Jan 2015 06:16:23 -0500 Received: from mail-wi0-f180.google.com ([209.85.212.180]:56616) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y85du-0005Uo-02 for 13928@debbugs.gnu.org; Mon, 05 Jan 2015 06:16:15 -0500 Received: by mail-wi0-f180.google.com with SMTP id n3so3016659wiv.7 for <13928@debbugs.gnu.org>; Mon, 05 Jan 2015 03:16:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=xwvP/hjQE6F5/t75Smc6rZeJRmysyhHg7o/snaezsU8=; b=moYd01C5r38qmaVrfDMjW8M7Kow2BqnK+yQ0TChHaaec9XqKpPntT/hBQFi11xdBDI OzGz4Cj5mwqKAsQw7KZ+OZaV2uSGJe7dZaxXKOc4dlQZOzTTIdp2eYi+cByCeYRHNZom aBQomTyXijYaQlK2MR36gA7ICPKjNyYbJm7OCUynrSZwgx1BaKR245daiM6x3RH4c4Rc H4fRa8rn9hTiP9bxWWLmJtWuccyTxEtV+qbfe2x/uFJ4+YXHnUSAu9wOiMtzbhs3N7Wo cSS+OUglxqIScyUZij6qkqNO4XOSCATdK5jgc68UpgJisBMt/aE1hIjpJgi/Bt2nrGD6 FJ8Q== X-Received: by 10.194.192.167 with SMTP id hh7mr138605887wjc.111.1420456573196; Mon, 05 Jan 2015 03:16:13 -0800 (PST) Received: from localhost.localdomain (host151-101-dynamic.20-79-r.retail.telecomitalia.it. [79.20.101.151]) by mx.google.com with ESMTPSA id be4sm9482279wib.16.2015.01.05.03.16.11 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 05 Jan 2015 03:16:12 -0800 (PST) From: Stefano Lattarini To: automake-patches@gnu.org Subject: [PATCH 3/4] compile: don't place built object files in $(srcdir), ever ... Date: Mon, 5 Jan 2015 12:15:52 +0100 Message-Id: <860d21b8854eb61dd79f37f1be564af7efa916c6.1420414665.git.stefano.lattarini@gmail.com> X-Mailer: git-send-email 2.1.3 In-Reply-To: References: In-Reply-To: References: X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 13928 Cc: 13928@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) ... even when a source file is specified as '$(srdir)/foo.c' or '$(top_srcdir)/bar.c'. And ditto for dependency-tracking makefile fragments (those under '.deps' directories). Such issues used to occur when the 'subdir-objects' option was given. This change should fix the second and last part of automake bug#13928. See also bug#16375 and bug#15293. * NEWS: Update. * bin/automake.in (handle_single_transform): Make sure object files and dependency-tracking makefile fragments coming from source like '$(srcdir)/foo.c' and '$(top_srcdir)/bar.c' are placed respectively under $(builddir) and $(top_builddir). * t/subobj-vpath-pr13928.sh: Enhance to expose even more aspects of the bug we've just fixed. * t/subobj-pr13928-more-langs.sh: New test, similar to the one above, but with non-C languages as well. * t/list-of-tests.mk (XFAIL_TESTS): Remove 'subobj-vpath-pr13928.sh', it's now supposed to pass. (handwritten_TESTS): Add 'subobj-pr13928-more-langs.sh'. Signed-off-by: Stefano Lattarini --- NEWS | 21 ++++++- bin/automake.in | 50 ++++++++++----- t/list-of-tests.mk | 2 +- t/subobj-pr13928-more-langs.sh | 138 +++++++++++++++++++++++++++++++++++++++++ t/subobj-vpath-pr13928.sh | 89 ++++++++++++++++++++++---- 5 files changed, 269 insertions(+), 31 deletions(-) create mode 100644 t/subobj-pr13928-more-langs.sh diff --git a/NEWS b/NEWS index a930049..eb3bc6f 100644 --- a/NEWS +++ b/NEWS @@ -67,8 +67,8 @@ New in 1.16: * Bugs fixed: - Automatic dependency tracking has been fixed to work also when the - subdir-object option is used and some 'foo_SOURCES' definition contains - unexpanded references to make variables, as in, e.g.: + 'subdir-object' option is used and some 'foo_SOURCES' definition + contains unexpanded references to make variables, as in, e.g.: a_src = sources/libs/aaa b_src = sources/bbb @@ -78,7 +78,7 @@ New in 1.16: tracking information will be correctly placed under the directories named 'sources/libs/aaa/.deps' and 'sources/bbb/.deps', rather than mistakenly under directories named (literally!) '$(src_a)/.deps' and - '$(src_b)/.deps' (this was automake bug#13928). + '$(src_b)/.deps' (this was the first part of automake bug#13928). Notice that in order to fix this bug we had to slightly change the semantics of how config.status bootstraps the makefile fragments @@ -88,6 +88,21 @@ New in 1.16: using a private target that is only meant to bootstrap the required makefile fragments. + - The 'subdir-object' option no longer causes object files corresponding + to source files specified with an explicit '$(srcdir)' component to be + placed in the source tree rather than in the build tree. + + For example, if Makefile.am contains: + + AUTOMAKE_OPTIONS = subdir-objects + foo_SOURCES = $(srcdir)/foo.c $(srcdir)/s/bar.c $(top_srcdir)/baz.c + + then "make all" will create 'foo.o' and 's/bar.o' in $(builddir) rather + than in $(srcdir), and will create 'baz.o' in $(top_builddir) rather + than in $(top_srcdir). + + This was the second part of automake bug#13928. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ New in 1.15: diff --git a/bin/automake.in b/bin/automake.in index f19be92..d8ecca5 100644 --- a/bin/automake.in +++ b/bin/automake.in @@ -1617,9 +1617,9 @@ sub handle_single_transform my $renamed = 0; my ($linker, $object); - # This records whether we've seen a derived source file (e.g. - # yacc output). - my $derived_source = 0; + # This records whether we've seen a derived source file (e.g., yacc + # or lex output). + my $derived_source; # This holds the 'aggregate context' of the file we are # currently examining. If the file is compiled with @@ -1667,17 +1667,36 @@ sub handle_single_transform # Now extract linker and other info. $linker = $lang->linker; - my $this_obj_ext; - if (defined $source_extension) - { - $this_obj_ext = $source_extension; - $derived_source = 1; - } - else - { - $this_obj_ext = $obj; - } - $object = $base . $this_obj_ext; + my $this_obj_ext; + if (defined $source_extension) + { + $this_obj_ext = $source_extension; + $derived_source = 1; + } + else + { + $this_obj_ext = $obj; + $derived_source = 0; + # Don't ever place built object files in $(srcdir), + # even when sources are specified explicitly as (say) + # '$(srcdir)/foo.c' or '$(top_srcdir)/foo.c'. + # See automake bug#13928. + my @d = split '/', $directory; + if (@d > 0 && option 'subdir-objects') + { + my $d = $d[0]; + if ($d eq '$(srcdir)' or $d eq '${srcdir}') + { + shift @d; + } + elsif ($d eq '$(top_srcdir)' or $d eq '${top_srcdir}') + { + $d[0] = '$(top_builddir)'; + } + $directory = join '/', @d; + } + } + $object = $base . $this_obj_ext; if ($have_per_exec_flags) { @@ -1710,8 +1729,7 @@ sub handle_single_transform $renamed = 1; } - # If rewrite said it was ok, put the object into a - # subdir. + # If rewrite said it was ok, put the object into a subdir. if ($directory ne '') { if ($r == LANG_SUBDIR) diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk index 5085780..ddf5fdf 100644 --- a/t/list-of-tests.mk +++ b/t/list-of-tests.mk @@ -41,7 +41,6 @@ t/java-nobase.sh \ t/objext-pr10128.sh \ t/remake-timing-bug-pr8365.sh \ t/lex-subobj-nodep.sh \ -t/subobj-vpath-pr13928.sh \ t/remake-am-pr10111.sh \ t/remake-m4-pr10111.sh \ $(perl_fake_XFAIL_TESTS) @@ -1063,6 +1062,7 @@ t/subobj-clean-pr10697.sh \ t/subobj-clean-lt-pr10697.sh \ t/subobj-indir-pr13928.sh \ t/subobj-vpath-pr13928.sh \ +t/subobj-pr13928-more-langs.sh \ t/subpkg.sh \ t/subpkg2.sh \ t/subpkg3.sh \ diff --git a/t/subobj-pr13928-more-langs.sh b/t/subobj-pr13928-more-langs.sh new file mode 100644 index 0000000..323e248 --- /dev/null +++ b/t/subobj-pr13928-more-langs.sh @@ -0,0 +1,138 @@ +#! /bin/sh +# Copyright (C) 2015 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 . + +# Expose part of automake bug#13928, also for non-C languages: if the +# subdir-objects option is in use and a source file is listed in a +# _SOURCES variable with a leading $(srcdir) component, Automake will +# generate a Makefile that tries to create the corresponding object +# file in $(srcdir) as well. + +required='cc c++ fortran77 fortran' +. test-init.sh + +cat >> configure.ac <<'END' +AC_PROG_CC +AC_PROG_CXX +AC_PROG_F77 +AC_PROG_FC +AM_CONDITIONAL([OBVIOUS], [:]) +AC_CONFIG_FILES([sub/Makefile]) +AC_OUTPUT +END + +cat > Makefile.am <<'END' +AUTOMAKE_OPTIONS = subdir-objects +SUBDIRS = sub + +LESS = m/o/r/e + +noinst_PROGRAMS = test test2 +test_SOURCES = $(srcdir)/test.f90 + +test2_SOURCES = $(indir) + +indir = ${indir2} $(empty) +indir2 = +if OBVIOUS +indir2 += ${srcdir}/$(LESS)///test.f +else +endif + +test-objs: + ls -la @srcdir@ . + : + test ! -f @srcdir@/test.$(OBJEXT) + test -f test.$(OBJEXT) + test ! -f @srcdir@/m/o/r/e/test.$(OBJEXT) + test -f m/o/r/e/test.$(OBJEXT) + : + test ! -f @srcdir@/bar.$(OBJEXT) + test -f bar.$(OBJEXT) + test ! -f @srcdir@/baz.$(OBJEXT) + test -f baz.$(OBJEXT) + : + test ! -d @srcdir@/$(DEPDIR) + test ! -d @srcdir@/m/o/r/e/$(DEPDIR) + test -d $(DEPDIR) + test -d m/o/r/e/$(DEPDIR) + +check-local: test-objs +END + +mkdir sub +cat > sub/Makefile.am <<'END' +AUTOMAKE_OPTIONS = subdir-objects +bin_PROGRAMS = foo +foo = baz +foo_SOURCES = foo.h \ + $(top_srcdir)/bar.cc \ + ${top_srcdir}/$(foo).c +END + + +$ACLOCAL +$AUTOCONF +$AUTOMAKE -a + +mkfiles='Makefile.in sub/Makefile.in' +$EGREP '(test|ba[rz])\.|DEPDIR|dirstamp|srcdir' $mkfiles # For debugging. +$EGREP '\$.(top_)?srcdir./(test|ba[rz]|\$.foo.)\.[o$]' $mkfiles && exit 1 +$FGREP '\$.(top_)?srcdir./.*$(am__dirstamp)' $mkfiles && exit 1 +$FGREP '\$.(top_)?srcdir./.*$(DEPDIR)' $mkfiles && exit 1 + +cat > test.f90 <<'EOF' + program foo + stop + end +EOF + +mkdir -p m/o/r/e +cp test.f90 m/o/r/e/test.f + +cat > sub/foo.h <<'END' +#ifdef __cplusplus +extern "C" +#endif +int foo (void); +END + +cat > bar.cc <<'END' +#include "foo.h" +#include +int main (void) +{ + std::cout << "OK!" << "\n"; + return foo (); +} +END + +cat > baz.c <<'END' +#include "foo.h" +int foo (void) +{ + return 0; +} +END + +mkdir build +cd build +../configure + +$MAKE +$MAKE test-objs +$MAKE distcheck + +: diff --git a/t/subobj-vpath-pr13928.sh b/t/subobj-vpath-pr13928.sh index 8c3a6c5..24eff1d 100644 --- a/t/subobj-vpath-pr13928.sh +++ b/t/subobj-vpath-pr13928.sh @@ -22,39 +22,106 @@ required=cc . test-init.sh -cat >> configure.ac << 'END' +cat >> configure.ac <<'END' AC_PROG_CC AM_PROG_CC_C_O +AM_CONDITIONAL([OBVIOUS], [:]) +AC_CONFIG_FILES([sub/Makefile]) AC_OUTPUT END cat > Makefile.am <<'END' AUTOMAKE_OPTIONS = subdir-objects -noinst_PROGRAMS = test +SUBDIRS = sub + +LESS = more + +noinst_PROGRAMS = test test2 test_SOURCES = $(srcdir)/test.c + +test2_SOURCES = $(indir) + +indir = +if OBVIOUS +indir += ${srcdir}/$(LESS)/test.c +else +endif + test-objs: - test ! -f '@srcdir@/test.$(OBJEXT)' + ls -la @srcdir@ . + : + test ! -f @srcdir@/test.$(OBJEXT) test -f test.$(OBJEXT) + test ! -f @srcdir@/more/test.$(OBJEXT) + test -f more/test.$(OBJEXT) + : + test ! -f @srcdir@/bar.$(OBJEXT) + test -f bar.$(OBJEXT) + test ! -f @srcdir@/baz.$(OBJEXT) + test -f baz.$(OBJEXT) + : + test ! -d @srcdir@/$(DEPDIR) + test ! -d @srcdir@/more/$(DEPDIR) + test -d $(DEPDIR) + test -d more/$(DEPDIR) + +check-local: test-objs +END + +mkdir sub +cat > sub/Makefile.am <<'END' +AUTOMAKE_OPTIONS = subdir-objects +bin_PROGRAMS = foo +foo_SOURCES = foo.h \ + $(top_srcdir)/bar.c \ + ${top_srcdir}/baz.c +END + + +$ACLOCAL +$AUTOCONF +$AUTOMAKE -a + +mkfiles='Makefile.in sub/Makefile.in' +$EGREP '(test|ba[rz])\.|DEPDIR|dirstamp|srcdir' $mkfiles # For debugging. +$EGREP '\$.(top_)?srcdir./(test|ba[rz])\.[o$]' $mkfiles && exit 1 +$FGREP '\$.(top_)?srcdir./.*$(am__dirstamp)' $mkfiles && exit 1 +$FGREP '\$.(top_)?srcdir./.*$(DEPDIR)' $mkfiles && exit 1 + +cat > test.c <<'END' +int main (void) +{ + return 0; +} END -$ACLOCAL && $AUTOCONF && $AUTOMAKE -a || fatal_ "autotools failed" +mkdir more +cp test.c more/test.c -$EGREP 'test\.|DEPDIR|dirstamp|srcdir' Makefile.in || : # For debugging. -$EGREP '\$.srcdir./test\.[o$]' Makefile.in && exit 1 -$FGREP '$(srcdir)/$(am__dirstamp)' Makefile.in && exit 1 -$FGREP '$(srcdir)/$(DEPDIR)' Makefile.in && exit 1 +echo 'int foo (void);' > sub/foo.h -cat > test.c << 'END' +cat > bar.c <<'END' +#include "foo.h" int main (void) { + return foo (); +} +END + +cat > baz.c <<'END' +#include "foo.h" +int foo (void) +{ return 0; } END -mkdir build && cd build || fatal "preparation of build directory failed" -../configure || fatal_ "./configure failed" +mkdir build +cd build +../configure $MAKE $MAKE test-objs +$MAKE distcheck : -- 2.1.3 From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 05 06:16:24 2015 Received: (at 13928) by debbugs.gnu.org; 5 Jan 2015 11:16:24 +0000 Received: from localhost ([127.0.0.1]:36990 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y85e4-0005Vk-5W for submit@debbugs.gnu.org; Mon, 05 Jan 2015 06:16:24 -0500 Received: from mail-wg0-f41.google.com ([74.125.82.41]:51510) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y85dv-0005V2-7M for 13928@debbugs.gnu.org; Mon, 05 Jan 2015 06:16:22 -0500 Received: by mail-wg0-f41.google.com with SMTP id l18so2031350wgh.28 for <13928@debbugs.gnu.org>; Mon, 05 Jan 2015 03:16:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=TauMJePE8JWbXvZ2WXvn9Jwzc4neiuqA6zl9Xh+YoBQ=; b=ctn4InCRksFDzZ57Zq7QlrnExmZ4Wz8TaIGIGs6rixpZKbx8F8c3f6Np5KE3CtNfKd xSnPQme75LDpiHA8SIR0bvjYgcTSv7uWEml1PfrNcHTvnJccqq3ZA3Ods/N534Bc+biq gPWXahICLhWkI4u8NGcgBitTUQ+TM4/wIpU+40S6b/siDpAVaIigA+uDEbb+VnMVY5Ft aMCRJDYqbpaCOF35nbMzhVbT/r7UZdc2Wzaz8/6XJDllFBC78bqS4OLrE8adwX19X3cV kX4dqwGspV4WiaDWXGkH1rqmI7v9NcMW+4kvhwwAuAZXO3gD3hTHi94q2EFh/ejZeU4f F7Ng== X-Received: by 10.194.189.138 with SMTP id gi10mr183377219wjc.86.1420456574696; Mon, 05 Jan 2015 03:16:14 -0800 (PST) Received: from localhost.localdomain (host151-101-dynamic.20-79-r.retail.telecomitalia.it. [79.20.101.151]) by mx.google.com with ESMTPSA id be4sm9482279wib.16.2015.01.05.03.16.13 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 05 Jan 2015 03:16:14 -0800 (PST) From: Stefano Lattarini To: automake-patches@gnu.org Subject: [PATCH 4/4] deps: fix corner-case "make distclean" bug Date: Mon, 5 Jan 2015 12:15:53 +0100 Message-Id: <0b371a43bf49516fef214b2d2a299c9f5edbb39f.1420414665.git.stefano.lattarini@gmail.com> X-Mailer: git-send-email 2.1.3 In-Reply-To: References: In-Reply-To: References: X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 13928 Cc: 13928@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Assume we have package satisfying the following conditions: (1) automatic dependency tracking is enabled; (2) the 'subdir-objects' Automake option is enabled; (3) the package uses a recursive make setup. Also assume that: (a) a subdir Makefile declares a foo_SOURCES variable containing a source file in the parent directory; (b) that parent Makefile declare a compiled program itself. Then BSD and Solaris make used to fail when running "make distclean", because the 'distclean' target of the subdir Makefile removed the whole '.deps' directory before the parent Makefile was done with the included '.Po' makefile fragments in that directory. This issue was revealed by failures in the 'subobj-vpath-pr13928.sh' test when those make implementations were used. We fix the issue by ensuring the 'distclean' target of any Makefile only removed the '.Po' makefile fragments included by it, rather than the whole '.deps' directory where such files resides. This change should be the last step in fixing automake bug#13928 for good. * bin/automake.in (handle_languages), lib/am/depend.am: Adjust to implement the new 'distclean' logic. * t/pr224.sh: Adjust to avoid a spurious failure. * PLANS/subdir-objects.txt: Update. Signed-off-by: Stefano Lattarini --- PLANS/subdir-objects.txt | 10 +++------- bin/automake.in | 20 ++++++++++---------- lib/am/depend.am | 7 ++++--- t/pr224.sh | 4 ++-- 4 files changed, 19 insertions(+), 22 deletions(-) diff --git a/PLANS/subdir-objects.txt b/PLANS/subdir-objects.txt index 3cf6101..c849e33 100644 --- a/PLANS/subdir-objects.txt +++ b/PLANS/subdir-objects.txt @@ -5,9 +5,6 @@ We want to make the behaviour currently enabled by the 'subdir-objects' the default one, and in fact the *only* one, in Automake 2.0. See automake bug#13378: . -Sadly, **THIS IS IMPOSSIBLE** until automake bug#13928 is resolved: -http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13928 - Details ------- @@ -53,11 +50,10 @@ We also make sure to avoid the warning when it would be irrelevant, i.e., if all source files sit in "current" directory (thanks to Peter Johansson for suggesting this). -For some automake 1.x (*before* 2.0 can be released) ----------------------------------------------------- +For automake 1.16 (*before* 2.0 can be released) +------------------------------------------------ -Find a proper way to fix the blocking automake bug#13928: -http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13928 +Submit the pending patch series that fixes http://debbugs.gnu.org/13928 For automake 2.0 ---------------- diff --git a/bin/automake.in b/bin/automake.in index d8ecca5..21cccbe 100644 --- a/bin/automake.in +++ b/bin/automake.in @@ -1242,14 +1242,16 @@ sub handle_languages () INTERNAL); define_variable ('am__maybe_remake_depfiles', 'depfiles', INTERNAL); define_variable ('am__depfiles_remade', "@dep_files", INTERNAL); - # Generate each 'include' directive individually. Several make - # implementations (IRIX 6, Solaris 10, FreeBSD 8) will fail to - # properly include several files resulting from a variable - # expansion. Just Generating many separate includes seems thus - # safest. $output_rules .= "\n"; + my @dist_rms; foreach my $depfile (@dep_files) { + push @dist_rms, "\t-rm -f $depfile"; + # Generate each 'include' directive individually. Several + # make implementations (IRIX 6, Solaris 10, FreeBSD 8) will + # fail to properly include several files resulting from a + # variable expansion. Just Generating many separate includes + # seems thus safest. $output_rules .= subst ('AMDEP_TRUE') . subst ('am__include') . " " . @@ -1262,11 +1264,9 @@ sub handle_languages () require_conf_file ("$am_file.am", FOREIGN, 'depcomp'); - # Compute the set of directories to remove in distclean-depend. - my @dep_dirs = uniq (map { dirname ($_) } @dep_files); - $output_rules .= file_contents ('depend', - new Automake::Location, - DEPDIRS => "@dep_dirs"); + $output_rules .= file_contents ( + 'depend', new Automake::Location, + 'DISTRMS' => join ("\n", @dist_rms)); } } else diff --git a/lib/am/depend.am b/lib/am/depend.am index 0b226b6..3813996 100644 --- a/lib/am/depend.am +++ b/lib/am/depend.am @@ -27,8 +27,9 @@ am--depfiles: $(am__depfiles_remade) ## erase them in -am or -recursive rules; that would prevent any other ## rules from being recursive (for instance multilib clean rules are ## recursive). +if %?DISTRMS% distclean: - -rm -rf %DEPDIRS% - + %DISTRMS% maintainer-clean: - -rm -rf %DEPDIRS% + %DISTRMS% +endif diff --git a/t/pr224.sh b/t/pr224.sh index fcea148..1961786 100644 --- a/t/pr224.sh +++ b/t/pr224.sh @@ -56,8 +56,8 @@ cd build ../configure $MAKE -test -d foo/.deps +test -f foo/.deps/main.Po $MAKE distclean -test -d foo/.deps && exit 1 +test ! -e foo/.deps/main.Po : -- 2.1.3 From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 05 06:16:28 2015 Received: (at control) by debbugs.gnu.org; 5 Jan 2015 11:16:28 +0000 Received: from localhost ([127.0.0.1]:36993 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y85e7-0005W5-Q1 for submit@debbugs.gnu.org; Mon, 05 Jan 2015 06:16:28 -0500 Received: from mail-wi0-f171.google.com ([209.85.212.171]:50057) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y85e5-0005Vx-S1 for control@debbugs.gnu.org; Mon, 05 Jan 2015 06:16:26 -0500 Received: by mail-wi0-f171.google.com with SMTP id bs8so3038797wib.4 for ; Mon, 05 Jan 2015 03:16:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:mime-version:to:subject:content-type :content-transfer-encoding; bh=e/q8mDzw2HA+iu8BNaLvLyinGY2o+oa0ylxaoYYhaCg=; b=FgEebxj3AxOjcJbT0pDw1G2YBnwPFKOwAFZHPgEJQ0Ih/hA2WL/faN5IzGK5yK1keh QV8z1ypvK+1MJpTca+SUWvSWY6KgpIarfP+SHfkWIFK6WyEcGlrO9+LYV6PLFGkp4bUK f3KyXC+WpZly5/9WReo5ifiEzOJlx2h298GIe3nEUpekjcaNDF0s4RrWyz/PTSaPEtDg G9jeE2mAn39jN222qkI444dbm1qLbBZRRTuw0k09cXcf346OKg4Mxi2+afHV41AigWpL HUWXSDgMznTXWvy0p+C7dHT0JfNBzF1G7l8mlBwI90Y7NFqgQ5i7Y0e8Fto2lWI3IkQu X1SA== X-Received: by 10.180.96.67 with SMTP id dq3mr24449942wib.51.1420456585325; Mon, 05 Jan 2015 03:16:25 -0800 (PST) Received: from [192.168.0.101] (host151-101-dynamic.20-79-r.retail.telecomitalia.it. [79.20.101.151]) by mx.google.com with ESMTPSA id n3sm9515727wiw.5.2015.01.05.03.16.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Jan 2015 03:16:24 -0800 (PST) Message-ID: <54AA7282.6010102@gmail.com> Date: Mon, 05 Jan 2015 12:16:18 +0100 From: Stefano Lattarini MIME-Version: 1.0 To: GNU bug tracker automated control server Subject: x Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) tags 13928 + patch stop From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 06 14:30:34 2015 Received: (at 13928) by debbugs.gnu.org; 6 Jan 2015 19:30:34 +0000 Received: from localhost ([127.0.0.1]:38912 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y8Zpp-0006Dq-LQ for submit@debbugs.gnu.org; Tue, 06 Jan 2015 14:30:34 -0500 Received: from mail-wi0-f172.google.com ([209.85.212.172]:60986) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y8Zpj-0006Da-RH; Tue, 06 Jan 2015 14:30:28 -0500 Received: by mail-wi0-f172.google.com with SMTP id n3so6032607wiv.5; Tue, 06 Jan 2015 11:30:27 -0800 (PST) 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=LJAvst0yAYBhtScejIxNZWRjWIpG1uiRGNqB/OlQ35M=; b=D3KCehe0LmxvMuyZGxbY8UgXI7mLORd214W3qpaoN52JBxUTW6s9XeUN8PmupUYNUO vBdZXXaZBWLQGPEFl2uk9mbaFtxatiho8iocGXRIrr7BjBUJsZ8xSQHOQVwdQEio86Je R0UgbczCppE1vtJJEpL+pMPtnLpsx6GWAU1AG0HMCLNx1IvgO6uzVUWQbJan2lEAEXIp 2Tp2wx6DSDEQankIc/3VeVtAUjT1IlOWJN75+DRK9KFSa1q2bgrB6Ob+S7ij1RvE+baw jsPFTBcCDm5PWKVmVaaq/t1X66+22IaPsdZp66Ry5lXSuv0zrulOLt7aJBIrDBah+USw Ku0A== X-Received: by 10.180.107.195 with SMTP id he3mr40777512wib.44.1420572627228; Tue, 06 Jan 2015 11:30:27 -0800 (PST) Received: from [192.168.0.104] (host151-101-dynamic.20-79-r.retail.telecomitalia.it. [79.20.101.151]) by mx.google.com with ESMTPSA id kn7sm73645460wjc.45.2015.01.06.11.30.24 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Jan 2015 11:30:26 -0800 (PST) Message-ID: <54AC37C4.3050304@gmail.com> Date: Tue, 06 Jan 2015 20:30:12 +0100 From: Stefano Lattarini MIME-Version: 1.0 To: 13928@debbugs.gnu.org Subject: Closing automake bug#13928 (bad interactions between 'subdir-object' option and automatic dependency tracking) References: <513E44AC.6040705@gmail.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 13928 Cc: Nick Bowler , Shawn Webb , Eric Blake , Diab Jerius , Bob Friesenhahn , Miles Bader , Oleg Latin , Bert Wesarg X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) close 13928 thanks Reference: I've merged the latest patch series: into the 'minor' and 'master' branches, and the testsuite appears to be happy (or at least no more unhappy than before) on the following systems (in addition to GNU/Linux): - Solaris 10 - NetBSD 5.1 - FreeBSD 8.0 - AIX 7.1 I'm thus optimistically declaring victory on this long-standing issue. Hopefully I'll be able to release a new Automake minor version (1.16) containing this fix in the coming month or so. If in the meantime anyone feels patient enough to test the unreleased Automake from the 'minor' branch on real-world projects which were being bitten by the bug, I would be very grateful. Thanks, Stefano From unknown Sat Jun 21 03:30:37 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, 04 Feb 2015 12:24:06 +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