From unknown Tue Jun 17 20:09:42 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#9587 <9587@debbugs.gnu.org> To: bug#9587 <9587@debbugs.gnu.org> Subject: Status: Automake claims $(*F), $( Date: Wed, 18 Jun 2025 03:09:42 +0000 retitle 9587 Automake claims $(*F), $( severity 9587 minor tag 9587 confirmed help pending thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 23 15:02:46 2011 Received: (at submit) by debbugs.gnu.org; 23 Sep 2011 19:02:46 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R7B1K-00054s-Cp for submit@debbugs.gnu.org; Fri, 23 Sep 2011 15:02:46 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R7B1H-00054l-Ec for submit@debbugs.gnu.org; Fri, 23 Sep 2011 15:02:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R7B0o-0002YP-Fx for submit@debbugs.gnu.org; Fri, 23 Sep 2011 15:02:15 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, URIBL_BLACK autolearn=no version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:46998) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R7B0o-0002YL-EL for submit@debbugs.gnu.org; Fri, 23 Sep 2011 15:02:14 -0400 Received: from eggs.gnu.org ([140.186.70.92]:45473) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R7B0n-0002Y9-4R for bug-automake@gnu.org; Fri, 23 Sep 2011 15:02:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R7B0l-0002Xi-FL for bug-automake@gnu.org; Fri, 23 Sep 2011 15:02:12 -0400 Received: from mail.elliptictech.com ([209.217.122.41]:43185 helo=mail.ellipticsemi.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R7B0l-0002XN-AQ for bug-automake@gnu.org; Fri, 23 Sep 2011 15:02:11 -0400 Received: from nbowler by mail.ellipticsemi.com with local (Exim 4.76) (envelope-from ) id 1R7B0i-0004XO-Pz for bug-automake@gnu.org; Fri, 23 Sep 2011 15:02:08 -0400 Date: Fri, 23 Sep 2011 15:02:08 -0400 From: Nick Bowler To: bug-automake@gnu.org Subject: Automake claims $(*F), $( MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Organization: Elliptic Technologies Inc. User-Agent: Mutt/1.5.21 (2010-09-15) 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: 140.186.70.17 X-Spam-Score: -4.6 (----) 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: -4.6 (----) Hello, When running automake without "foreign" in configure.ac it claims that variables such as $(*F), $( The five internal macros are [... $@, $%, $?, $<, $* ...]. > > Each of the internal macros has an alternative form. When an > uppercase 'D' or 'F' is appended to any of the macros, the meaning > shall be changed to the directory part for 'D' and filename part for > 'F'. The directory part is the path prefix of the file without a > trailing slash; for the current directory, the directory part is '.'. > When the $? macro contains more than one prerequisite filename, the > $(?D) and $(?F) (or ${?D} and ${?F}) macros expand to a list of > directory name parts and filename parts respectively. These variables are supported by (at least) bmake, pmake, dmake and GNU make. I can reproduce this with the following example: % cat >Makefile.am <<'EOF' .foo.bar: echo "$(@F) $(%F) $(?F) $( $@ EOF % cat >configure.ac <<'EOF' AC_INIT([test], [1.0]) AM_INIT_AUTOMAKE([-Wall]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT EOF % aclocal % automake --add-missing --foreign configure.ac:3: installing `./install-sh' configure.ac:3: installing `./missing' Makefile.am:2: %F: non-POSIX variable name Makefile.am:2: ?F: non-POSIX variable name Makefile.am:2: ) id 1R7Bir-000696-2r for submit@debbugs.gnu.org; Fri, 23 Sep 2011 15:47:45 -0400 Received: from dsl-67-204-24-19.acanac.net ([67.204.24.19] helo=mail.ellipticsemi.com) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R7Bio-00068r-47 for 9587@debbugs.gnu.org; Fri, 23 Sep 2011 15:47:43 -0400 Received: from nbowler by mail.ellipticsemi.com with local (Exim 4.76) (envelope-from ) id 1R7BiL-0005aZ-5H for 9587@debbugs.gnu.org; Fri, 23 Sep 2011 15:47:13 -0400 Date: Fri, 23 Sep 2011 15:47:13 -0400 From: Nick Bowler To: 9587@debbugs.gnu.org Subject: Re: Automake claims $(*F), $( References: <20110923190208.GA30532@elliptictech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110923190208.GA30532@elliptictech.com> Organization: Elliptic Technologies Inc. User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -2.5 (--) X-Debbugs-Envelope-To: 9587 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: -2.5 (--) On 2011-09-23 15:02 -0400, Nick Bowler wrote: > These variables are supported by (at least) bmake, pmake, dmake and GNU > make. I can reproduce this with the following example: I spoke a bit too soon here. Neither bmake nor pmake seem too support $(?F) or $(?D) (both expand to be empty in both inference and target rules). And dmake seems to differ slightly from POSIX wrt the "D" variants. Quoting IEEE Std 1003.1-2004 again: > The directory part is the path prefix of the file without a > trailing slash; for the current directory, the directory part is '.'. For all the "D" variants, dmake puts a trailing slash contrary to the above, and for the current directory expands to the empty string instead of "." as required. -- Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/) From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 19 05:06:51 2011 Received: (at submit) by debbugs.gnu.org; 19 Oct 2011 09:06:51 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RGS6t-0001W9-8j for submit@debbugs.gnu.org; Wed, 19 Oct 2011 05:06:51 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RGS6r-0001Vc-7j for submit@debbugs.gnu.org; Wed, 19 Oct 2011 05:06:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGS5k-0003Qi-SM for submit@debbugs.gnu.org; Wed, 19 Oct 2011 05:05:41 -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]:54586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGS5k-0003Qe-Qc for submit@debbugs.gnu.org; Wed, 19 Oct 2011 05:05:40 -0400 Received: from eggs.gnu.org ([140.186.70.92]:39049) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGS5j-00068g-IM for bug-automake@gnu.org; Wed, 19 Oct 2011 05:05:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGS5i-0003QE-Bq for bug-automake@gnu.org; Wed, 19 Oct 2011 05:05:39 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:36936) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGS5i-0003QA-1P for bug-automake@gnu.org; Wed, 19 Oct 2011 05:05:38 -0400 Received: by wyg34 with SMTP id 34so1773140wyg.0 for ; Wed, 19 Oct 2011 02:05:37 -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=lEI3fCipjjxCFyK4ZH9dWwiKHJn4x1t+yUyPCYyLdhI=; b=ca7DW83c33l0r08GYT4SuCzq1Z8Boa55zipkAURYZjMZGV2wIYHgMHF1QQxZWrDs8f HpMIpl3hObvp5ugT4Uhh4lo3ZJXfPlsBxhf8gZ/U8+F2Yk3BveOprawoyJmfCIJHSRBx idzCh81ainDxef8xpY3ltjmWOF1I7MwvwivEw= Received: by 10.216.163.83 with SMTP id z61mr2145280wek.77.1319015137121; Wed, 19 Oct 2011 02:05:37 -0700 (PDT) Received: from bigio.localnet (host144-99-dynamic.5-87-r.retail.telecomitalia.it. [87.5.99.144]) by mx.google.com with ESMTPS id q30sm8556284wbn.17.2011.10.19.02.05.34 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 19 Oct 2011 02:05:35 -0700 (PDT) From: Stefano Lattarini To: bug-automake@gnu.org Subject: Re: bug#9587: Automake claims $(*F), $( <20110923194713.GA21467@elliptictech.com> In-Reply-To: <20110923194713.GA21467@elliptictech.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201110191105.22845.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: Nick Bowler , 9587@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: -5.2 (-----) severity 9587 minor thanks Hi Nick, sorry for the delay. On Friday 23 September 2011, Nick Bowler wrote: > On 2011-09-23 15:02 -0400, Nick Bowler wrote: > > These variables are supported by (at least) bmake, pmake, dmake and GNU > > make. I can reproduce this with the following example: > > I spoke a bit too soon here. Neither bmake nor pmake seem too support > $(?F) or $(?D) (both expand to be empty in both inference and target > rules). And dmake seems to differ slightly from POSIX wrt the "D" > variants. Quoting IEEE Std 1003.1-2004 again: > > > The directory part is the path prefix of the file without a > > trailing slash; for the current directory, the directory part is '.'. > > For all the "D" variants, dmake puts a trailing slash contrary to the > above, and for the current directory expands to the empty string instead > of "." as required. > Given this, and the fact that no-one has complained about this automake limitation so far, I'm oriented at simply leave the situation as is. Still, if someone else do care, and write a proper patch to improve the situation, I'd be happy to consider it. A "proper" patch should do the following: - Add a test, say "spy-internal-macros.test", which ensures that all the POSIX internal macros Automake does not warn about are supported by the make implementation that is being used in the tests. - For POSIX-mandated internal macros that are not portable in practice, Automake should give an error stating "non-portable internal macros" (or something like that), rather than "non-POSIX variable name". Regards, Stefano From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 19 11:19:35 2011 Received: (at submit) by debbugs.gnu.org; 19 Oct 2011 15:19:35 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RGXvb-00041l-5q for submit@debbugs.gnu.org; Wed, 19 Oct 2011 11:19:35 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RGXvZ-00041a-82 for submit@debbugs.gnu.org; Wed, 19 Oct 2011 11:19:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGXuO-00023D-OX for submit@debbugs.gnu.org; Wed, 19 Oct 2011 11:18:24 -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.4 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:56855) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGXuO-000239-Mz for submit@debbugs.gnu.org; Wed, 19 Oct 2011 11:18:20 -0400 Received: from eggs.gnu.org ([140.186.70.92]:53201) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGXuK-00049E-I1 for bug-automake@gnu.org; Wed, 19 Oct 2011 11:18:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGXuE-00022K-V9 for bug-automake@gnu.org; Wed, 19 Oct 2011 11:18:16 -0400 Received: from mail.elliptictech.com ([209.217.122.41]:56462 helo=mail.ellipticsemi.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGXuE-000223-Ev for bug-automake@gnu.org; Wed, 19 Oct 2011 11:18:10 -0400 Received: from nbowler by mail.ellipticsemi.com with local (Exim 4.76) (envelope-from ) id 1RGXu8-0006Gk-ES; Wed, 19 Oct 2011 11:18:04 -0400 Date: Wed, 19 Oct 2011 11:18:04 -0400 From: Nick Bowler To: Stefano Lattarini Subject: Re: bug#9587: Automake claims $(*F), $( References: <20110923190208.GA30532@elliptictech.com> <20110923194713.GA21467@elliptictech.com> <201110191105.22845.stefano.lattarini@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201110191105.22845.stefano.lattarini@gmail.com> Organization: Elliptic Technologies Inc. User-Agent: Mutt/1.5.21 (2010-09-15) 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: 140.186.70.17 X-Spam-Score: -5.4 (-----) X-Debbugs-Envelope-To: submit Cc: bug-automake@gnu.org, 9587@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: -5.5 (-----) On 2011-10-19 11:05 +0200, Stefano Lattarini wrote: > On Friday 23 September 2011, Nick Bowler wrote: > > Neither bmake nor pmake seem too support $(?F) or $(?D) (both expand > > to be empty in both inference and target rules). And dmake seems to > > differ slightly from POSIX wrt the "D" variants. Quoting IEEE Std > > 1003.1-2004 again: > > > > > The directory part is the path prefix of the file without a > > > trailing slash; for the current directory, the directory part is '.'. > > > > For all the "D" variants, dmake puts a trailing slash contrary to the > > above, and for the current directory expands to the empty string instead > > of "." as required. > > Given this, and the fact that no-one has complained about this automake > limitation so far, I'm oriented at simply leave the situation as is. The only reason I didn't notice this before is I've been unknowingly running for years without portability warnings enabled. I didn't realize (until now) that they get disabled by "foreign" in: AM_INIT_AUTOMAKE([-Wall -Werror foreign ...]). While it's certainly possible to avoid the use of these macros by doing it in the shell, they're invaluable in non-recursive build systems: probably about half of the suffix rules that I write contain either $(@D) or $(*F) (automake only warns about the latter). Amusingly, of those two variables in the make implementations that I've tested, only $(@D) has portability issues (dmake) -- and it's the one that automake *doesn't* warn about. The dmake issues noted above are pretty minor: I doubt a trailing slash in a directory name would affect many rules, though an empty string instead of "." might. But since these macros are really only useful for working with files *not* in the current working directory, this also seems unlikely to affect many rules (but I guess deserves a note). But yeah, $(?F) and $(?D) are obviously not portable. This is unfortunate, but I haven't actually used these particular macros before. Incidentally, automake also produces similar non-POSIX warnings about $(<), $(*), $(%) and $(?), which are the same as $<, $*, $% and $?, respectively. It also warns about things like $(<:.foo=.bar). Cheers, -- Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/) From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 20 14:32:56 2022 Received: (at control) by debbugs.gnu.org; 20 Feb 2022 19:32:56 +0000 Received: from localhost ([127.0.0.1]:33837 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nLrx2-0007z6-5a for submit@debbugs.gnu.org; Sun, 20 Feb 2022 14:32:56 -0500 Received: from woodpecker.gentoo.org ([140.211.166.183]:42024 helo=smtp.gentoo.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nLrx0-0007yt-J8 for control@debbugs.gnu.org; Sun, 20 Feb 2022 14:32:54 -0500 Received: by smtp.gentoo.org (Postfix, from userid 559) id 06DC6343765; Sun, 20 Feb 2022 19:32:48 +0000 (UTC) From: Mike Frysinger To: control@debbugs.gnu.org Subject: Control message Message-Id: <20220220193249.06DC6343765@smtp.gentoo.org> Date: Sun, 20 Feb 2022 19:32:48 +0000 (UTC) X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -6.0 (------) tag 9587 = confirmed help thankyou From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 23 15:58:01 2023 Received: (at submit) by debbugs.gnu.org; 23 Mar 2023 19:58:01 +0000 Received: from localhost ([127.0.0.1]:39386 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pfR4S-0003bu-H4 for submit@debbugs.gnu.org; Thu, 23 Mar 2023 15:58:01 -0400 Received: from lists.gnu.org ([209.51.188.17]:45592) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pfR4Q-0003bm-Gg for submit@debbugs.gnu.org; Thu, 23 Mar 2023 15:57:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pfR4Q-0007lD-64 for automake-patches@gnu.org; Thu, 23 Mar 2023 15:57:58 -0400 Received: from mout.gmx.net ([212.227.15.15]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pfR4O-0000Lt-7a for automake-patches@gnu.org; Thu, 23 Mar 2023 15:57:57 -0400 Received: from [192.168.1.226] ([90.227.12.124]) by mail.gmx.net (mrgmx004 [212.227.17.184]) with ESMTPSA (Nemesis) id 1M2f9h-1pcwcw2rkd-004FMn; Thu, 23 Mar 2023 20:57:45 +0100 Content-Type: multipart/mixed; boundary="------------7LpijD5L8EDxSwdTRc92hGnD" Message-ID: Date: Thu, 23 Mar 2023 20:57:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 To: automake-patches@gnu.org, 9587@debbugs.gnu.org Content-Language: en-GB From: Bogdan Subject: [bug#9587][PATCH] Automake claims $(*F), $( 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.4 (--) This is a multi-part message in MIME format. --------------7LpijD5L8EDxSwdTRc92hGnD Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hello again. The attached patch allows the following symbols not to cause Automake errors about non-POSIX variables (and updates the test): $(@F) $(%F) $(?F) $() id 1qFcdK-0005RD-Ni for submit@debbugs.gnu.org; Sat, 01 Jul 2023 11:35:35 -0400 Received: from lists.gnu.org ([209.51.188.17]:36706) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFcdI-0005R5-2x for submit@debbugs.gnu.org; Sat, 01 Jul 2023 11:35:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qFcdH-0004rl-Py for automake-patches@gnu.org; Sat, 01 Jul 2023 11:35:31 -0400 Received: from frenzy.freefriends.org ([198.99.81.75] helo=freefriends.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qFcdF-0006bx-NO for automake-patches@gnu.org; Sat, 01 Jul 2023 11:35:31 -0400 X-Envelope-From: karl@freefriends.org Received: from freefriends.org (localhost [127.0.0.1]) by freefriends.org (8.14.7/8.14.7) with ESMTP id 361FZHkU017533 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 1 Jul 2023 09:35:17 -0600 Received: (from apache@localhost) by freefriends.org (8.14.7/8.14.7/Submit) id 361FZGZL017530; Sat, 1 Jul 2023 09:35:16 -0600 Date: Sat, 1 Jul 2023 09:35:16 -0600 Message-Id: <202307011535.361FZGZL017530@freefriends.org> From: Karl Berry To: bogdro_rep@gmx.us, nbowler@draconx.ca, nbowler@elliptictech.com Subject: Re: bug#9587: [PATCH] Automake claims $(*F), $( Received-SPF: pass client-ip=198.99.81.75; envelope-from=karl@freefriends.org; helo=freefriends.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: automake-patches@gnu.org, 9587@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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 (--) Back on this bug report from Nick in 2011 (thanks/sorry): https://debbugs.gnu.org/cgi/bugreport.cgi?bug=9587 bd> The attached patch allows the following symbols not to cause Automake errors about non-POSIX variables (and updates the test): $(@F) $(%F) $(?F) $( automake: do not warn that POSIX variables are non-POSIX. This change fixes https://bugs.gnu.org/9587. * lib/Automake/Variable.pm (_VARIABLE_PATTERN_EXTRA_POSIX): new variable for $(*D) and the like. (_VARIABLE_PATTERN): use it. * t/vars3.sh: update test. * NEWS: mention this. POSIX spec (currently): https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html diff --git a/NEWS b/NEWS index b73c92569..61d631ba0 100644 --- a/NEWS +++ b/NEWS @@ -37,6 +37,12 @@ New in 1.17: - Emacs Lisp compilations respects silent make output. + - Automake no longer incorrectly warns that the POSIX make variables + $(*D) and the like are non-POSIX. Unfortunately, the make + implementations which do not correctly implement all the POSIX + variables are not detected, but this seems to have little impact + in practice. (bug#9587) + - distcleancheck ignores "silly rename" files (.nfs* .smb* .__afs*) that can show up on network file systems. diff --git a/lib/Automake/Variable.pm b/lib/Automake/Variable.pm index 2c118314e..8bafc8e3a 100644 --- a/lib/Automake/Variable.pm +++ b/lib/Automake/Variable.pm @@ -132,7 +132,9 @@ non-object). =cut my $_VARIABLE_CHARACTERS = '[.A-Za-z0-9_@]+'; -my $_VARIABLE_PATTERN = '^' . $_VARIABLE_CHARACTERS . "\$"; +my $_VARIABLE_PATTERN_EXTRA_POSIX = '[*?<%][DF]?'; +my $_VARIABLE_PATTERN = '^(' . $_VARIABLE_CHARACTERS + . '|' . $_VARIABLE_PATTERN_EXTRA_POSIX . ")\$"; my $_VARIABLE_RECURSIVE_PATTERN = '^([.A-Za-z0-9_@]|\$[({]' . $_VARIABLE_CHARACTERS . '[})]?)+' . "\$"; diff --git a/t/vars3.sh b/t/vars3.sh index ae89a6869..cbba47e68 100644 --- a/t/vars3.sh +++ b/t/vars3.sh @@ -15,7 +15,8 @@ # along with this program. If not, see . # Check that Automake warns about variables containing spaces -# and other non-POSIX characters. +# and other non-POSIX characters, but not about real POSIX +# variables (see bug#9587). . test-init.sh @@ -32,6 +33,10 @@ L08$(o u c h): $(wildcard *.c) echo $${ok-this is} L11: $(thisis) $(ok) ${here} +just_a_test: + echo "$(@F) $(%F) $(?F) $( $@ + echo "$(%) $(?) $(<) $(*)" > $@ + echo "$% $? $< $*" > $@ EOF $ACLOCAL @@ -59,6 +64,20 @@ grep ':8:.*wildcard' stderr grep ':9:.*another Error' stderr $EGREP 'ok|thisis|here' stderr && exit 1 +grep '@F' stderr && exit 1 +grep '%F' stderr && exit 1 +grep '?F' stderr && exit 1 +grep ') id 1r7kOA-00005r-P8 for submit@debbugs.gnu.org; Mon, 27 Nov 2023 17:47:38 -0500 Received: from frenzy.freefriends.org ([198.99.81.75]:56304 helo=freefriends.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7kO9-00005c-W9 for control@debbugs.gnu.org; Mon, 27 Nov 2023 17:47:38 -0500 X-Envelope-From: karl@freefriends.org X-Envelope-To: Received: from freefriends.org (localhost [127.0.0.1]) by freefriends.org (8.14.7/8.14.7) with ESMTP id 3ARMlUZn013110 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 27 Nov 2023 15:47:30 -0700 Received: (from apache@localhost) by freefriends.org (8.14.7/8.14.7/Submit) id 3ARMlUR9013109; Mon, 27 Nov 2023 15:47:30 -0700 Date: Mon, 27 Nov 2023 15:47:30 -0700 Message-Id: <202311272247.3ARMlUR9013109@freefriends.org> From: Karl Berry To: control@debbugs.gnu.org Subject: X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: tags 9587 + help pending Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 2.0 BLANK_SUBJECT Subject is present but empty -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: 1.0 (+) tags 9587 + help pending