From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 12 01:44:06 2012 Received: (at submit) by debbugs.gnu.org; 12 Mar 2012 05:44:06 +0000 Received: from localhost ([127.0.0.1]:45840 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S6y3C-0002h2-38 for submit@debbugs.gnu.org; Mon, 12 Mar 2012 01:44:06 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44809) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S6y39-0002gv-9r for submit@debbugs.gnu.org; Mon, 12 Mar 2012 01:44:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S6xaG-00046f-S8 for submit@debbugs.gnu.org; Mon, 12 Mar 2012 01:14:14 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:47952) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S6xaG-00046a-OL for submit@debbugs.gnu.org; Mon, 12 Mar 2012 01:14:12 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39779) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S6xaF-0007Ww-37 for bug-automake@gnu.org; Mon, 12 Mar 2012 01:14:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S6xaD-000469-6Y for bug-automake@gnu.org; Mon, 12 Mar 2012 01:14:10 -0400 Received: from www10194u.sakura.ne.jp ([182.48.42.232]:56796) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S6xaC-00042X-U2 for bug-automake@gnu.org; Mon, 12 Mar 2012 01:14:09 -0400 Message-ID: From: Daiki Ueno To: bug-automake@gnu.org Subject: pkglibexecdir is unconditionally created when make install Date: Mon, 12 Mar 2012 13:55:40 +0900 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) --=-=-= Content-Type: text/plain I got a bug report for my package, which conditionally installs some scripts into pkglibexecdir like this: if ENABLE_FOO pkglibexec_SCRIPTS = bar endif where pkglibexec* is not referred outside of if...endif. When "make install", automake creates pkglibexecdir even when ENABLE_FOO is false. I'm attaching a prove which demonstrates the behavior. --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=instdir-cond.test Content-Transfer-Encoding: base64 IyEgL2Jpbi9zaAojIENvcHlyaWdodCAoQykgMjAxMS0yMDEyIEZyZWUgU29mdHdhcmUgRm91bmRh dGlvbiwgSW5jLgojCiMgVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVk aXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkKIyBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdO VSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieQojIHRoZSBGcmVlIFNvZnR3 YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIsIG9yIChhdCB5b3VyIG9wdGlvbikKIyBh bnkgbGF0ZXIgdmVyc2lvbi4KIwojIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUg aG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLAojIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsg d2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mCiMgTUVSQ0hBTlRBQklMSVRZIG9y IEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZQojIEdOVSBHZW5lcmFs IFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuCiMKIyBZb3Ugc2hvdWxkIGhhdmUgcmVj ZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZQojIGFsb25nIHdp dGggdGhpcyBwcm9ncmFtLiAgSWYgbm90LCBzZWUgPGh0dHA6Ly93d3cuZ251Lm9yZy9saWNlbnNl cy8+LgoKIyBDaGVjayBhZ2FpbnN0IGF1dG9tYWtlIGJ1ZyM5NTc4OiAibWFrZSB1bmluc3RhbGwi IGlzc3VlZCBiZWZvcmUKIyAibWFrZSBpbnN0YWxsIiBvciBhZnRlciBhIG1lcmUgIm1ha2UgaW5z dGFsbC1kYXRhIiBvciBhIG1lcmUKIyAibWFrZSBpbnN0YWxsLWV4ZWMiIGZhaWxlZCBzcHVyaW91 c2x5LgojCiMgRklYTUU6IHRoaXMgdGVzdCBvbmx5IGRlYWwgd2l0aCBEQVRBIGFuZCBzY3JpcHQg cHJpbWFyaWVzOyBtYXliZSB3ZQojIG5lZWQgc2lzdGVyIHRlc3RzIGZvciBvdGhlciBwcmltYXJp ZXMgdG9vPyAgRS5nLiwgUFJPR1JBTVMsIExJU1AsCiMgUFlUSE9OLCBldGMuLi4KCi4gLi9kZWZz IHx8IEV4aXQgMQoKY2F0ID4+IGNvbmZpZ3VyZS5hYyA8PCAnRU5EJwpBTV9DT05ESVRJT05BTChb RU5BQkxFX0ZPT10sIFtmYWxzZV0pCkFDX09VVFBVVApFTkQKCjogPiBmb28KOiA+IGJhcgoKY2F0 ID4gTWFrZWZpbGUuYW0gPDwgJ0VORCcKaWYgRU5BQkxFX0ZPTwpwa2dkYXRhX0RBVEEgPSBmb28K cGtnbGliZXhlY19TQ1JJUFRTID0gYmFyCmVuZGlmCkVORAoKJEFDTE9DQUwKJEFVVE9NQUtFCiRB VVRPQ09ORgoKLi9jb25maWd1cmUgLS1wcmVmaXg9ImBwd2RgL2luc3QiCgokTUFLRSBpbnN0YWxs CnRlc3QgISAtZCBpbnN0L3NoYXJlL2luc3RkaXItY29uZAp0ZXN0ICEgLWQgaW5zdC9saWJleGVj L2luc3RkaXItY29uZApybSAtcmYgaW5zdAoKOgo= --=-=-= Content-Type: text/plain Regards, -- Daiki Ueno --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 12 07:22:57 2012 Received: (at 10997) by debbugs.gnu.org; 12 Mar 2012 11:22:57 +0000 Received: from localhost ([127.0.0.1]:46129 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S73L6-0002jw-6z for submit@debbugs.gnu.org; Mon, 12 Mar 2012 07:22:56 -0400 Received: from mail-bk0-f44.google.com ([209.85.214.44]:49380) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S73Kt-0002jZ-CI; Mon, 12 Mar 2012 07:22:54 -0400 Received: by bkuw5 with SMTP id w5so2399559bku.3 for ; Mon, 12 Mar 2012 03:52:52 -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; bh=Dm8Bhhx1SR2ypO4RRyIED8rx1rSXbuWVPnyQ+bReeek=; b=MjTyR5IrMDc8dQuY1DELzg8fGx2xTdfp6ajs8Vbk6bKRAy8BKuZcUmXJr4bDTS16dK PtZq+QRN1Mbh79crwRQFtot++RfGlqKPJhjEUYs40UlDThcR8E7fvmx0QQebDVfdBxoH Y1Gghb3O3fEpP1sbITRhYCFp/bOXrTId2ubW6Y0wohpwfJdIcLFRNRmGX2GBkEpsxsjw 41jUz7gfkDIn5SM+6P4oWjEg00J0t4e/6fENwFPJl7JgRe0aN2GliRW+wi5ZuR1pw2f+ aVRdjpdb4rHlPM2mO5GXdcDKoyy93+ddLXgtjnd0TK9aLVnyUvgTRbBRaf2PDQURlCoo WzHw== Received: by 10.204.132.72 with SMTP id a8mr4666870bkt.42.1331549572321; Mon, 12 Mar 2012 03:52:52 -0700 (PDT) Received: from [87.4.96.172] (host172-96-dynamic.4-87-r.retail.telecomitalia.it. [87.4.96.172]) by mx.google.com with ESMTPS id d4sm24307649bky.13.2012.03.12.03.52.49 (version=SSLv3 cipher=OTHER); Mon, 12 Mar 2012 03:52:50 -0700 (PDT) Message-ID: <4F5DD57F.5080905@gmail.com> Date: Mon, 12 Mar 2012 11:52:47 +0100 From: Stefano Lattarini MIME-Version: 1.0 To: Daiki Ueno Subject: Re: bug#10997: pkglibexecdir is unconditionally created when make install References: In-Reply-To: Content-Type: multipart/mixed; boundary="------------080104010102020305010001" X-Spam-Score: -0.9 (/) X-Debbugs-Envelope-To: 10997 Cc: 10997@debbugs.gnu.org, "automake-patches@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.9 (/) This is a multi-part message in MIME format. --------------080104010102020305010001 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit severity 10997 minor thanks Hi Daiki, thanks for the report. On 03/12/2012 05:55 AM, Daiki Ueno wrote: > I got a bug report for my package, which conditionally installs some > scripts into pkglibexecdir like this: > > if ENABLE_FOO > pkglibexec_SCRIPTS = bar > endif > > where pkglibexec* is not referred outside of if...endif. When "make > install", automake creates pkglibexecdir even when ENABLE_FOO is false. > > I'm attaching a prove which demonstrates the behavior. > I agree it would be nice to avoid creating directories that are not actually needed; still, this is a low-priority bug, and I'm not yet sure how difficult it would be to fix. For the moment, I've committed (in your name) the test case you've sent us (with minor tweakings), so that the bug will at least remain exposed in the testsuite. Attached is the patch I've pushed (to maint). Thanks, Stefano --------------080104010102020305010001 Content-Type: text/x-diff; name="0001-coverage-expose-automake-bug-10997.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-coverage-expose-automake-bug-10997.patch" >From b153660787dd7dea409ad969c29393c105e13bf2 Mon Sep 17 00:00:00 2001 Message-Id: From: Daiki Ueno Date: Mon, 12 Mar 2012 11:46:04 +0100 Subject: [PATCH] coverage: expose automake bug#10997 * tests/instdir-cond.test: New test. * tests/list-of-tests.mk: Add it. * tests/Makefile.am (XFAIL_TESTS): Likewise. Copyright-paperwork-exempt: yes Signed-off-by: Stefano Lattarini --- tests/Makefile.am | 1 + tests/instdir-cond.test | 49 +++++++++++++++++++++++++++++++++++++++++++++++ tests/list-of-tests.mk | 1 + 3 files changed, 51 insertions(+), 0 deletions(-) create mode 100644 tests/instdir-cond.test diff --git a/tests/Makefile.am b/tests/Makefile.am index b8ede30..9cac904 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -25,6 +25,7 @@ dist-auxfile.test \ dist-auxfile-2.test \ dist-pr109765.test \ gcj6.test \ +instdir-cond.test \ java-nobase.test \ objext-pr10128.test \ pr8365-remake-timing.test \ diff --git a/tests/instdir-cond.test b/tests/instdir-cond.test new file mode 100644 index 0000000..8d83f88 --- /dev/null +++ b/tests/instdir-cond.test @@ -0,0 +1,49 @@ +#! /bin/sh +# Copyright (C) 2012 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Check against automake bug#10997: directories holding only +# conditionally-installed files should not be created unconditionally. + +. ./defs || Exit 1 + +set -e + +cat >> configure.in << 'END' +AM_CONDITIONAL([ENABLE_FOO], [false]) +AC_OUTPUT +END + +: > foo +: > bar + +cat > Makefile.am << 'END' +if ENABLE_FOO +pkgdata_DATA = foo +pkglibexec_SCRIPTS = bar +endif +END + +$ACLOCAL +$AUTOMAKE +$AUTOCONF + +./configure --prefix="`pwd`/inst" + +$MAKE install +test ! -d inst/share/instdir-cond +test ! -d inst/libexec/instdir-cond + +: diff --git a/tests/list-of-tests.mk b/tests/list-of-tests.mk index 023bf3b..7fd0376 100644 --- a/tests/list-of-tests.mk +++ b/tests/list-of-tests.mk @@ -459,6 +459,7 @@ instdat.test \ instdat2.test \ instdir.test \ instdir2.test \ +instdir-cond.test \ instdir-java.test \ instdir-lisp.test \ instdir-ltlib.test \ -- 1.7.9 --------------080104010102020305010001-- From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 12 07:52:19 2012 Received: (at 10997) by debbugs.gnu.org; 12 Mar 2012 11:52:19 +0000 Received: from localhost ([127.0.0.1]:46184 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S73nW-0004Dy-Dg for submit@debbugs.gnu.org; Mon, 12 Mar 2012 07:52:19 -0400 Received: from smtp.mppmu.mpg.de ([134.107.24.58]:53439) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S73n8-0004DA-T6 for 10997@debbugs.gnu.org; Mon, 12 Mar 2012 07:52:18 -0400 Received: by smtp.mppmu.mpg.de (Postfix, from userid 998) id 5F9E62828420; Mon, 12 Mar 2012 12:22:03 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on smtp.mppmu.mpg.de X-Spam-Level: X-Spam-Status: No, score=-1.8 required=6.0 tests=BAYES_00,TW_XM, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 Received: from mail.mppmu.mpg.de (mail-6.mppmu.mpg.de [134.107.6.12]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.mppmu.mpg.de (Postfix) with ESMTP id 30C192828439; Mon, 12 Mar 2012 12:21:52 +0100 (CET) Received: from pcl321.mppmu.mpg.de (pcl321.mppmu.mpg.de [134.107.3.54]) by mail.mppmu.mpg.de (Postfix) with ESMTP id 0CDC01A157A; Mon, 12 Mar 2012 12:21:52 +0100 (CET) Received: from pcl321.mppmu.mpg.de (localhost [127.0.0.1]) by pcl321.mppmu.mpg.de (8.14.2/8.14.1) with ESMTP id q2CBLqL6028825; Mon, 12 Mar 2012 12:21:52 +0100 Received: from localhost (peb@localhost) by pcl321.mppmu.mpg.de (8.14.2/8.14.2/Submit) with ESMTP id q2CBLpOf028821; Mon, 12 Mar 2012 12:21:51 +0100 X-Authentication-Warning: pcl321.mppmu.mpg.de: peb owned process doing -bs Date: Mon, 12 Mar 2012 12:21:51 +0100 (CET) From: Peter Breitenlohner To: Stefano Lattarini Subject: Re: bug#10997: pkglibexecdir is unconditionally created when make install In-Reply-To: <4F5DD57F.5080905@gmail.com> Message-ID: References: <4F5DD57F.5080905@gmail.com> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 10997 Cc: Daiki Ueno , bug-automake@gnu.org, "automake-patches@gnu.org" , 10997@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) On Mon, 12 Mar 2012, Stefano Lattarini wrote: > On 03/12/2012 05:55 AM, Daiki Ueno wrote: >> I got a bug report for my package, which conditionally installs some >> scripts into pkglibexecdir like this: >> >> if ENABLE_FOO >> pkglibexec_SCRIPTS = bar >> endif >> >> where pkglibexec* is not referred outside of if...endif. When "make >> install", automake creates pkglibexecdir even when ENABLE_FOO is false. >> >> I'm attaching a prove which demonstrates the behavior. >> > I agree it would be nice to avoid creating directories that are not actually > needed; still, this is a low-priority bug, and I'm not yet sure how difficult > it would be to fix. For the moment, I've committed (in your name) the test > case you've sent us (with minor tweakings), so that the bug will at least > remain exposed in the testsuite. Attached is the patch I've pushed (to maint). Fixing this particular case might be fine, but please watch out. In the quite similar (unconditional) case pkglibexec_SCRIPTS = one might actually expect that that $(pkglibexecdir) is created unconditionally. (Perhaps because 'install-exec-local' or 'install-data-local' wants to install some files into that directory.) In the TeX Live build system we actually use something quite analogous: nodist_bin_SCRIPTS = texmfdir = $(datarootdir)/texmf/scripts/xindy nodist_texmf_SCRIPTS = texindy.pl xindy.pl install-data-hook: install-perl-links where 'install-perl-links' installs in $(bindir) the symbolic links 'texindy' and 'xindy' pointing to the respective perl scripts in $(texmfdir). To summarize: 'nodist_bin_SCRIPTS =' is an extremely convenient way to ensure that $(bindir) -- or rather $(DESTDIR)$(bindir) -- exists. Regards Peter Breitenlohner From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 12 10:13:46 2012 Received: (at 10997) by debbugs.gnu.org; 12 Mar 2012 14:13:46 +0000 Received: from localhost ([127.0.0.1]:46881 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S760P-0008S9-P5 for submit@debbugs.gnu.org; Mon, 12 Mar 2012 10:13:46 -0400 Received: from mail-bk0-f44.google.com ([209.85.214.44]:48695) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S760M-0008S0-AN for 10997@debbugs.gnu.org; Mon, 12 Mar 2012 10:13:44 -0400 Received: by bkuw5 with SMTP id w5so2542888bku.3 for <10997@debbugs.gnu.org>; Mon, 12 Mar 2012 06:43:50 -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; bh=mFeRth4taX/86NtENlsW94Oqe+DxplymTZgrA7ij+MU=; b=aJemAhiWx5RWp7lWTgMPjn+fP+vDSejTW3w4wrNjWna737cAmCrD/jWexjuvNsePtA avsPdsKVDO1hr0stRvBIAXtyEzGBHGDz4Sob86d7AzviM7UVNXe1Qlfh3FbbbMDaH3mz WBZyoKKJNRCDiPaBwsSkqB5WBLBp9fj43lyhCpfKSy69HSc5FbXfshD5bSgM7YxToGAl Y75BslMh5fhIbUIcaEhi53rfowILcJ+wb8KGszMJeLsAflWyyWpSinORIfBtvMzdmIEx DK1/LOQDd6bybGGtuJEaQs/0l4+q529YP1yrYWxAIM0EvEdE+p3M/MWeomlK413nkTn3 PcOA== Received: by 10.205.130.1 with SMTP id hk1mr4769252bkc.140.1331559830711; Mon, 12 Mar 2012 06:43:50 -0700 (PDT) Received: from [95.244.94.194] (host194-94-dynamic.244-95-r.retail.telecomitalia.it. [95.244.94.194]) by mx.google.com with ESMTPS id r14sm6626805bkv.11.2012.03.12.06.43.47 (version=SSLv3 cipher=OTHER); Mon, 12 Mar 2012 06:43:49 -0700 (PDT) Message-ID: <4F5DFD8B.9070909@gmail.com> Date: Mon, 12 Mar 2012 14:43:39 +0100 From: Stefano Lattarini MIME-Version: 1.0 To: Peter Breitenlohner Subject: Re: bug#10997: pkglibexecdir is unconditionally created when make install References: <4F5DD57F.5080905@gmail.com> In-Reply-To: Content-Type: multipart/mixed; boundary="------------080401070408030606070501" X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 10997 Cc: Daiki Ueno , bug-automake@gnu.org, "automake-patches@gnu.org" , 10997@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) This is a multi-part message in MIME format. --------------080401070408030606070501 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 03/12/2012 12:21 PM, Peter Breitenlohner wrote: > > Fixing this particular case might be fine, but please watch out. > In the quite similar (unconditional) case > pkglibexec_SCRIPTS = > one might actually expect that that $(pkglibexecdir) is created > unconditionally. > > [SNIP] > > To summarize: 'nodist_bin_SCRIPTS =' is an extremely convenient way to > ensure that $(bindir) -- or rather $(DESTDIR)$(bindir) -- exists. > I agree, and in fact I regard this as a feature (which automake has been known to use in its own build system for some time). But I see (with a simple "grep 'test -d' tests/*" command) that this behaviour wasn't covered by our testsuite. I've thus added a new test to ensure we don't unwittingly break this feature (see attached patch, pushed to maint). Thanks, Stefano --------------080401070408030606070501 Content-Type: text/x-diff; name="0001-coverage-an-empty-foo_PRIMARY-should-create-director.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-coverage-an-empty-foo_PRIMARY-should-create-director.pa"; filename*1="tch" >From e9927ea32d8fe5056123b021ff771cb906b1b3df Mon Sep 17 00:00:00 2001 Message-Id: From: Stefano Lattarini Date: Mon, 12 Mar 2012 14:41:04 +0100 Subject: [PATCH] coverage: an empty foo_PRIMARY should create directory $(foodir) For example, a Makefile.am containing the definition: pkgdata_DATA = should cause the 'install' rule of the generated Makefile.in to create the '$(pkgdatadir)' directory (respecting any DESTDIR setting as well). Suggestion by Peter Breitenlohner in automake bug#10997. Signed-off-by: Stefano Lattarini --- tests/instdir-empty.test | 58 ++++++++++++++++++++++++++++++++++++++++++++++ tests/list-of-tests.mk | 1 + 2 files changed, 59 insertions(+), 0 deletions(-) create mode 100644 tests/instdir-empty.test diff --git a/tests/instdir-empty.test b/tests/instdir-empty.test new file mode 100644 index 0000000..f699583 --- /dev/null +++ b/tests/instdir-empty.test @@ -0,0 +1,58 @@ +#! /bin/sh +# Copyright (C) 2012 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# An empty "foo_PRIMARY" declaration should cause "make install" to create +# directory $(foodir). Suggested in discussion on automake bug#10997. + +. ./defs || Exit 1 + +set -e + +echo AC_OUTPUT >> configure.in + +cat > Makefile.am << 'END' +pkgdata_DATA = +libexec_SCRIPTS = +END + +$ACLOCAL +$AUTOMAKE +$AUTOCONF + +cwd=`pwd` +./configure --prefix="$cwd/inst" + +$MAKE install +test -d inst/share/$me +test -d inst/libexec +rm -rf inst + +$MAKE install-exec +test ! -d inst/share +test -d inst/libexec +rm -rf inst + +$MAKE install-data +test -d inst/share/$me +test ! -d inst/libexec +rm -rf inst + +./configure --prefix=/foo +$MAKE install DESTDIR=$cwd/dest +test -d dest/foo/share/$me +test -d dest/foo/libexec + +: diff --git a/tests/list-of-tests.mk b/tests/list-of-tests.mk index 7fd0376..0ee0711 100644 --- a/tests/list-of-tests.mk +++ b/tests/list-of-tests.mk @@ -460,6 +460,7 @@ instdat2.test \ instdir.test \ instdir2.test \ instdir-cond.test \ +instdir-empty.test \ instdir-java.test \ instdir-lisp.test \ instdir-ltlib.test \ -- 1.7.9 --------------080401070408030606070501-- From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 17 04:18:39 2012 Received: (at 10997) by debbugs.gnu.org; 17 Mar 2012 08:18:39 +0000 Received: from localhost ([127.0.0.1]:54320 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S8oqU-0003nG-IH for submit@debbugs.gnu.org; Sat, 17 Mar 2012 04:18:39 -0400 Received: from mail-we0-f172.google.com ([74.125.82.172]:41482) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S8oqR-0003n7-Ol for 10997@debbugs.gnu.org; Sat, 17 Mar 2012 04:18:36 -0400 Received: by werb10 with SMTP id b10so5387090wer.3 for <10997@debbugs.gnu.org>; Sat, 17 Mar 2012 00:48: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=Wr9P8w56XT6bLm1AMQ62HbbAD3Xp2vX5FyGCuLhJhsQ=; b=FHeOpmfuMKeDLs2yWDi1jbdepjma6VnPv7FltLC/oRcioVgI+IMbFXEMLFcviQFd/A WUOTK6ObeU84NGRC6Ybkd9Jv7UTY2avP+R0kq/HShLAFlQR3H9xVzqrL6SBJF+mXXCfF 3MpQPiK+pob5XS2wRfw62KacSFeiDCxR3R7aA6b+sPC1SQfV2jkI8SCNmhaamUD1t5zb b8hdgjCMKbBh+2p1DHkGLOPzG8sFDg5Jgboa+GBoGax4WsR05omYxTkewv7+ZvHUtTda Wok27UqkuzTSHIp8bDP6+2qvsL5K88+blalzU32SlUovNKoEF0P/Rzx4SRFVcknV819o EG/Q== Received: by 10.180.82.136 with SMTP id i8mr4500098wiy.19.1331970497090; Sat, 17 Mar 2012 00:48:17 -0700 (PDT) Received: from [80.116.81.50] (host50-81-dynamic.116-80-r.retail.telecomitalia.it. [80.116.81.50]) by mx.google.com with ESMTPS id fz9sm5369068wib.3.2012.03.17.00.48.14 (version=SSLv3 cipher=OTHER); Sat, 17 Mar 2012 00:48:15 -0700 (PDT) Message-ID: <4F6441B3.70409@gmail.com> Date: Sat, 17 Mar 2012 08:48:03 +0100 From: Stefano Lattarini MIME-Version: 1.0 To: Peter Breitenlohner Subject: Re: bug#10997: pkglibexecdir is unconditionally created when make install References: <4F5DD57F.5080905@gmail.com> <4F5DFD8B.9070909@gmail.com> In-Reply-To: <4F5DFD8B.9070909@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 10997 Cc: Daiki Ueno , bug-automake@gnu.org, "automake-patches@gnu.org" , 10997@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On 03/12/2012 02:43 PM, Stefano Lattarini wrote: > On 03/12/2012 12:21 PM, Peter Breitenlohner wrote: >> >> To summarize: 'nodist_bin_SCRIPTS =' is an extremely convenient way to >> ensure that $(bindir) -- or rather $(DESTDIR)$(bindir) -- exists. >> > I agree, and in fact I regard this as a feature (which automake has been known > to use in its own build system for some time). > I've now changed my mind, and started to consider this behaviour as a bug; see automake bug#11030: A fix to that will obviously fix the present bug as well. Regards, Stefano From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 18 15:50:56 2012 Received: (at 10997) by debbugs.gnu.org; 18 Mar 2012 19:50:56 +0000 Received: from localhost ([127.0.0.1]:55981 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S9M7z-0005zd-Ur for submit@debbugs.gnu.org; Sun, 18 Mar 2012 15:50:56 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:58394) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S9M7v-0005yu-AU; Sun, 18 Mar 2012 15:50:52 -0400 Received: by mail-wi0-f180.google.com with SMTP id hm17so2739049wib.15 for ; Sun, 18 Mar 2012 12:20:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=kTvrE0bb2QJceLykL1fHG+moaWamBYXzN6X58uXGF1o=; b=o5/hp4+cZSvtFQdtcjizX2SqRFCBI6J4ODOmVtHaUR056X3JeiKMmi+1TVKzPCBwSf UdtswgKfSxw+OssjkpIUfQYoVZhiY4Kk35n5aHNyTIxfMMBDywyPC8E7Ebn5HL9f51td GNzXcfEUWaZF9njDvJoe2qpCshlava1g+r6l0nRmbJZLpQGujCVocqEpQwWW5sBz/2Pq mMP8kOQm7LCz2t5az+QRiJOj+5J3VkCAdvL6IAapb4E0xRNu1xIFxEN3MmwdRbw5xNuc un3WaRNjsUwRf//K5zNcQT55y7+eUqzEogqlUrLOkyhg6ucUzm9skziUYn5qTqvUuatq lzXA== Received: by 10.216.137.226 with SMTP id y76mr5205478wei.96.1332098424815; Sun, 18 Mar 2012 12:20:24 -0700 (PDT) Received: from [82.54.101.148] (host148-101-dynamic.54-82-r.retail.telecomitalia.it. [82.54.101.148]) by mx.google.com with ESMTPS id gp8sm19235667wib.5.2012.03.18.12.20.21 (version=SSLv3 cipher=OTHER); Sun, 18 Mar 2012 12:20:23 -0700 (PDT) Message-ID: <4F663573.1080208@gmail.com> Date: Sun, 18 Mar 2012 20:20:19 +0100 From: Stefano Lattarini MIME-Version: 1.0 To: Peter Breitenlohner Subject: Re: bug#10997: pkglibexecdir is unconditionally created when make install References: <4F5DD57F.5080905@gmail.com> <4F5DFD8B.9070909@gmail.com> <4F6441B3.70409@gmail.com> In-Reply-To: <4F6441B3.70409@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 10997 Cc: Daiki Ueno , bug-automake@gnu.org, "automake-patches@gnu.org" , 10997@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) tags 10997 + patch close 10997 thanks On 03/17/2012 08:48 AM, Stefano Lattarini wrote: > On 03/12/2012 02:43 PM, Stefano Lattarini wrote: >> On 03/12/2012 12:21 PM, Peter Breitenlohner wrote: >>> >>> To summarize: 'nodist_bin_SCRIPTS =' is an extremely convenient way to >>> ensure that $(bindir) -- or rather $(DESTDIR)$(bindir) -- exists. >>> >> I agree, and in fact I regard this as a feature (which automake has been known >> to use in its own build system for some time). >> > I've now changed my mind, and started to consider this behaviour as a bug; see > automake bug#11030: > > > > A fix to that will obviously fix the present bug as well. > This bug has now been fixed by the same patch fixing bug#11030. Regards, Stefano From unknown Fri Sep 05 15:37:03 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 16 Apr 2012 11: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