From unknown Mon Aug 18 00:08:59 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#9546 <9546@debbugs.gnu.org> To: bug#9546 <9546@debbugs.gnu.org> Subject: Status: parallel-tests: auxiliary script `test-driver' is not distributed when TESTS is defined in a subdir Makefile (regression in branch test-protocols) Reply-To: bug#9546 <9546@debbugs.gnu.org> Date: Mon, 18 Aug 2025 07:08:59 +0000 retitle 9546 parallel-tests: auxiliary script `test-driver' is not distribu= ted when TESTS is defined in a subdir Makefile (regression in branch test-p= rotocols) reassign 9546 automake submitter 9546 Stefano Lattarini severity 9546 serious tag 9546 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 18 14:37:04 2011 Received: (at submit) by debbugs.gnu.org; 18 Sep 2011 18:37:04 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R5MEi-0004pA-4t for submit@debbugs.gnu.org; Sun, 18 Sep 2011 14:37:04 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R5MEg-0004p2-2x for submit@debbugs.gnu.org; Sun, 18 Sep 2011 14:37:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R5M9r-0002bK-79 for submit@debbugs.gnu.org; Sun, 18 Sep 2011 14:32:05 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:45217) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5M9r-0002bG-5d for submit@debbugs.gnu.org; Sun, 18 Sep 2011 14:32:03 -0400 Received: from eggs.gnu.org ([140.186.70.92]:45459) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5M9q-00048O-58 for bug-automake@gnu.org; Sun, 18 Sep 2011 14:32:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R5M9o-0002aX-CT for bug-automake@gnu.org; Sun, 18 Sep 2011 14:32:02 -0400 Received: from mail-wy0-f177.google.com ([74.125.82.177]:41932) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5M9o-0002aM-4d for bug-automake@gnu.org; Sun, 18 Sep 2011 14:32:00 -0400 Received: by wyh11 with SMTP id 11so5321938wyh.36 for ; Sun, 18 Sep 2011 11:31:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:mime-version:content-type :message-id; bh=6rbZgC2PQNUtmVmPoJGwSWPnWpmv6pcDZTT+VBPpmbQ=; b=gz7xBFW3QWu1QfrOG/7TCAy/PD5f2eAFpuc25JpRgIBDc5QkoPdKiWx3M7R6Ujy6mh 1OSFMVXEyVDhWuTcWeJ6X87ch0CmOUL+n2HuY3Y5akFEPOCSbyu9NCXwyGLkaswP/ESF 81GYIC3HuALcZxlC0dgR1yTOl9TAYeOQKm5qA= Received: by 10.227.9.219 with SMTP id m27mr1838977wbm.61.1316370621049; Sun, 18 Sep 2011 11:30:21 -0700 (PDT) Received: from bigio.localnet (host170-30-dynamic.60-82-r.retail.telecomitalia.it. [82.60.30.170]) by mx.google.com with ESMTPS id h20sm16784443wbo.22.2011.09.18.11.30.18 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 18 Sep 2011 11:30:20 -0700 (PDT) From: Stefano Lattarini To: bug-automake@gnu.org Subject: parallel-tests: auxiliary script `test-driver' is not distributed when TESTS is defined in a subdir Makefile (regression in branch test-protocols) Date: Sun, 18 Sep 2011 20:30:04 +0200 User-Agent: KMail/1.13.7 (Linux/2.6.30-2-686; KDE/4.6.5; i686; ; ) MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_tijdOW9YlB6x9yq" Message-Id: <201109182030.05107.stefano.lattarini@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.2 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -5.2 (-----) --Boundary-00=_tijdOW9YlB6x9yq Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Severity: serious The bug is demonstrated by the attached test script. I hope I'll be able to take a look into it soonish. Regards, Stefano --Boundary-00=_tijdOW9YlB6x9yq Content-Type: application/x-shellscript; name="test-driver-is-distributed.test" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="test-driver-is-distributed.test" #! /bin/sh # Copyright (C) 2011 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 . # Check regression of parallel-tests: # - `test-driver' script not correctly distributed when TESTS is # defined in a subdir Makefile parallel_tests=yes . ./defs || Exit 1 cat >> configure.in << 'END' AC_CONFIG_FILES([tests/Makefile]) AC_OUTPUT END mkdir tests cat > Makefile.am << 'END' SUBDIRS = tests test0: echo ' ' $(DIST_COMMON) ' ' | grep '[ /]test-driver ' test1: distdir ls -l $(distdir) $(distdir)/* ;: For debugging. test -f $(distdir)/test-driver .PHONY: test0 test1 END cat > tests/Makefile.am << 'END' TESTS = foo.test END cat > foo.test << 'END' #!/bin/sh exit 0 END $ACLOCAL $AUTOCONF $AUTOMAKE -a ./configure $MAKE test0 test1 $MAKE distcheck : --Boundary-00=_tijdOW9YlB6x9yq-- From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 18 14:51:15 2011 Received: (at submit) by debbugs.gnu.org; 18 Sep 2011 18:51:15 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R5MSO-0005xY-Dc for submit@debbugs.gnu.org; Sun, 18 Sep 2011 14:51:14 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R5MSG-0005xF-AP for submit@debbugs.gnu.org; Sun, 18 Sep 2011 14:51:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R5MNS-0005Mt-3i for submit@debbugs.gnu.org; Sun, 18 Sep 2011 14:46:07 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:41315) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5MNS-0005Mk-28 for submit@debbugs.gnu.org; Sun, 18 Sep 2011 14:46:06 -0400 Received: from eggs.gnu.org ([140.186.70.92]:60472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5MNQ-0005HW-Gt for bug-automake@gnu.org; Sun, 18 Sep 2011 14:46:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R5MNO-0005MX-Ig for bug-automake@gnu.org; Sun, 18 Sep 2011 14:46:04 -0400 Received: from mail-wy0-f177.google.com ([74.125.82.177]:53483) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5MNO-0005MT-8w; Sun, 18 Sep 2011 14:46:02 -0400 Received: by wyh11 with SMTP id 11so5329260wyh.36 for ; Sun, 18 Sep 2011 11:46:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:message-id; bh=NMAm0L37FheVU8TkrSKtpz/5NWEWLgiTRGqBYYUfgdA=; b=MW4TT8Sw07P63zR7NCGHNHfIAuDJnr5bUeBYMQmSJxarXETHF8hohr025z3a5kGs4i EsUaO0Os9ttYO6J4BWDbBbF3DNbcOYr2jITnO26+g3s/D7KPz43zvjWPa1cKOB7r4/f4 VHgZzyf2b1Swm6quvgtAFRmIpdWAUQECVsgSg= Received: by 10.227.10.67 with SMTP id o3mr1748944wbo.113.1316371561264; Sun, 18 Sep 2011 11:46:01 -0700 (PDT) Received: from bigio.localnet (host170-30-dynamic.60-82-r.retail.telecomitalia.it. [82.60.30.170]) by mx.google.com with ESMTPS id y28sm22422960wbn.17.2011.09.18.11.45.58 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 18 Sep 2011 11:46:00 -0700 (PDT) From: Stefano Lattarini To: bug-automake@gnu.org Subject: Re: bug#9546: parallel-tests: auxiliary script `test-driver' is not distributed when TESTS is defined in a subdir Makefile (regression in branch test-protocols) Date: Sun, 18 Sep 2011 20:45:37 +0200 User-Agent: KMail/1.13.7 (Linux/2.6.30-2-686; KDE/4.6.5; i686; ; ) References: <201109182030.05107.stefano.lattarini@gmail.com> In-Reply-To: <201109182030.05107.stefano.lattarini@gmail.com> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_SxjdOIQspxhByvv" Message-Id: <201109182045.38369.stefano.lattarini@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.2 (-----) X-Debbugs-Envelope-To: submit Cc: 9546@debbugs.gnu.org, automake-patches@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -5.2 (-----) --Boundary-00=_SxjdOIQspxhByvv Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit On Sunday 18 September 2011, Stefano Lattarini wrote: > Severity: serious > > The bug is demonstrated by the attached test script. > I hope I'll be able to take a look into it soonish. > The test script has a couple of bugs, which I've now fixed. Attached is the patch I've pushed to expose the bug. Note that the following squash-in is enough to cause the test to pass: diff --git a/tests/test-driver-is-distributed.test b/tests/test-driver-is-distributed.test index 09ea45a..4bb03d7 100755 --- a/tests/test-driver-is-distributed.test +++ b/tests/test-driver-is-distributed.test @@ -29,6 +29,7 @@ END mkdir tests cat > Makefile.am << 'END' +TESTS= SUBDIRS = tests test0: echo ' ' $(DIST_COMMON) ' ' | grep '[ /]test-driver ' Regards, Stefano --Boundary-00=_SxjdOIQspxhByvv Content-Type: text/x-patch; charset="utf-8"; name="0001-parallel-tests-expose-automake-bug-9546.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="0001-parallel-tests-expose-automake-bug-9546.patch" =46rom f15d31661ef94e5d549dbdfb0f60cea1bc17683a Mon Sep 17 00:00:00 2001 Message-Id: =46rom: Stefano Lattarini Date: Sun, 18 Sep 2011 20:42:56 +0200 Subject: [PATCH] parallel-tests: expose automake bug#9546 * tests/test-driver-is-distributed.test: New test. * tests/Makefile.am (TESTS, XFAIL_TESTS): Add it. =2D-- ChangeLog | 6 +++ tests/Makefile.am | 2 + tests/Makefile.in | 4 ++- tests/test-driver-is-distributed.test | 59 +++++++++++++++++++++++++++++= ++++ 4 files changed, 70 insertions(+), 1 deletions(-) create mode 100755 tests/test-driver-is-distributed.test diff --git a/ChangeLog b/ChangeLog index 8024777..856c92f 100644 =2D-- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-09-18 Stefano Lattarini + + parallel-tests: expose automake bug#9546 + * tests/test-driver-is-distributed.test: New test. + * tests/Makefile.am (TESTS, XFAIL_TESTS): Add it. + 2011-09-16 Stefano Lattarini =20 automake: remove special handling of `ANSI2KNR' make variable diff --git a/tests/Makefile.am b/tests/Makefile.am index c2b19ca..2e7e17f 100644 =2D-- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -33,6 +33,7 @@ java-nobase.test \ pr8365-remake-timing.test \ yacc-dist-nobuild-subdir.test \ vala-vpath.test \ +test-driver-is-distributed.test \ txinfo5.test =20 =20 @@ -773,6 +774,7 @@ test-driver-create-log-dir.test \ test-driver-strip-vpath.test \ test-driver-trs-suffix-registered.test \ test-driver-fail.test \ +test-driver-is-distributed.test \ test-harness-vpath-rewrite.test \ test-log.test \ test-metadata-global-log.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index f118c87..8248330 100644 =2D-- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -290,7 +290,8 @@ EXTRA_DIST =3D ChangeLog-old gen-parallel-tests instspc= =2Dtests.sh \ XFAIL_TESTS =3D all.test auxdir2.test cond17.test gcj6.test \ override-conditional-2.test java-nobase.test \ pr8365-remake-timing.test yacc-dist-nobuild-subdir.test \ =2D vala-vpath.test txinfo5.test $(instspc_xfail_tests) + vala-vpath.test test-driver-is-distributed.test txinfo5.test \ + $(instspc_xfail_tests) parallel_tests =3D check-concurrency-bug9245-p.test \ check-exported-srcdir-p.test check-fd-redirect-p.test \ check-tests-in-builddir-p.test check-p.test check11-p.test \ @@ -1031,6 +1032,7 @@ test-driver-create-log-dir.test \ test-driver-strip-vpath.test \ test-driver-trs-suffix-registered.test \ test-driver-fail.test \ +test-driver-is-distributed.test \ test-harness-vpath-rewrite.test \ test-log.test \ test-metadata-global-log.test \ diff --git a/tests/test-driver-is-distributed.test b/tests/test-driver-is-d= istributed.test new file mode 100755 index 0000000..09ea45a =2D-- /dev/null +++ b/tests/test-driver-is-distributed.test @@ -0,0 +1,59 @@ +#! /bin/sh +# Copyright (C) 2011 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 . + +# Check regression of parallel-tests: +# - `test-driver' script not correctly distributed when TESTS is +# defined in a subdir Makefile + +parallel_tests=3Dyes +. ./defs || Exit 1 + +cat >> configure.in << 'END' +AC_CONFIG_FILES([tests/Makefile]) +AC_OUTPUT +END + +mkdir tests + +cat > Makefile.am << 'END' +SUBDIRS =3D tests +test0: + echo ' ' $(DIST_COMMON) ' ' | grep '[ /]test-driver ' +test1: distdir + ls -l $(distdir) $(distdir)/* ;: For debugging. + test -f $(distdir)/test-driver +.PHONY: test0 test1 +END + +cat > tests/Makefile.am << 'END' +TESTS =3D foo.test +EXTRA_DIST =3D $(TESTS) +END + +cat > tests/foo.test << 'END' +#!/bin/sh +exit 0 +END +chmod a+x tests/foo.test + +$ACLOCAL +$AUTOCONF +$AUTOMAKE -a +./configure +$MAKE test0 test1 +$MAKE distcheck + +: =2D-=20 1.7.2.3 --Boundary-00=_SxjdOIQspxhByvv-- From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 01 16:26:54 2011 Received: (at 9546) by debbugs.gnu.org; 1 Oct 2011 20:26:54 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RA697-0000Sz-Hv for submit@debbugs.gnu.org; Sat, 01 Oct 2011 16:26:54 -0400 Received: from mail-bw0-f44.google.com ([209.85.214.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RA692-0000Sn-V1 for 9546@debbugs.gnu.org; Sat, 01 Oct 2011 16:26:51 -0400 Received: by bkaq10 with SMTP id q10so3341163bka.3 for <9546@debbugs.gnu.org>; Sat, 01 Oct 2011 13:25:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:message-id; bh=C49VbOIf2apWDsDiKRBYOqLwQboeuujxGRWlMM/gl4Q=; b=wf5bhaAxZT7aabue4VexjoCPRXcg9wVI5LJLH4D129nHdTw4jyr9FS7bUOvuerG1et yuM/ALh/pNLo1NHVlIZZFkPgastyaFBuqc6nuOtWouPtDvtlziSLAHjBtpe3B9+zCHVJ lK+9xVhstwydydD+6HWr/BhDhq6Tv520VPAJI= Received: by 10.223.95.139 with SMTP id d11mr10164151fan.117.1317500734573; Sat, 01 Oct 2011 13:25:34 -0700 (PDT) Received: from bigio.localnet (host164-36-dynamic.60-82-r.retail.telecomitalia.it. [82.60.36.164]) by mx.google.com with ESMTPS id w6sm13129719fah.0.2011.10.01.13.25.31 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 01 Oct 2011 13:25:32 -0700 (PDT) From: Stefano Lattarini To: bug-automake@gnu.org Subject: Re: bug#9546: parallel-tests: auxiliary script `test-driver' is not distributed when TESTS is defined in a subdir Makefile (regression in branch test-protocols) Date: Sat, 1 Oct 2011 22:25:22 +0200 User-Agent: KMail/1.13.7 (Linux/2.6.30-2-686; KDE/4.6.5; i686; ; ) References: <201109182030.05107.stefano.lattarini@gmail.com> <201109182045.38369.stefano.lattarini@gmail.com> In-Reply-To: <201109182045.38369.stefano.lattarini@gmail.com> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_zc3hOGz/fD8rd7L" Message-Id: <201110012225.23763.stefano.lattarini@gmail.com> X-Spam-Score: -3.9 (---) X-Debbugs-Envelope-To: 9546 Cc: 9546@debbugs.gnu.org, automake-patches@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -3.9 (---) --Boundary-00=_zc3hOGz/fD8rd7L Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit On Sunday 18 September 2011, Stefano Lattarini wrote: > On Sunday 18 September 2011, Stefano Lattarini wrote: > > Severity: serious > > > > The bug is demonstrated by the attached test script. > > I hope I'll be able to take a look into it soonish. > > > The test script has a couple of bugs, which I've now fixed. Attached > is the patch I've pushed to expose the bug. > OK, I've a patch that fixes the bug (see attachment). But wait to rejoice, since the patch also introduces new failures when "threaded automake" is in use (AUTOMAKE_JOBS > 1). The reason is that automake needs to serialize file installions spawned by `--add-missing' (and if I understand correctly, this isn't for cosmetic reasons, but is needed to avoid possible race conditions and botched output files). Currently the code that installs required files is intertwined with the code that declares the DIST_COMMON variables; so, upon deserialization, the definition of DIST_COMMON gets emitted in the wrong Makefile.in (ouch!). I hope I'll have time and patience to look into this soonish; anyway, suggestions on how to minimally fix the new problem would be very welcome (the best & long-term fix would probably entail a quite heavy refactoring of automake, which, altough defintely desirable, would require a lot of time and testing ... so not going to happen soon, sigh). Regards, Stefano --Boundary-00=_zc3hOGz/fD8rd7L Content-Type: text/x-patch; charset="utf-8"; name="0001-dist-auxiliary-files-can-be-distributed-from-subdir-.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="0001-dist-auxiliary-files-can-be-distributed-from-subdir-.patch" =46rom 640dc492560940aa7487f6879ff359c649e579d5 Mon Sep 17 00:00:00 2001 Message-Id: <640dc492560940aa7487f6879ff359c649e579d5.1317500439.git.stefan= o.lattarini@gmail.com> =46rom: Stefano Lattarini Date: Fri, 30 Sep 2011 12:12:43 +0200 Subject: [PATCH] dist: auxiliary files can be distributed from subdir Makef= iles =2D-- ChangeLog | 35 ++++++++ Makefile.in | 7 +- automake.in | 11 +++ doc/Makefile.in | 3 +- lib/Automake/Makefile.in | 2 +- lib/Automake/tests/Makefile.in | 3 +- lib/am/Makefile.in | 2 +- lib/am/distdir.am | 1 + m4/Makefile.in | 3 +- tests/Makefile.am | 5 +- tests/Makefile.in | 10 ++- tests/dist-auxdir-many-subdirs.test | 142 +++++++++++++++++++++++++++++= ++++ tests/dist-readonly.test | 60 ++++++++++++++ tests/dist-repeated.test | 102 +++++++++++++++++++++++ tests/distcom-subdir.test | 72 +++++++++++++++++ tests/java-compile-run-nested.test | 2 +- tests/test-driver-is-distributed.test | 44 +++++++++- 17 files changed, 487 insertions(+), 17 deletions(-) create mode 100755 tests/dist-auxdir-many-subdirs.test create mode 100755 tests/dist-readonly.test create mode 100755 tests/dist-repeated.test create mode 100755 tests/distcom-subdir.test diff --git a/ChangeLog b/ChangeLog index 7a78db6..a30326c 100644 =2D-- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,38 @@ +2011-09-30 Stefano Lattarini + + dist: auxiliary files can be distributed from subdir Makefiles + With this change, we make it possible for subdir Makefile.am + files to distribute files in the config auxdir; while this means + that some files might be copied multiple times, it simplify some + logic in the automake script, and fix at least one important bug. + In fact, before this change, the auxiliary script `test-driver' + was not being distributed as expected when TESTS was defined only + in a subdir Makefile (which is a pretty common setups indeed). + Now this does not happen anymore: so this change fixes automake + bug#9546. + *** FIXME *** however, this changes breaks "threaded automake"; + *** FIXME *** this is due to the fact that queue_required_conf_file + *** FIXME *** relies on the internals of require_file_internal and + *** FIXME *** maybe_push_required_file, in that it exploits the + *** FIXME *** fact that only the contents of the last handled + *** FIXME *** output file may be impacted (which in turn is dealt + *** FIXME *** with by the master thread) -- but this fact is not + *** FIXME *** true anymore after the present change ... + * automake.in (maybe_push_required_file): Add ad-hoc handling for + the case where the directory part of the required file is different + from the subdir where the current Makefile.am resides, but is equal + to the "config-aux directory" ($config_auxdir). This is needed to + allow a construct in a non-top-level Makefile.am to require a file + in the config-aux directory. + * tests/test-driver-is-distributed.test: Extend and adjust. This + test now passes. + * tests/java-compile-run-nested.test: Likewise. + * tests/distcom-subdir.test: New test. + * tests/dist-readonly.test: Likewise. + * tests/dist-repeated.test: Likewise. + * tests/dist-auxdir-many-subdirs.test: Likewise. + * tests/Makefile.am (TESTS, XFAIL_TESTS): Update. + 2011-09-28 Stefano Lattarini =20 tap/awk: improve comments about Korn shell signal handling issues diff --git a/Makefile.in b/Makefile.in index 6e03d9d..ead365d 100644 =2D-- a/Makefile.in +++ b/Makefile.in @@ -52,8 +52,11 @@ POST_UNINSTALL =3D : build_triplet =3D @build@ subdir =3D . DIST_COMMON =3D README $(am__configure_deps) $(srcdir)/Makefile.am \ =2D $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ =2D ChangeLog INSTALL NEWS THANKS TODO + $(srcdir)/Makefile.in $(top_srcdir)/configure \ + $(top_srcdir)/lib/config.guess $(top_srcdir)/lib/config.sub \ + $(top_srcdir)/lib/install-sh $(top_srcdir)/lib/missing \ + $(top_srcdir)/lib/mkinstalldirs AUTHORS COPYING ChangeLog \ + INSTALL NEWS THANKS TODO ACLOCAL_M4 =3D $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps =3D $(top_srcdir)/m4/amversion.m4 \ $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/init.m4 \ diff --git a/automake.in b/automake.in index 91ae825..9efc87b 100644 =2D-- a/automake.in +++ b/automake.in @@ -7588,6 +7588,17 @@ sub maybe_push_required_file push_dist_common ($file); return 1; } + # This is needed to allow a construct in a non-top-level Makefile.am + # to require a file in the build-aux directory (see at least the test + # script `test-driver-is-distributed.test'). This is related to the + # automake bug#9546. Note that the use of $config_aux_dir instead + # of $am_config_aux_dir here is deliberate and necessary. + elsif ($dir eq $config_aux_dir) + { + # FIXME: this breaks serialization of threaded automake :-( + push_dist_common ("$am_config_aux_dir/$file"); + return 1; + } elsif ($relative_dir eq '.' && ! &is_make_dir ($dir)) { # If we are doing the topmost directory, and the file is in a diff --git a/doc/Makefile.in b/doc/Makefile.in index b0d06f2..ab3e552 100644 =2D-- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -52,7 +52,8 @@ subdir =3D doc DIST_COMMON =3D $(automake_TEXINFOS) $(dist_doc_DATA) $(dist_man1_MANS) \ $(dist_noinst_DATA) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/stamp-vti \ =2D $(srcdir)/version.texi + $(srcdir)/version.texi $(top_srcdir)/lib/mdate-sh \ + $(top_srcdir)/lib/mkinstalldirs $(top_srcdir)/lib/texinfo.tex ACLOCAL_M4 =3D $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps =3D $(top_srcdir)/m4/amversion.m4 \ $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/init.m4 \ diff --git a/lib/Automake/Makefile.in b/lib/Automake/Makefile.in index 2ea1a18..b83778b 100644 =2D-- a/lib/Automake/Makefile.in +++ b/lib/Automake/Makefile.in @@ -51,7 +51,7 @@ POST_UNINSTALL =3D : build_triplet =3D @build@ subdir =3D lib/Automake DIST_COMMON =3D $(dist_perllib_DATA) $(srcdir)/Makefile.am \ =2D $(srcdir)/Makefile.in + $(srcdir)/Makefile.in $(top_srcdir)/lib/mkinstalldirs ACLOCAL_M4 =3D $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps =3D $(top_srcdir)/m4/amversion.m4 \ $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/init.m4 \ diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in index 3e5def5..ead6233 100644 =2D-- a/lib/Automake/tests/Makefile.in +++ b/lib/Automake/tests/Makefile.in @@ -48,7 +48,8 @@ PRE_UNINSTALL =3D : POST_UNINSTALL =3D : build_triplet =3D @build@ subdir =3D lib/Automake/tests =2DDIST_COMMON =3D $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON =3D $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/lib/mkinstalldirs $(top_srcdir)/lib/test-driver ACLOCAL_M4 =3D $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps =3D $(top_srcdir)/m4/amversion.m4 \ $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/init.m4 \ diff --git a/lib/am/Makefile.in b/lib/am/Makefile.in index 53ce53d..050806a 100644 =2D-- a/lib/am/Makefile.in +++ b/lib/am/Makefile.in @@ -51,7 +51,7 @@ POST_UNINSTALL =3D : build_triplet =3D @build@ subdir =3D lib/am DIST_COMMON =3D $(dist_am_DATA) $(srcdir)/Makefile.am \ =2D $(srcdir)/Makefile.in + $(srcdir)/Makefile.in $(top_srcdir)/lib/mkinstalldirs ACLOCAL_M4 =3D $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps =3D $(top_srcdir)/m4/amversion.m4 \ $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/init.m4 \ diff --git a/lib/am/distdir.am b/lib/am/distdir.am index 29f2d7f..5d62dfe 100644 =2D-- a/lib/am/distdir.am +++ b/lib/am/distdir.am @@ -216,6 +216,7 @@ endif %?TOPDIR_P% ## Test for file existence because sometimes a file gets included in ## DISTFILES twice. For example this happens when a single source ## file is used in building more than one program. +## See also test `dist-repeated.test'. test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ diff --git a/m4/Makefile.in b/m4/Makefile.in index 8bc9b70..66ca138 100644 =2D-- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -51,7 +51,8 @@ POST_UNINSTALL =3D : build_triplet =3D @build@ subdir =3D m4 DIST_COMMON =3D $(dist_automake_ac_DATA) $(dist_system_ac_DATA) \ =2D $(srcdir)/Makefile.am $(srcdir)/Makefile.in + $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/lib/mkinstalldirs ACLOCAL_M4 =3D $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps =3D $(top_srcdir)/m4/amversion.m4 \ $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/init.m4 \ diff --git a/tests/Makefile.am b/tests/Makefile.am index 748c6ed..261f33b 100644 =2D-- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -33,7 +33,6 @@ java-nobase.test \ pr8365-remake-timing.test \ yacc-dist-nobuild-subdir.test \ vala-vpath.test \ =2Dtest-driver-is-distributed.test \ txinfo5.test =20 =20 @@ -401,6 +400,9 @@ dirlist.test \ dirlist2.test \ discover.test \ dist-included-parent-dir.test \ +dist-readonly.test \ +dist-repeated.test \ +dist-auxdir-many-subdirs.test \ distcleancheck.test \ distcom2.test \ distcom3.test \ @@ -408,6 +410,7 @@ distcom4.test \ distcom5.test \ distcom6.test \ distcom7.test \ +distcom-subdir.test \ distdir.test \ distlinks.test \ distlinksbrk.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 90160d2..7cfadc6 100644 =2D-- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -51,7 +51,8 @@ build_triplet =3D @build@ DIST_COMMON =3D README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/aclocal.in $(srcdir)/automake.in $(srcdir)/defs \ $(srcdir)/defs-static.in $(srcdir)/instspc-tests.am \ =2D $(srcdir)/parallel-tests.am + $(srcdir)/parallel-tests.am $(top_srcdir)/lib/mkinstalldirs \ + $(top_srcdir)/lib/test-driver subdir =3D tests ACLOCAL_M4 =3D $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps =3D $(top_srcdir)/m4/amversion.m4 \ @@ -296,8 +297,7 @@ EXTRA_DIST =3D ChangeLog-old gen-parallel-tests instspc= =2Dtests.sh \ XFAIL_TESTS =3D all.test auxdir2.test cond17.test gcj6.test \ override-conditional-2.test java-nobase.test \ pr8365-remake-timing.test yacc-dist-nobuild-subdir.test \ =2D vala-vpath.test test-driver-is-distributed.test txinfo5.test \ =2D $(instspc_xfail_tests) + vala-vpath.test txinfo5.test $(instspc_xfail_tests) parallel_tests =3D check-concurrency-bug9245-p.test \ check-exported-srcdir-p.test check-fd-redirect-p.test \ check-tests-in-builddir-p.test check-p.test check11-p.test \ @@ -665,6 +665,9 @@ dirlist.test \ dirlist2.test \ discover.test \ dist-included-parent-dir.test \ +dist-readonly.test \ +dist-repeated.test \ +dist-auxdir-many-subdirs.test \ distcleancheck.test \ distcom2.test \ distcom3.test \ @@ -672,6 +675,7 @@ distcom4.test \ distcom5.test \ distcom6.test \ distcom7.test \ +distcom-subdir.test \ distdir.test \ distlinks.test \ distlinksbrk.test \ diff --git a/tests/dist-auxdir-many-subdirs.test b/tests/dist-auxdir-many-s= ubdirs.test new file mode 100755 index 0000000..4f32f64 =2D-- /dev/null +++ b/tests/dist-auxdir-many-subdirs.test @@ -0,0 +1,142 @@ +#! /bin/sh +# Copyright (C) 2011 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 . + +# It should be legitimate for many subdir Makefiles to require the +# same config-aux files. + +am_create_testdir=3Dempty +parallel_tests=3Dyes +required=3Dcc +. ./defs || Exit 1 + +count=3D0 +ocwd=3D`pwd` || fatal_ "cannot get current working directory" + +# Usage: do_check [--add-missing] [CONFIG-AUXDIR-PATH=3D.] +do_check () +{ + case $1 in + -a|--add-missing) add_missing=3Dyes; shift;; + *) add_missing=3Dno;; + esac + auxdir=3D${1-.} + + count=3D`expr $count + 1` + mkdir T$count.d + cd T$count.d + + distdir=3D$me-$count + unindent > configure.in << END + AC_INIT([$me], [$count]) + AC_CONFIG_AUX_DIR([$auxdir]) + AM_INIT_AUTOMAKE([parallel-tests]) + AC_PROG_CC + # We don't want to require python or emcas in this test, so + # the tricks below. + AM_PATH_PYTHON([2.2], [], [:]) + EMACS=3Dno; AM_PATH_LISPDIR + AC_CONFIG_FILES([Makefile]) +END + + unindent > Makefile.stub <<'END' + ## For depcomp. + bin_PROGRAMS =3D foo + foo_SOURCES =3D foo.c + ## For py-compile. + python_PYTHON =3D bar.py + ## For elisp-comp. + lisp_LISP =3D baz.el + ## For test-driver. + TESTS =3D +END + + required_files=3D' + install-sh + missing + depcomp + py-compile + elisp-comp + test-driver + ' + + echo "SUBDIRS =3D" > Makefile.am + + suffixes=3D'0 1 2 3 4 5 6 7 8 9' + + for x in $suffixes; do + mkdir sub$x + echo "SUBDIRS +=3D sub$x" >> Makefile.am + echo "AC_CONFIG_FILES([sub$x/Makefile])" >> configure.in + cp Makefile.stub sub$x/Makefile.am + echo 'int main (void) { return 0; }' > sub$x/foo.c + touch sub$x/bar.py sub$x/baz.el + done + echo AC_OUTPUT >> configure.in + + $ACLOCAL + $AUTOCONF + + # FIXME: this is not good for installcheck; fix after merging + # into testsuite-work. + "$top_testsrcdir"/lib/install-sh -d $auxdir + if test $add_missing =3D yes; then + $AUTOMAKE -a --copy + for f in $required_files; do + test -f $auxdir/$f + # To ensure that if a auxiliary file is required and distributed + # by many Makefiles, the "dist" rule won't try to copy it multiple + # times in $(distdir). + chmod a-w $auxdir/$f + done + else + for f in $required_files; do + # FIXME: this is not good for installcheck; fix after merging + # into testsuite-work. + cp "$top_testsrcdir"/lib/$f $auxdir/$f + # See comments above. + chmod a-w $auxdir/$f + done + $AUTOMAKE + fi + + for vpath in : false; do + if $vpath; then + mkdir build + cd build + srcdir=3D.. + else + srcdir=3D. + fi + $srcdir/configure + $MAKE distdir + find $distdir # For debugging. + for f in $required_files; do + test -f $distdir/$auxdir/$f + done + cd $srcdir + done + + cd "$ocwd" || fatal_ "cannot chdir back to '$ocwd'" +} + +do_check . +do_check --add-missing . +do_check build-aux +do_check --add-missing build-aux +do_check a/b/c +do_check --add-missing a/b/c + +: diff --git a/tests/dist-readonly.test b/tests/dist-readonly.test new file mode 100755 index 0000000..3b558c9 =2D-- /dev/null +++ b/tests/dist-readonly.test @@ -0,0 +1,60 @@ +#! /bin/sh +# Copyright (C) 2011 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 . + +# Test that a readonly files are distributed as such, and not make +# writable while being copied in the $(distdir). + +required=3Dcc +. ./defs || Exit 1 + +cat >> configure.in << 'END' +AC_PROG_CC +AC_OUTPUT +END + +cat > Makefile.am << 'END' +bin_PROGRAMS =3D foo +foo_SOURCES =3D foo.c +EXTRA_DIST =3D bar.txt +check-local: test +.PHONY: test +test: + test -f $(srcdir)/foo.c && test ! -w $(srcdir)/foo.c + if (echo x > $(srcdir)/foo.c); then exit 1; else :; fi + grep 'main (void)' $(srcdir)/foo.c + test -f $(srcdir)/bar.txt && test ! -w $(srcdir)/bar.txt + if (echo x > $(srcdir)/bar.txt); then exit 1; else :; fi + grep 'To be, or not to be' $(srcdir)/bar.txt +END + +echo 'int main (void) { return 0; }' > foo.c +echo To be, or not to be ... > bar.txt +chmod a-w foo.c bar.txt + +$ACLOCAL +$AUTOCONF +$AUTOMAKE + +./configure +$MAKE distdir +ls -l $distdir # For debugging. +test -f foo.c && test ! -w foo.c || Exit 1 +(echo x > foo.c) && Exit 1 +test -f bar.txt && test ! -w bar.txt || Exit 1 +(echo x > bar.txt) && Exit 1 +$MAKE distcheck + +: diff --git a/tests/dist-repeated.test b/tests/dist-repeated.test new file mode 100755 index 0000000..7dd8bdd =2D-- /dev/null +++ b/tests/dist-repeated.test @@ -0,0 +1,102 @@ +#! /bin/sh +# Copyright (C) 2011 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 . + +# Test that we can distribute the same file as many times as we want. +# The distdir target should take care of not copying it more than one +# time anyway. + +. ./defs || Exit 1 + +echo AC_OUTPUT >> configure.in + +cat > Makefile.am <<'END' +bin_PROGRAMS =3D foo bar +foo_SOURCES =3D foo.c +bar_SOURCES =3D foo.c +python_PYTHON =3D bar.py +EXTRA_DIST =3D foo.c bar.py + +.PHONY: sanity-check +sanity-check: + for f in $(DISTFILES); do echo " $$f "; done > dist.txt + cat dist.txt + test `grep ' foo\.c ' dist.txt | wc -l` -eq 3 + test `grep ' bar\.py ' dist.txt | wc -l` -eq 2 + +# So that we don't have to require a C compiler. +AUTOMAKE_OPTIONS =3D no-dependencies +CC =3D false + +# So that we don't have to require a Python interpreter. +pythondir =3D ${prefix}/py +PYTHON =3D false +END + +ocwd=3D`pwd` || fatal_ "cannot get current working directory" + +# Help to ensure cp won't see the same file twice. +mkdir bin +cat > bin/cp <&2 + exit 1 + else + # For a sanity check later. + echo ok > '$ocwd'/cp-wrapper-has-seen-foo-c + fi + ;; +esac + +case " \$* " in + *bar.py\ *) + if test -f '$ocwd'/bar-py-copied; then + echo "\$0: we tried to copy bar.py twice" >&2 + exit 1 + else + # For a sanity check later. + echo ok > '$ocwd'/cp-wrapper-has-seen-bar-py + fi + ;; +esac + +exec cp "\$@" +END +chmod a+x bin/cp +PATH=3D`pwd`/bin$PATH_SEPARATOR$PATH; export PATH; + +: > foo.c +: > bar.py +: > py-compile + +# Help to ensure cp won't try to copy the same file twice. +chmod a-w foo.c bar.py + +$ACLOCAL +$AUTOCONF +$AUTOMAKE + +./configure +$MAKE sanity-check || fatal_ "expected invariants not verified" +$MAKE distdir +test -f cp-wrapper-has-seen-foo-c && test -f cp-wrapper-has-seen-bar-py \ + || fatal_ "our cp wrapper hasn't run correctly" + +: diff --git a/tests/distcom-subdir.test b/tests/distcom-subdir.test new file mode 100755 index 0000000..dca87f7 =2D-- /dev/null +++ b/tests/distcom-subdir.test @@ -0,0 +1,72 @@ +#! /bin/sh +# Copyright (C) 2004, 2009, 2010, 2011 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 . + +# Test to make sure that if an auxfile (here depcomp) is required +# by a subdir Makefile.am, it is distributed by that Makefile.am. + +. ./defs || Exit 1 + +cat >> configure.in << 'END' +AC_CONFIG_FILES([subdir/Makefile]) +AC_PROG_CC +AC_OUTPUT +END + +cat > Makefile.am << 'END' +SUBDIRS =3D subdir +END + +rm -f depcomp +mkdir subdir + +: > subdir/Makefile.am + +$ACLOCAL +$AUTOCONF +$AUTOMAKE +test ! -f depcomp + +cat > subdir/Makefile.am << 'END' +bin_PROGRAMS =3D foo +END + +: > subdir/foo.c + +$AUTOMAKE -a subdir/Makefile +test -f depcomp + +# FIXME: the logic of this check and other similar ones in other +# FIXME: `distcom*.test' files should be factored out in a common +# FIXME: subroutine in `defs'... +sed -n -e '/^DIST_COMMON =3D.*\\$/ { + :loop + p + n + t clear + :clear + s/\\$/\\/ + t loop + p + n +}' -e 's/$/ /' -e '/^DIST_COMMON =3D/p' subdir/Makefile.in > dc.txt +cat dc.txt +grep '^DIST_COMMON =3D.* \$(top_srcdir)/depcomp ' dc.txt + +./configure +$MAKE distdir +test -f $distdir/depcomp + +: diff --git a/tests/java-compile-run-nested.test b/tests/java-compile-run-ne= sted.test index ec75c92..2019208 100755 =2D-- a/tests/java-compile-run-nested.test +++ b/tests/java-compile-run-nested.test @@ -238,7 +238,7 @@ chmod a+x tests/*.test =20 $ACLOCAL $AUTOCONF =2D$AUTOMAKE +$AUTOMAKE -a =20 # To have the parallel testsuite more verbose. VERBOSE=3Dyes; export VERBOSE diff --git a/tests/test-driver-is-distributed.test b/tests/test-driver-is-d= istributed.test index 09ea45a..e9a3f14 100755 =2D-- a/tests/test-driver-is-distributed.test +++ b/tests/test-driver-is-distributed.test @@ -26,19 +26,23 @@ AC_CONFIG_FILES([tests/Makefile]) AC_OUTPUT END =20 +rm -f depcomp # It's unneeded. + mkdir tests =20 cat > Makefile.am << 'END' SUBDIRS =3D tests =2Dtest0: =2D echo ' ' $(DIST_COMMON) ' ' | grep '[ /]test-driver ' =2Dtest1: distdir +check-local: test-top +test-top: distdir ls -l $(distdir) $(distdir)/* ;: For debugging. test -f $(distdir)/test-driver =2D.PHONY: test0 test1 +.PHONY: test-top END =20 cat > tests/Makefile.am << 'END' +check-local: test-sub +test-sub: + echo ' ' $(DIST_COMMON) ' ' | grep '[ /]test-driver ' TESTS =3D foo.test EXTRA_DIST =3D $(TESTS) END @@ -53,7 +57,37 @@ $ACLOCAL $AUTOCONF $AUTOMAKE -a ./configure =2D$MAKE test0 test1 +$MAKE test-top +cd tests; $MAKE test-sub; cd ..; +$MAKE distcheck + +# Try again, with a `config_auxdir' !=3D `.' this time. + +$MAKE distclean + +mkdir build-aux +mv missing install-sh test-driver build-aux + +for d in . tests; do + sed 's|test-driver|build-aux/test-driver|' $d/Makefile.am > $d/t + mv -f $d/t $d/Makefile.am + cat $d/Makefile.am # For debugging. +done + +# Extra newline possibly required by OpenBSD 3.9 sed, see the autoconf +# manual for details. +sed '/^AC_INIT/i\ +AC_CONFIG_AUX_DIR([build-aux]) +' configure.in > t +mv -f t configure.in +cat configure.in # For debugging. + +touch aclocal.m4 # To avoid useless remakes. +$AUTOCONF +$AUTOMAKE +./configure +$MAKE test-top +cd tests; $MAKE test-sub; cd ..; $MAKE distcheck =20 : =2D-=20 1.7.2.3 --Boundary-00=_zc3hOGz/fD8rd7L-- From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 09 05:10:18 2011 Received: (at submit) by debbugs.gnu.org; 9 Oct 2011 09:10:18 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RCpOk-0001e0-9b for submit@debbugs.gnu.org; Sun, 09 Oct 2011 05:10:18 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RCpOh-0001dd-Mq for submit@debbugs.gnu.org; Sun, 09 Oct 2011 05:10:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RCpOW-00063l-LJ for submit@debbugs.gnu.org; Sun, 09 Oct 2011 05:10:05 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:39776) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RCpOW-00063f-JY for submit@debbugs.gnu.org; Sun, 09 Oct 2011 05:10:04 -0400 Received: from eggs.gnu.org ([140.186.70.92]:52859) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RCpOV-0002aU-K0 for bug-automake@gnu.org; Sun, 09 Oct 2011 05:10:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RCpOU-00062j-Gm for bug-automake@gnu.org; Sun, 09 Oct 2011 05:10:03 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:62130) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RCpOU-00062a-85 for bug-automake@gnu.org; Sun, 09 Oct 2011 05:10:02 -0400 Received: by wyh15 with SMTP id 15so2027373wyh.0 for ; Sun, 09 Oct 2011 02:10:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; bh=dXmdPbp8Q4SNq5yTZ4k41ECxHvlmSLmvUAa3L4Pmj1I=; b=H3Mp46cbZaZiogQer955TR+k2WxLVJB3MaM2vvUu1qCNs4zlagwAuPf+eezjhr0LlA 5Dc9jr2UIChlGPD7Hm439vOd6wZZtYltfyul8MMnWqRvjrSx26gm8hoBfrtUI/TeqK5J SwhwuOJ40sSXsUhPoWy2KnHnF2amoaO+FS4Bw= Received: by 10.216.131.90 with SMTP id l68mr4501325wei.75.1318151401125; Sun, 09 Oct 2011 02:10:01 -0700 (PDT) Received: from bigio.localnet (host96-100-dynamic.0-79-r.retail.telecomitalia.it. [79.0.100.96]) by mx.google.com with ESMTPS id h39sm26048697wbo.0.2011.10.09.02.09.58 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 09 Oct 2011 02:09:59 -0700 (PDT) From: Stefano Lattarini To: bug-automake@gnu.org Subject: Re: bug#9546: parallel-tests: auxiliary script `test-driver' is not distributed when TESTS is defined in a subdir Makefile (regression in branch test-protocols) Date: Sun, 9 Oct 2011 11:09:50 +0200 User-Agent: KMail/1.13.7 (Linux/2.6.30-2-686; KDE/4.6.5; i686; ; ) References: <201109182030.05107.stefano.lattarini@gmail.com> <201109182045.38369.stefano.lattarini@gmail.com> In-Reply-To: <201109182045.38369.stefano.lattarini@gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201110091109.50966.stefano.lattarini@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.7 (----) X-Debbugs-Envelope-To: submit Cc: 9546@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -4.8 (----) On Sunday 18 September 2011, Stefano Lattarini wrote: > On Sunday 18 September 2011, Stefano Lattarini wrote: > > Severity: serious > > > > The bug is demonstrated by the attached test script. > > I hope I'll be able to take a look into it soonish. > > > The test script has a couple of bugs, which I've now fixed. Attached > is the patch I've pushed to expose the bug. > FYI, this bug is being tackled by the patch series "Reorganize automake internals for distribution tarball creation": Regards, Stefano From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 20 09:29:15 2011 Received: (at 9546) by debbugs.gnu.org; 20 Oct 2011 13:29:15 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RGsgN-0002oy-JD for submit@debbugs.gnu.org; Thu, 20 Oct 2011 09:29:15 -0400 Received: from mail-vx0-f172.google.com ([209.85.220.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RGsfs-0002nZ-QX for 9546@debbugs.gnu.org; Thu, 20 Oct 2011 09:28:47 -0400 Received: by mail-vx0-f172.google.com with SMTP id fo1so2433284vcb.3 for <9546@debbugs.gnu.org>; Thu, 20 Oct 2011 06:27:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; bh=0ywtNZ2NQvElaL/j5mZOG2aVEyfnmknOPKWfQutGnpE=; b=AmA6bCj57P0SoGBU4LeC51FXBHvbt09o/OodYc5t6kchRgoEuhIaGPy9jm0Hj3rcfN SVAxpSfRztvNCGl4Y8qJ2xArnWY8uRi1M1YgieHK4Blq3XwjyN+ROMbJSdnHtJLikRK4 a9SmexuDB9I2lRHv7JApljCPyebS+YgepbOx4= Received: by 10.52.91.7 with SMTP id ca7mr10679473vdb.29.1319117256248; Thu, 20 Oct 2011 06:27:36 -0700 (PDT) Received: from bigio.localnet (host71-30-dynamic.56-82-r.retail.telecomitalia.it. [82.56.30.71]) by mx.google.com with ESMTPS id bu10sm9024926vdb.3.2011.10.20.06.27.34 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 20 Oct 2011 06:27:35 -0700 (PDT) From: Stefano Lattarini To: bug-automake@gnu.org Subject: Re: bug#9546: parallel-tests: auxiliary script `test-driver' is not distributed when TESTS is defined in a subdir Makefile (regression in branch test-protocols) Date: Thu, 20 Oct 2011 15:27:25 +0200 User-Agent: KMail/1.13.7 (Linux/2.6.30-2-686; KDE/4.6.5; i686; ; ) References: <201109182030.05107.stefano.lattarini@gmail.com> <201109182045.38369.stefano.lattarini@gmail.com> <201110091109.50966.stefano.lattarini@gmail.com> In-Reply-To: <201110091109.50966.stefano.lattarini@gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201110201527.26128.stefano.lattarini@gmail.com> X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: 9546 Cc: 9546@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -3.9 (---) On Sunday 09 October 2011, Stefano Lattarini wrote: > On Sunday 18 September 2011, Stefano Lattarini wrote: > > On Sunday 18 September 2011, Stefano Lattarini wrote: > > > Severity: serious > > > > > > The bug is demonstrated by the attached test script. > > > I hope I'll be able to take a look into it soonish. > > > > > The test script has a couple of bugs, which I've now fixed. Attached > > is the patch I've pushed to expose the bug. > > > FYI, this bug is being tackled by the patch series "Reorganize automake > internals for distribution tarball creation": > > > I've now merged the `dist-refactor' branch into `test-protocols' (commit `v1.11-1230-g6042b46'), so I'm closing this bug report. Regards, Stefano From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 20 09:29:16 2011 Received: (at control) by debbugs.gnu.org; 20 Oct 2011 13:29:16 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RGsgN-0002p0-T8 for submit@debbugs.gnu.org; Thu, 20 Oct 2011 09:29:16 -0400 Received: from mail-vx0-f172.google.com ([209.85.220.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RGsg6-0002nZ-1u for control@debbugs.gnu.org; Thu, 20 Oct 2011 09:28:59 -0400 Received: by mail-vx0-f172.google.com with SMTP id fo1so2433284vcb.3 for ; Thu, 20 Oct 2011 06:27:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:mime-version:content-type :content-transfer-encoding:message-id; bh=9NaVpm45QSn+9ychoHmjdHzNUaDxuywyWGbW9K/V15c=; b=jwfuFGuamPVASm9JX1OVrDcQJq0DiLFJkHfkh6GZMuMMmhkeXCj0IIdsNVL1Musc3U f3zEilrDtD3v1YPbtMNO1WOQ8G0lqUTARWNACub3NqgWgD6m9Cj0MuVedCyTBaJR+gDg if3w8sMHRYv783cAJMiBAFu8s9X5DRxHB/1cU= Received: by 10.220.193.200 with SMTP id dv8mr770908vcb.251.1319117269476; Thu, 20 Oct 2011 06:27:49 -0700 (PDT) Received: from bigio.localnet (host71-30-dynamic.56-82-r.retail.telecomitalia.it. [82.56.30.71]) by mx.google.com with ESMTPS id ja7sm8999379vdb.16.2011.10.20.06.27.46 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 20 Oct 2011 06:27:47 -0700 (PDT) From: Stefano Lattarini To: control@debbugs.gnu.org Subject: foo Date: Thu, 20 Oct 2011 15:27:36 +0200 User-Agent: KMail/1.13.7 (Linux/2.6.30-2-686; KDE/4.6.5; i686; ; ) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201110201527.37416.stefano.lattarini@gmail.com> X-Spam-Score: -3.9 (---) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -3.9 (---) tags 9546 patch tags 9651 patch close 9546 close 9651 thanks From unknown Mon Aug 18 00:08:59 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 18 Nov 2011 12:24:03 +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