From unknown Sat Aug 16 15:59:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55025: Automake should allow one to enable POSIX make behavior Resent-From: Vincent Lefevre Original-Sender: "Debbugs-submit" Resent-CC: bug-automake@gnu.org Resent-Date: Tue, 19 Apr 2022 15:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55025 X-GNU-PR-Package: automake X-GNU-PR-Keywords: To: 55025@debbugs.gnu.org X-Debbugs-Original-To: bug-automake@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.1650382447542 (code B ref -1); Tue, 19 Apr 2022 15:35:02 +0000 Received: (at submit) by debbugs.gnu.org; 19 Apr 2022 15:34:07 +0000 Received: from localhost ([127.0.0.1]:43921 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ngprj-00008f-AW for submit@debbugs.gnu.org; Tue, 19 Apr 2022 11:34:07 -0400 Received: from lists.gnu.org ([209.51.188.17]:33718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ngprh-00008W-6F for submit@debbugs.gnu.org; Tue, 19 Apr 2022 11:34:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42840) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngprf-0001rH-LQ for bug-automake@gnu.org; Tue, 19 Apr 2022 11:34:04 -0400 Received: from cventin.lip.ens-lyon.fr ([140.77.13.17]:45684) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngprb-0006Yf-Vr for bug-automake@gnu.org; Tue, 19 Apr 2022 11:34:03 -0400 Received: from vlefevre by cventin.lip.ens-lyon.fr with local (Exim 4.95) (envelope-from ) id 1ngprQ-000E9Y-Nn; Tue, 19 Apr 2022 17:33:48 +0200 Date: Tue, 19 Apr 2022 17:33:48 +0200 From: Vincent Lefevre Message-ID: <20220419153348.GD2033@cventin.lip.ens-lyon.fr> Mail-Followup-To: Vincent Lefevre , bug-automake@gnu.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/2.2.3+10 (6e7437c4) vl-138565 (2022-04-12) Received-SPF: none client-ip=140.77.13.17; envelope-from=vincent@vinc17.net; helo=cventin.lip.ens-lyon.fr 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_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) 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: -3.3 (---) https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html says about the target rules: .POSIX The application shall ensure that this special target is specified without prerequisites or commands. If it appears as the first non-comment line in the makefile, /make/ shall process the makefile as specified by this section; otherwise, the behavior of /make/ is unspecified. But even though one may add a .POSIX target as the first non-comment line in one's Makefile.am file, Automake will add various non-comment lines before this target in the generated Makefile. I received a remark about that for GNU MPFR. Though GNU make does not require this target to be the first non-comment line, this may matter with other make implementations. This could be done either by detecting a .POSIX target in Makefile.am or with some AM_* macro in the configure.ac file. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) From unknown Sat Aug 16 15:59:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55025: Automake should allow one to enable POSIX make behavior Resent-From: Mike Frysinger Original-Sender: "Debbugs-submit" Resent-CC: bug-automake@gnu.org Resent-Date: Fri, 13 Jan 2023 06:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55025 X-GNU-PR-Package: automake X-GNU-PR-Keywords: To: vincent@vinc17.net, 55025@debbugs.gnu.org X-Debbugs-Original-To: Vincent Lefevre , bug-automake@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16735907875471 (code B ref -1); Fri, 13 Jan 2023 06:20:01 +0000 Received: (at submit) by debbugs.gnu.org; 13 Jan 2023 06:19:47 +0000 Received: from localhost ([127.0.0.1]:49280 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGDPn-0001QA-Bq for submit@debbugs.gnu.org; Fri, 13 Jan 2023 01:19:47 -0500 Received: from lists.gnu.org ([209.51.188.17]:33328) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGDPl-0001Q2-Ee for submit@debbugs.gnu.org; Fri, 13 Jan 2023 01:19:46 -0500 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 1pGDPl-0007Tk-AJ for bug-automake@gnu.org; Fri, 13 Jan 2023 01:19:45 -0500 Received: from woodpecker.gentoo.org ([2001:470:ea4a:1:5054:ff:fec7:86e4] helo=smtp.gentoo.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1pGDPj-0005eg-MZ for bug-automake@gnu.org; Fri, 13 Jan 2023 01:19:44 -0500 Received: by smtp.gentoo.org (Postfix, from userid 559) id 186CE340955; Fri, 13 Jan 2023 06:19:41 +0000 (UTC) Date: Fri, 13 Jan 2023 01:19:39 -0500 From: Mike Frysinger Message-ID: References: <20220419153348.GD2033@cventin.lip.ens-lyon.fr> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="H/Kz3irbfGTc44XL" Content-Disposition: inline In-Reply-To: <20220419153348.GD2033@cventin.lip.ens-lyon.fr> Received-SPF: pass client-ip=2001:470:ea4a:1:5054:ff:fec7:86e4; envelope-from=vapier@gentoo.org; helo=smtp.gentoo.org X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) 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: -3.3 (---) --H/Kz3irbfGTc44XL Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 19 Apr 2022 17:33, Vincent Lefevre wrote: > https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html > says about the target rules: >=20 > .POSIX > The application shall ensure that this special target is specified > without prerequisites or commands. If it appears as the first > non-comment line in the makefile, /make/ shall process the makefile > as specified by this section; otherwise, the behavior of /make/ is > unspecified. >=20 > But even though one may add a .POSIX target as the first non-comment > line in one's Makefile.am file, Automake will add various non-comment > lines before this target in the generated Makefile. I received a > remark about that for GNU MPFR. Though GNU make does not require > this target to be the first non-comment line, this may matter with > other make implementations. >=20 > This could be done either by detecting a .POSIX target in Makefile.am > or with some AM_* macro in the configure.ac file. any reason we don't just define it ourselves unconditionally ? seems like the whole point of Automake is for devs to not worry about these kind of nitty details. -mike --- a/lib/am/header-vars.am +++ b/lib/am/header-vars.am @@ -14,6 +14,8 @@ ## You should have received a copy of the GNU General Public License ## along with this program. If not, see . =20 +.POSIX: + VPATH =3D @srcdir@ =20 @SET_MAKE@ --H/Kz3irbfGTc44XL Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmPA9/sACgkQQWM7n+g3 9YFC8hAAxmO0zT8my7TLrn28LRnGTZ4xKyvkoHX1mpmKwuRL0lEF1fpVkn7eMcr9 jFgPU+EjIb+ybcphtCrt1ZL3ItOqpVdcnUERWJIt1iiqdUSQHCyiLwPpE1nEqbjX xsgq7Pw5efFb7qXgyOtVUW3wybUNyab360UPXbJGnaZq2se5BBOgUdljR5UQJE/z 5qBa/VB8Xw6c5Y94SJ0R3Qi79IvzGqn0Y10POZqkvYoA6ejqrLP0kFonTaYDYkpJ YqS7n+Dkwn52TNlS8cgdvhjDTPPeAhN4/KaNPf+ClS2FuWK+qbPaB5APn/c1CFuy Wt3m85Aj5zFOsDV26aPamNzoR81eMzYQQK5dKvEZn9NJqcnAu6U+7Pnfn7jNoeLC 0gDtRGg6dDutZBYtCw5O7zLolZ7uCvEayhQaXJg0pxN0gEaZnQRfXWQQFf4HTujo bu/B80DcxOW1+saJSXK8JdYgjZ4tuana/42vWfcM63TnhLioC2wikkU3VRcVo3gM 5IPjR2wBsFzND3CoWxfilef6sPMt0GvpSf+SblLH5g6sopVuOmcZyBbqr/dNbiJg iCMU5ZZio7r1qj87/L0ThJfBsoW7R6DTjupGvYbozaGaiODLMfdL/sV4KLFwJ1i7 AiVhhZ74EgFQtgE+wASmc3NQRf5fmw+NP1jZ9B8bc2lT4eW3b5E= =WSSh -----END PGP SIGNATURE----- --H/Kz3irbfGTc44XL-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 13 01:20:16 2023 Received: (at control) by debbugs.gnu.org; 13 Jan 2023 06:20:16 +0000 Received: from localhost ([127.0.0.1]:49284 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGDQF-0001RS-Pv for submit@debbugs.gnu.org; Fri, 13 Jan 2023 01:20:15 -0500 Received: from woodpecker.gentoo.org ([140.211.166.183]:42114 helo=smtp.gentoo.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGDQE-0001RB-8c for control@debbugs.gnu.org; Fri, 13 Jan 2023 01:20:14 -0500 Received: by smtp.gentoo.org (Postfix, from userid 559) id A11B3340970; Fri, 13 Jan 2023 06:20:08 +0000 (UTC) From: Mike Frysinger To: control@debbugs.gnu.org Subject: Control message User-Agent: GNU debbugs/0 Message-Id: <20230113062008.A11B3340970@smtp.gentoo.org> Date: Fri, 13 Jan 2023 06:20:08 +0000 (UTC) X-Spam-Score: -2.3 (--) 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: -3.3 (---) severity 55025 wishlist tag 55025 = confirmed thankyou From unknown Sat Aug 16 15:59:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55025: Automake should allow one to enable POSIX make behavior Resent-From: Vincent Lefevre Original-Sender: "Debbugs-submit" Resent-CC: bug-automake@gnu.org Resent-Date: Fri, 13 Jan 2023 10:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55025 X-GNU-PR-Package: automake X-GNU-PR-Keywords: confirmed To: Mike Frysinger Cc: 55025@debbugs.gnu.org X-Debbugs-Original-Cc: bug-automake@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167360533625646 (code B ref -1); Fri, 13 Jan 2023 10:23:02 +0000 Received: (at submit) by debbugs.gnu.org; 13 Jan 2023 10:22:16 +0000 Received: from localhost ([127.0.0.1]:49643 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGHCS-0006fa-JH for submit@debbugs.gnu.org; Fri, 13 Jan 2023 05:22:16 -0500 Received: from lists.gnu.org ([209.51.188.17]:57368) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGHCQ-0006fO-SA for submit@debbugs.gnu.org; Fri, 13 Jan 2023 05:22:15 -0500 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 1pGHCM-0000AW-4c for bug-automake@gnu.org; Fri, 13 Jan 2023 05:22:10 -0500 Received: from joooj.vinc17.net ([2001:4b99:1:3:216:3eff:fe20:ac98]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGHCJ-0005yu-AL for bug-automake@gnu.org; Fri, 13 Jan 2023 05:22:09 -0500 Received: from smtp-zira.vinc17.net (128.119.75.86.rev.sfr.net [86.75.119.128]) by joooj.vinc17.net (Postfix) with ESMTPSA id B27F94FF; Fri, 13 Jan 2023 11:21:55 +0100 (CET) Received: by zira.vinc17.org (Postfix, from userid 1000) id 7B5E828001C9; Fri, 13 Jan 2023 11:21:55 +0100 (CET) Date: Fri, 13 Jan 2023 11:21:55 +0100 From: Vincent Lefevre Message-ID: <20230113102155.GH9012@zira.vinc17.org> Mail-Followup-To: Vincent Lefevre , Mike Frysinger , bug-automake@gnu.org References: <20220419153348.GD2033@cventin.lip.ens-lyon.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/2.2.9+60 (9917c0ea) vl-149028 (2022-12-12) Received-SPF: none client-ip=2001:4b99:1:3:216:3eff:fe20:ac98; envelope-from=vincent@vinc17.net; helo=joooj.vinc17.net 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_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) 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: -3.3 (---) On 2023-01-13 01:19:39 -0500, Mike Frysinger wrote: > any reason we don't just define it ourselves unconditionally ? seems > like the whole point of Automake is for devs to not worry about these > kind of nitty details. Probably. Note, however, that .POSIX affects GNU "make" on a few points (the default is obviously not portable, but some developers might require GNU "make", though probably for other reasons): If the '.POSIX' special target is defined then backslash/newline handling is modified slightly to conform to POSIX.2: first, whitespace preceding a backslash is not removed and second, consecutive backslash/newlines are not condensed. In particular, if this target is mentioned then recipes will be invoked as if the shell had been passed the '-e' flag: the first failing command in a recipe will cause the recipe to fail immediately. 'warning: ignoring prerequisites on suffix rule definition' According to POSIX, a suffix rule cannot contain prerequisites. If a rule that could be a suffix rule has prerequisites it is interpreted as a simple explicit rule, with an odd target name. This requirement is obeyed when POSIX-conforming mode is enabled (the '.POSIX' target is defined). In versions of GNU 'make' prior to 4.3, no warning was emitted and a suffix rule was created, however all prerequisites were ignored and were not part of the suffix rule. Starting with GNU 'make' 4.3 the behavior is the same, and in addition this warning is generated. In a future version the POSIX-conforming behavior will be the only behavior: no rule with a prerequisite can be suffix rule and this warning will be removed. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) From unknown Sat Aug 16 15:59:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55025: Automake should allow one to enable POSIX make behavior References: <20220419153348.GD2033@cventin.lip.ens-lyon.fr> Resent-From: Karl Berry Original-Sender: "Debbugs-submit" Resent-CC: bug-automake@gnu.org Resent-Date: Fri, 13 Jan 2023 23:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55025 X-GNU-PR-Package: automake X-GNU-PR-Keywords: confirmed To: vincent@vinc17.net Cc: 55025@debbugs.gnu.org, vapier@gentoo.org Received: via spool by 55025-submit@debbugs.gnu.org id=B55025.167365086829590 (code B ref 55025); Fri, 13 Jan 2023 23:02:02 +0000 Received: (at 55025) by debbugs.gnu.org; 13 Jan 2023 23:01:08 +0000 Received: from localhost ([127.0.0.1]:52677 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGT2q-0007hC-KN for submit@debbugs.gnu.org; Fri, 13 Jan 2023 18:01:08 -0500 Received: from freefriends.org ([96.88.95.60]:39482) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGT2n-0007h1-D2 for 55025@debbugs.gnu.org; Fri, 13 Jan 2023 18:01:08 -0500 X-Envelope-From: karl@freefriends.org Received: from freefriends.org (freefriends.org [96.88.95.60]) by freefriends.org (8.14.7/8.14.7) with ESMTP id 30DN13m7013922 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 13 Jan 2023 16:01:04 -0700 Received: (from apache@localhost) by freefriends.org (8.14.7/8.14.7/Submit) id 30DN13Mm013921; Fri, 13 Jan 2023 16:01:03 -0700 Date: Fri, 13 Jan 2023 16:01:03 -0700 Message-Id: <202301132301.30DN13Mm013921@freefriends.org> From: Karl Berry In-Reply-To: <20230113102155.GH9012@zira.vinc17.org> X-Spam-Score: -2.3 (--) 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: -3.3 (---) I am doubtful about blithely defining .POSIX unconditionally. I feel sure that will break existing Makefiles. I don't think we should do that. Detecting .POSIX in an existing Makefile.am and moving it to the front sounds desirable, since that is clearly what the developer intended. Another (not mutually exclusive) possibility is to add an Automake option (say, "make-posix") that outputs the .POSIX line. --thanks, karl. From unknown Sat Aug 16 15:59:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55025: Automake should allow one to enable POSIX make behavior Resent-From: Mike Frysinger Original-Sender: "Debbugs-submit" Resent-CC: bug-automake@gnu.org Resent-Date: Sat, 14 Jan 2023 05:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55025 X-GNU-PR-Package: automake X-GNU-PR-Keywords: confirmed To: Karl Berry Cc: 55025@debbugs.gnu.org, vincent@vinc17.net Received: via spool by 55025-submit@debbugs.gnu.org id=B55025.16736723635772 (code B ref 55025); Sat, 14 Jan 2023 05:00:02 +0000 Received: (at 55025) by debbugs.gnu.org; 14 Jan 2023 04:59:23 +0000 Received: from localhost ([127.0.0.1]:52993 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGYdX-0001V2-59 for submit@debbugs.gnu.org; Fri, 13 Jan 2023 23:59:23 -0500 Received: from woodpecker.gentoo.org ([140.211.166.183]:40850 helo=smtp.gentoo.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGYdU-0001Uk-S6 for 55025@debbugs.gnu.org; Fri, 13 Jan 2023 23:59:21 -0500 Received: by smtp.gentoo.org (Postfix, from userid 559) id 4143D340E13; Sat, 14 Jan 2023 04:59:15 +0000 (UTC) Date: Fri, 13 Jan 2023 23:59:12 -0500 From: Mike Frysinger Message-ID: References: <20230113102155.GH9012@zira.vinc17.org> <202301132301.30DN13Mm013921@freefriends.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="eHuFNxPHDwO2+x6M" Content-Disposition: inline In-Reply-To: <202301132301.30DN13Mm013921@freefriends.org> X-Spam-Score: -2.3 (--) 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: -3.3 (---) --eHuFNxPHDwO2+x6M Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 13 Jan 2023 16:01, Karl Berry wrote: > I am doubtful about blithely defining .POSIX unconditionally. I feel > sure that will break existing Makefiles. I don't think we should do that. >=20 > Detecting .POSIX in an existing Makefile.am and moving it to the front > sounds desirable, since that is clearly what the developer intended. >=20 > Another (not mutually exclusive) possibility is to add an Automake > option (say, "make-posix") that outputs the .POSIX line. --thanks, karl. i'd be amenable to a `no-make-posix` option, but imo forcing people to opt-in to the right behavior is the wrong mental model. i'm also a bit skeptical of the idea that we're breaking makefiles. if an implementation is POSIX compliant, then it already behaves as POSIX defines make. as it stands now, we, and our users, are generating files that target an undefined standard that no one agrees on, cannot be tested or asserted, and maybe they happen to work on the developer's desktop, but not on random users of their own. by defining .POSIX, we turn the state =66rom "usually works, but sometimes fails" to "either works or fails, but it's the same everywhere". i grok that not everyone is POSIX-compliant, and we sometimes try to add support for such systems where reasonable, but that's a case-by-case, and we can't keep bending over backwards to support decades old dead software that no one uses. -mike --eHuFNxPHDwO2+x6M Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmPCNqAACgkQQWM7n+g3 9YFkIhAA4igrcY0v6iJVBOqz35Mm3veXuS/uyKOJupEjI9cMdJCWsa73PkkiEPeA eFPSmwzFmtAx/oWvZind4m1ZlTJvenLZJk7V0QY6ZVzh9dlB4gtrIzj4x2e4bMuX 8njoMgAAlFakxJY7LqzbN0jVVCEyc2qptCC1//aaN3t7eEgktF+l/g/IQ8hQ9gCc 0nlpPfTs3AslSDOd/q+h8JMW7ip/+orXLZ8GQCHBtqB5EFkjAnGxFT2iQBRK9bTl b4+s3z1fgMgZ22/feabl/hcHLLPHagCucK0F1UHNHhsgmKXpe/oW1Zb39NLCQYd6 t2D3pyAIWRzJweFWrBPkHsZfdRo1F5MV9jx4R9esD3aYmB1tSmeQrICQ+LRLARdM Avji5v1kABXRshr1dzUlKvwTmIyBoGOGut8kCOTfJ8+eV9dLH5MZoApxHbX1D+Z9 VOrxxICWY/eOuXG1WopzoLEJ6nsK5m3CVbqw3H0TQozFeNz15NVazLwa/eH/u7ns jUYwWRZFlxEmxddX+uZoULwU0y6Ja5osEqEJAq/7eWWnlBRLdn3LucMcW1g7Px9J mUqyvPkXDpG6UaCpcsV1Oz8nAaPw+FGIGZMcLohNU8ALyk4IU8YPhooEbWJVM0ND iZiIrzsRkvLkxWmI+RklO/JXUH/VNW4zA4lFt2mLhNh8iywrP38= =oO2X -----END PGP SIGNATURE----- --eHuFNxPHDwO2+x6M-- From unknown Sat Aug 16 15:59:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55025: Automake should allow one to enable POSIX make behavior Resent-From: Nick Bowler Original-Sender: "Debbugs-submit" Resent-CC: bug-automake@gnu.org Resent-Date: Sat, 14 Jan 2023 06:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55025 X-GNU-PR-Package: automake X-GNU-PR-Keywords: confirmed To: Mike Frysinger Cc: 55025@debbugs.gnu.org, vincent@vinc17.net, Karl Berry Received: via spool by 55025-submit@debbugs.gnu.org id=B55025.167367783324947 (code B ref 55025); Sat, 14 Jan 2023 06:31:02 +0000 Received: (at 55025) by debbugs.gnu.org; 14 Jan 2023 06:30:33 +0000 Received: from localhost ([127.0.0.1]:53038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGa3l-0006UI-9W for submit@debbugs.gnu.org; Sat, 14 Jan 2023 01:30:33 -0500 Received: from mail-vk1-f177.google.com ([209.85.221.177]:47020) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGa3i-0006PA-Ox for 55025@debbugs.gnu.org; Sat, 14 Jan 2023 01:30:31 -0500 Received: by mail-vk1-f177.google.com with SMTP id q141so8531670vkb.13 for <55025@debbugs.gnu.org>; Fri, 13 Jan 2023 22:30:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=draconx-ca.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=tMbmsSIUOKcTrjtdR588H5SpzdC3uhpya02NO88z0ZY=; b=N7Ko+uzLbmGHDOxyMVAAluE4UNhu+IIl1NyIpSQaFfA14kw7ir6Mgl/pNtzUTpuT9g 7uuYngCoRtiJrJ4vpOkAePUPPSvm6dyc9ReNicsFTAHt7M+8Gv64jelKx4QjmeUsDN1R v5FhswMc332TK8GV9N2dR1WoUVNHhkJByTL8kZ5B8+RZ7Yhs16X46QHTz5IXKnw7WGw+ ekHc4AU8erf0Mg0hUVDCvBWXneYzdibxL8UpivFVXH94fIH2UghlgZLp6WJ3sf9Tlk4w 6iHO/c5VDWXNRWBDwq7EzqGDX88JvKWRCBAQrm0a/1RsBdcDsH2PEBlh2nhZn6ZD5q0I kTvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tMbmsSIUOKcTrjtdR588H5SpzdC3uhpya02NO88z0ZY=; b=Y8oNbUKaW3b6OdSQIUA64w8BzvLc5wyAR4ZG0pdMY7oeUrPx9VOO7iV4s70nyffesB HthhUT5OeUHbo9DK9xioxeruMNicADti5hEsPqUBaSY8UEkNBMQhIqbI6APx3cuF8KQd YJWANVYTTs4mRd0MrQP0Bj0SKqbleNbGS4ES5OpRejIgUWgEFF+wXHYHEhoCDoFOI3X6 TT24NheqnExeYdk8EXomTBtGYCdW+voES12cBL/x7YDls5EsmiP3kYlBDggqcVmpCQTY ykCDbVKjkZD7cGZO0Y2xJqG7UWElSftK4v97fpmJlsPse9K1F7DDJ9LkbVl/JxBG77gW 5mfQ== X-Gm-Message-State: AFqh2kp28MhNQEj34Nh2qvmGQX0p2BvSHwNxFACp9QNIZWNinv8b7y9k VC50OQdLtEHpadgu/4yCDWxiTBAQB02zyV7FAkZyLQ== X-Google-Smtp-Source: AMrXdXvYwUhmcqj/RcfPxYPQvtwxVcJqtn6XcOvGTHTfQ5CMVS2Rd9JseqhpaRKb2cWc80wfj/LEd0m7Mi4oRPxf8eE= X-Received: by 2002:a1f:a103:0:b0:3b7:69d0:13ed with SMTP id k3-20020a1fa103000000b003b769d013edmr10361568vke.14.1673677825080; Fri, 13 Jan 2023 22:30:25 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a05:6130:1015:b0:559:9619:d862 with HTTP; Fri, 13 Jan 2023 22:30:24 -0800 (PST) X-Originating-IP: [24.53.241.20] In-Reply-To: References: <20230113102155.GH9012@zira.vinc17.org> <202301132301.30DN13Mm013921@freefriends.org> From: Nick Bowler Date: Sat, 14 Jan 2023 01:30:24 -0500 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) 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 (-) On 2023-01-13, Mike Frysinger wrote: > On 13 Jan 2023 16:01, Karl Berry wrote: >> I am doubtful about blithely defining .POSIX unconditionally. I feel >> sure that will break existing Makefiles. I don't think we should do that. >> >> Detecting .POSIX in an existing Makefile.am and moving it to the front >> sounds desirable, since that is clearly what the developer intended. >> >> Another (not mutually exclusive) possibility is to add an Automake >> option (say, "make-posix") that outputs the .POSIX line. --thanks, karl. > > i'd be amenable to a `no-make-posix` option, but imo forcing people to > opt-in to the right behavior is the wrong mental model. Does adding .POSIX: to a Makefile actually solve any real-world portability problem with Automake generated makefiles, or is all of this just hypothetical? Because we shouldn't go changing default behaviour to solve imaginary problems ... > i'm also a bit skeptical of the idea that we're breaking makefiles. ... and adding this to a Makefile really does change the behaviour significantly on at least one popular make implementation (GNU make). I imagine a lot of people who are unfamiliar with traditional UNIX implementations would be very surprised to see gmake suddenly start running their rules using /bin/sh -e, which is probably the most obvious effect that the .POSIX special target has on this particular implementation. And it doesn't even seem to work to get GNU make to follow the POSIX behaviour, as POSIX says -e is NOT used whenever errors are being suppressed (that is, when running commands that start with a -, or if the .IGNORE: special target is present in the makefile, or if make is run with the -i option). GNU make appears to just always run the shell with -e if you include the .POSIX special target. Even then, portable makefiles can't rely on the shell being run with -e even normally, as NetBSD make does not do this. I tried several other implementations and they follow the POSIX behaviour by default, adding -e only when errors are not suppressed. > if an implementation is POSIX compliant, then it already behaves as > POSIX defines make. as it stands now, we, and our users, are > generating files that target an undefined standard that no one agrees > on, cannot be tested or asserted, and maybe they happen to work on the > developer's desktop, but not on random users of their own. by > defining .POSIX, we turn the state from "usually works, but sometimes > fails" to "either works or fails, but it's the same everywhere". Unfortunately, reality is messy. GNU's behaviour means that adding .POSIX: actually means that with this specific behaviour (whether or not the shell is run with "-e"), you now have to consider three possibilities instead of just two. Consider these two Makefiles, identical except for the presence of the .POSIX special target: % cat >noposix.mk <<'EOF' craziness: @-false; echo hello @false; echo hello EOF % cat >posix.mk <<'EOF' .POSIX: craziness: @-false; echo hello @false; echo hello EOF GNU: % gmake -f noposix.mk hello hello % gmake -f posix.mk gmake: [posix.mk:3: craziness] Error 1 (ignored) gmake: *** [posix.mk:4: craziness] Error 1 NetBSD: % make -f noposix.mk hello hello % make -f posix.mk hello hello HP-UX 11: (this is the actual POSIX-specified behaviour which I also observed on multiple other systems): % make -f noposix.mk hello *** Error exit code 1 Stop. % make -f posix.mk hello *** Error exit code 1 Cheers, Nick From unknown Sat Aug 16 15:59:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55025: Automake should allow one to enable POSIX make behavior Resent-From: Mike Frysinger Original-Sender: "Debbugs-submit" Resent-CC: bug-automake@gnu.org Resent-Date: Sat, 14 Jan 2023 07:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55025 X-GNU-PR-Package: automake X-GNU-PR-Keywords: confirmed To: Nick Bowler Cc: 55025@debbugs.gnu.org, vincent@vinc17.net, Karl Berry Received: via spool by 55025-submit@debbugs.gnu.org id=B55025.167368003728803 (code B ref 55025); Sat, 14 Jan 2023 07:08:02 +0000 Received: (at 55025) by debbugs.gnu.org; 14 Jan 2023 07:07:17 +0000 Received: from localhost ([127.0.0.1]:53082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGadJ-0007UV-AZ for submit@debbugs.gnu.org; Sat, 14 Jan 2023 02:07:17 -0500 Received: from woodpecker.gentoo.org ([140.211.166.183]:52278 helo=smtp.gentoo.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGadH-0007UH-SI for 55025@debbugs.gnu.org; Sat, 14 Jan 2023 02:07:16 -0500 Received: by smtp.gentoo.org (Postfix, from userid 559) id A55DF340E06; Sat, 14 Jan 2023 07:07:09 +0000 (UTC) Date: Sat, 14 Jan 2023 02:07:07 -0500 From: Mike Frysinger Message-ID: References: <20230113102155.GH9012@zira.vinc17.org> <202301132301.30DN13Mm013921@freefriends.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hnMIe5LekbqtIzcr" Content-Disposition: inline In-Reply-To: X-Spam-Score: -2.3 (--) 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: -3.3 (---) --hnMIe5LekbqtIzcr Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 14 Jan 2023 01:30, Nick Bowler wrote: > On 2023-01-13, Mike Frysinger wrote: > > On 13 Jan 2023 16:01, Karl Berry wrote: > >> I am doubtful about blithely defining .POSIX unconditionally. I feel > >> sure that will break existing Makefiles. I don't think we should do th= at. > >> > >> Detecting .POSIX in an existing Makefile.am and moving it to the front > >> sounds desirable, since that is clearly what the developer intended. > >> > >> Another (not mutually exclusive) possibility is to add an Automake > >> option (say, "make-posix") that outputs the .POSIX line. --thanks, kar= l. > > > > i'd be amenable to a `no-make-posix` option, but imo forcing people to > > opt-in to the right behavior is the wrong mental model. >=20 > Does adding .POSIX: to a Makefile actually solve any real-world > portability problem with Automake generated makefiles, or is all of > this just hypothetical? >=20 > Because we shouldn't go changing default behaviour to solve imaginary > problems ... >=20 > > i'm also a bit skeptical of the idea that we're breaking makefiles. >=20 > ... and adding this to a Makefile really does change the behaviour > significantly on at least one popular make implementation (GNU make). >=20 > I imagine a lot of people who are unfamiliar with traditional UNIX > implementations would be very surprised to see gmake suddenly start > running their rules using /bin/sh -e, which is probably the most > obvious effect that the .POSIX special target has on this particular > implementation. >=20 > And it doesn't even seem to work to get GNU make to follow the POSIX > behaviour, as POSIX says -e is NOT used whenever errors are being > suppressed (that is, when running commands that start with a -, or > if the .IGNORE: special target is present in the makefile, or if > make is run with the -i option). GNU make appears to just always > run the shell with -e if you include the .POSIX special target. if this is the case, then it sounds like a bug. at a glance, i don't see a report in the upstream tracker, so can you throw one up there if you have a test case that shows the problem ? > Even then, portable makefiles can't rely on the shell being run > with -e even normally, as NetBSD make does not do this. >=20 > I tried several other implementations and they follow the POSIX > behaviour by default, adding -e only when errors are not suppressed. this is exactly my point. if i'm developing a project with automake and i'm using gnu make, i can easily produce bad code that is not portable. but the insidious part is that it doesn't fail for me, it fails for my users who are not using gnu make, but using a POSIX-compliant implementation that respects the `set -e` behavior. the reason i use automake in my projects in the first place is to produce a build env that is reasonably portable, and if i have to write custom hooks, to help steer me away from non-POSIX (i.e. things likely to not be portable) constructs. -mike --hnMIe5LekbqtIzcr Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmPCVJsACgkQQWM7n+g3 9YE3KhAAyHT+Di6ucehBWftOP1xAGPY/r/g2iNtVWNDtyWvcBy8StfEcd0QZNuxx xXYpoRQOgF5LeHITVAqGpO++hBKUFWwrPknd7AZmCccSBeKfTKYYhmEiHOCzZg7O xDvzB/Va/PkCiIhc5MiHP44eLqCHANl6wI1HCXoCY2ZFRNuoZHT+FSRPLv5dZ4v1 ZymJ2t440BnVf5mAfMXtfWEpkxeXL2Le0A/aNrYwi34Gm7fJqr8qZ9F3qKNCDTKJ y3Vqrzmly00F+NIfd7neJtLG6CKDLhEPjz3hx2paJoKTiB23q96Nqkh4tIB63yRi jf8tv37DDtdzMaAHNgttRfd6YiuxTT90hUaClTPWAzZAyDwk+cA1shh6yXIC38BP V2jrBneaUH+7sMB+vEeeBdmQHxqwR8kfhueMH1kAA42kc02FgbvylgrNnYiB6Bfw h3Iy69FT7VZcz6eScyIGg7ItvVXVxkybeHqNKzhgHVwnjWLzSrvQtTs1gFE3LHNs kpbykk73edudVR+vp4aqwH3y8U9ZV5841OOQ1RHfpBOdZdGVlZjeV9l6PAvrCAsX kKLdrG+Hp6WSmdB6ZPE6MO1CElUzUYXMwe2r8YZgJB4bT8E+ZmmaURbHOsgbyq4k Qcd1ejm/Y3t8pwu4Tlqr1vG0OGsE9jD48K/eN3qNzmSCOR0k/uQ= =3ELm -----END PGP SIGNATURE----- --hnMIe5LekbqtIzcr-- From unknown Sat Aug 16 15:59:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55025: Automake should allow one to enable POSIX make behavior Resent-From: Nick Bowler Original-Sender: "Debbugs-submit" Resent-CC: bug-automake@gnu.org Resent-Date: Sat, 14 Jan 2023 08:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55025 X-GNU-PR-Package: automake X-GNU-PR-Keywords: confirmed To: Mike Frysinger Cc: 55025@debbugs.gnu.org, vincent@vinc17.net, Karl Berry Received: via spool by 55025-submit@debbugs.gnu.org id=B55025.167368501114520 (code B ref 55025); Sat, 14 Jan 2023 08:31:01 +0000 Received: (at 55025) by debbugs.gnu.org; 14 Jan 2023 08:30:11 +0000 Received: from localhost ([127.0.0.1]:53287 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGbvW-0003m5-M2 for submit@debbugs.gnu.org; Sat, 14 Jan 2023 03:30:11 -0500 Received: from mail-ua1-f43.google.com ([209.85.222.43]:46711) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGbvU-0003ko-Ka for 55025@debbugs.gnu.org; Sat, 14 Jan 2023 03:30:09 -0500 Received: by mail-ua1-f43.google.com with SMTP id i23so1733698ual.13 for <55025@debbugs.gnu.org>; Sat, 14 Jan 2023 00:30:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=draconx-ca.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=hW+5dajZS9gEwmuDIxfffwsFzK5mKFsZjFBzbA4rHlg=; b=a4gJWml3hmfMZgjpV0mxmCTqbkXujQsDN2WxIyopaH9RLaoEkUI2SrQYaJJL/uXol/ MzG2ERO6V4ESTuigeaAoY1N2mH82mdn0i/Z4HWjp67+E+IYCxJtLpucTYEzMmuDmeNFw MG7WxcZ96qML7IM24pjxtjdOY9vIIFLT2zgiav9lOZq4ZSKQjpH1E66zxzlLg5Ukoh+7 raWdRZSWm7oAyhJ0PKBj5j9+Wc/SiKzjT60ByBG6AmCDBO87wBZ/OF5dLnq4tTi37fAx CeXYAEZ5s5dNBkVCf+jgyocE735Q3aV4lZiB1jsjYYwV2F6NPvip2ZEGE445x4lVmGNC 6O6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hW+5dajZS9gEwmuDIxfffwsFzK5mKFsZjFBzbA4rHlg=; b=oRtCo5mCnpcpS6S7O0E3wkGHay2etD/WzLAtinsNnB2H0A/nb5sLNIrG+r9huEwGqn BkyCE4dwbHwo7jRmIiU+N+bKPO3kogLwHL5vuRJNgqGbrZkoS1nGFdCtTGpJlvTe9GX9 0IdTa5wTX5FgGTHOEfqPWfFMB2s5zZO2TrFSKBxfGrgoEUK1zR86TL4F3JaTaKKovrWh o4+RycMVnicOllrBqOAH6xlMqdmhW90GDRJR5uyBu1hg2W2f7gLS780k8uZVP3UEdu5h vTAgIMBo02yPan17joAULgHsIkWDA2IfkmML2lswD6ir8lvrLGd8zLdKUS66NlNoMBGt KVOw== X-Gm-Message-State: AFqh2kr+fUHwcfmxEeQvkxpQZOU/d1PRHrb88EaG/TV1HTkCafx/CI1+ 7x0jyP+X4F+izRDiUiy0LCfTwNKXq1zh5Dm/5s+ERg== X-Google-Smtp-Source: AMrXdXvUyqUeWdfG/Y3XH5wiE7K9sebGzrI0bAamHpdKw4R+JpeA3kUJ5QXr6YFNDTGW+yZ5qsg0RQFsT/KpRPfeUng= X-Received: by 2002:ab0:3d9d:0:b0:5f0:4676:e4f1 with SMTP id l29-20020ab03d9d000000b005f04676e4f1mr1036303uac.44.1673685003111; Sat, 14 Jan 2023 00:30:03 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a05:6130:1015:b0:559:9619:d862 with HTTP; Sat, 14 Jan 2023 00:30:02 -0800 (PST) X-Originating-IP: [24.53.241.20] In-Reply-To: References: <20230113102155.GH9012@zira.vinc17.org> <202301132301.30DN13Mm013921@freefriends.org> From: Nick Bowler Date: Sat, 14 Jan 2023 03:30:02 -0500 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) 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 (-) On 14/01/2023, Mike Frysinger wrote: [...] >> I tried several other implementations and they follow the POSIX >> behaviour by default, adding -e only when errors are not suppressed. > > this is exactly my point. if i'm developing a project with automake > and i'm using gnu make, i can easily produce bad code that is not > portable. but the insidious part is that it doesn't fail for me, it > fails for my users who are not using gnu make, but using a > POSIX-compliant implementation that respects the `set -e` behavior. But as I demonstrated, adding .POSIX doesn't actually make GNU make work the same as these "POSIX-by-default" implementations. It just gives it a different, GNU-specific behaviour, since GNU make apparently enables -e regardless of whether or not errors are suppressed. Does changing the behaviour in this way really improve anything for a maintainer that is only testing with GNU make? Without putting .POSIX in the Makefile, GNU is at least consistent with NetBSD here (which never uses -e) and probably also other modern BSD derivatives, as I think many have these days adopted NetBSD make. Cheers, Nick From unknown Sat Aug 16 15:59:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55025: Automake should allow one to enable POSIX make behavior References: <20220419153348.GD2033@cventin.lip.ens-lyon.fr> Resent-From: Karl Berry Original-Sender: "Debbugs-submit" Resent-CC: bug-automake@gnu.org Resent-Date: Sat, 14 Jan 2023 22:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55025 X-GNU-PR-Package: automake X-GNU-PR-Keywords: confirmed To: vapier@gentoo.org Cc: nbowler@draconx.ca, 55025@debbugs.gnu.org, vincent@vinc17.net Received: via spool by 55025-submit@debbugs.gnu.org id=B55025.167373371210222 (code B ref 55025); Sat, 14 Jan 2023 22:02:02 +0000 Received: (at 55025) by debbugs.gnu.org; 14 Jan 2023 22:01:52 +0000 Received: from localhost ([127.0.0.1]:55700 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGob2-0002eo-KD for submit@debbugs.gnu.org; Sat, 14 Jan 2023 17:01:52 -0500 Received: from freefriends.org ([96.88.95.60]:60692) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGob0-0002eg-PZ for 55025@debbugs.gnu.org; Sat, 14 Jan 2023 17:01:51 -0500 X-Envelope-From: karl@freefriends.org Received: from freefriends.org (freefriends.org [96.88.95.60]) by freefriends.org (8.14.7/8.14.7) with ESMTP id 30EM1nGs009877 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 14 Jan 2023 15:01:50 -0700 Received: (from apache@localhost) by freefriends.org (8.14.7/8.14.7/Submit) id 30EM1m3H009876; Sat, 14 Jan 2023 15:01:48 -0700 Date: Sat, 14 Jan 2023 15:01:48 -0700 Message-Id: <202301142201.30EM1m3H009876@freefriends.org> From: Karl Berry In-Reply-To: X-Spam-Score: -2.3 (--) 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: -3.3 (---) Mike, if you want to make an option that lets people have .POSIX if they want it (and/or recognize .POSIX in the Makefile.am), fine. Please don't foist it on the rest of us. As Nick has shown, I feel pretty sure the change would break a lot of existing projects, which IMHO is something to avoid at all costs. The benefit here does not seem nearly worth it to me. --thanks, karl. From unknown Sat Aug 16 15:59:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55025: Automake should allow one to enable POSIX make behavior References: <20220419153348.GD2033@cventin.lip.ens-lyon.fr> Resent-From: Karl Berry Original-Sender: "Debbugs-submit" Resent-CC: bug-automake@gnu.org Resent-Date: Sat, 14 Jan 2023 22:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55025 X-GNU-PR-Package: automake X-GNU-PR-Keywords: confirmed To: vapier@gentoo.org Cc: nbowler@draconx.ca, 55025@debbugs.gnu.org, vincent@vinc17.net Received: via spool by 55025-submit@debbugs.gnu.org id=B55025.167373432311142 (code B ref 55025); Sat, 14 Jan 2023 22:13:02 +0000 Received: (at 55025) by debbugs.gnu.org; 14 Jan 2023 22:12:03 +0000 Received: from localhost ([127.0.0.1]:55716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGokt-0002td-Hf for submit@debbugs.gnu.org; Sat, 14 Jan 2023 17:12:03 -0500 Received: from freefriends.org ([96.88.95.60]:60820) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGoks-0002tF-9A for 55025@debbugs.gnu.org; Sat, 14 Jan 2023 17:12:02 -0500 X-Envelope-From: karl@freefriends.org Received: from freefriends.org (freefriends.org [96.88.95.60]) by freefriends.org (8.14.7/8.14.7) with ESMTP id 30EMC0Dr011284 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 14 Jan 2023 15:12:01 -0700 Received: (from apache@localhost) by freefriends.org (8.14.7/8.14.7/Submit) id 30EMC0Tu011283; Sat, 14 Jan 2023 15:12:00 -0700 Date: Sat, 14 Jan 2023 15:12:00 -0700 Message-Id: <202301142212.30EMC0Tu011283@freefriends.org> From: Karl Berry In-Reply-To: X-Spam-Score: -2.3 (--) 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: -3.3 (---) P.S. I note that GNU make just made an alpha release. If anyone wants to report the purported .POSIX bug, might be a good time. From unknown Sat Aug 16 15:59:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55025: Automake should allow one to enable POSIX make behavior Resent-From: Vincent Lefevre Original-Sender: "Debbugs-submit" Resent-CC: bug-automake@gnu.org Resent-Date: Sun, 15 Jan 2023 00:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55025 X-GNU-PR-Package: automake X-GNU-PR-Keywords: confirmed To: Nick Bowler Cc: 55025@debbugs.gnu.org, Mike Frysinger , Karl Berry Received: via spool by 55025-submit@debbugs.gnu.org id=B55025.167374415926745 (code B ref 55025); Sun, 15 Jan 2023 00:56:02 +0000 Received: (at 55025) by debbugs.gnu.org; 15 Jan 2023 00:55:59 +0000 Received: from localhost ([127.0.0.1]:55798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGrJW-0006xJ-Rq for submit@debbugs.gnu.org; Sat, 14 Jan 2023 19:55:59 -0500 Received: from joooj.vinc17.net ([155.133.131.76]:38020) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGrJS-0006x6-4K for 55025@debbugs.gnu.org; Sat, 14 Jan 2023 19:55:57 -0500 Received: from smtp-zira.vinc17.net (128.119.75.86.rev.sfr.net [86.75.119.128]) by joooj.vinc17.net (Postfix) with ESMTPSA id ACAC7310; Sun, 15 Jan 2023 01:55:51 +0100 (CET) Received: by zira.vinc17.org (Postfix, from userid 1000) id 7CFC52800228; Sun, 15 Jan 2023 01:55:51 +0100 (CET) Date: Sun, 15 Jan 2023 01:55:51 +0100 From: Vincent Lefevre Message-ID: <20230115005551.GO9012@zira.vinc17.org> References: <20230113102155.GH9012@zira.vinc17.org> <202301132301.30DN13Mm013921@freefriends.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/2.2.9+60 (9917c0ea) vl-149028 (2022-12-12) X-Spam-Score: 0.0 (/) 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 (-) On 2023-01-14 01:30:24 -0500, Nick Bowler wrote: > Does adding .POSIX: to a Makefile actually solve any real-world > portability problem with Automake generated makefiles, or is all of > this just hypothetical? For MPFR, when I initially added it, this was just in case. The real issue at that time was that I was using $< in a case where it was unspecified by POSIX, and this was failing on FreeBSD. Unfortunately there doesn't seem to be a way to get a failure on non-portable features (which would ease maintenance). Though I test the tarball on various systems before a release candidate, this is not the case of the development branch (and the Makefiles would typically be more affected than the C code, on which various portability checks are done under Linux). Well, I use autoreconf with --warnings=all,error (passed to automake), but I didn't get any portability error. Later I noted: # The ".POSIX" line is needed in particular for GNU "make", so that # recipes are invoked as if the shell had been passed the -e flag. as this is really what we want, both for consistency with other "make" implementations and to be able to detect errors. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) From unknown Sat Aug 16 15:59:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55025: Automake should allow one to enable POSIX make behavior Resent-From: Vincent Lefevre Original-Sender: "Debbugs-submit" Resent-CC: bug-automake@gnu.org Resent-Date: Sun, 15 Jan 2023 02:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55025 X-GNU-PR-Package: automake X-GNU-PR-Keywords: confirmed To: Karl Berry Cc: nbowler@draconx.ca, 55025@debbugs.gnu.org, vapier@gentoo.org Received: via spool by 55025-submit@debbugs.gnu.org id=B55025.1673748114954 (code B ref 55025); Sun, 15 Jan 2023 02:02:01 +0000 Received: (at 55025) by debbugs.gnu.org; 15 Jan 2023 02:01:54 +0000 Received: from localhost ([127.0.0.1]:55858 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGsLK-0000FI-97 for submit@debbugs.gnu.org; Sat, 14 Jan 2023 21:01:54 -0500 Received: from joooj.vinc17.net ([155.133.131.76]:46090) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGsLF-0000F7-W0 for 55025@debbugs.gnu.org; Sat, 14 Jan 2023 21:01:53 -0500 Received: from smtp-zira.vinc17.net (128.119.75.86.rev.sfr.net [86.75.119.128]) by joooj.vinc17.net (Postfix) with ESMTPSA id B86CA310; Sun, 15 Jan 2023 03:01:48 +0100 (CET) Received: by zira.vinc17.org (Postfix, from userid 1000) id 815A42800228; Sun, 15 Jan 2023 03:01:48 +0100 (CET) Date: Sun, 15 Jan 2023 03:01:48 +0100 From: Vincent Lefevre Message-ID: <20230115020148.GA1711498@zira.vinc17.org> References: <202301142212.30EMC0Tu011283@freefriends.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <202301142212.30EMC0Tu011283@freefriends.org> X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/2.2.9+60 (9917c0ea) vl-149028 (2022-12-12) X-Spam-Score: 0.0 (/) 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 (-) On 2023-01-14 15:12:00 -0700, Karl Berry wrote: > P.S. I note that GNU make just made an alpha release. If anyone > wants to report the purported .POSIX bug, might be a good time. I've just reported it: https://savannah.gnu.org/bugs/index.php?63667 -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) From unknown Sat Aug 16 15:59:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55025: Automake should allow one to enable POSIX make behavior Resent-From: Vincent Lefevre Original-Sender: "Debbugs-submit" Resent-CC: bug-automake@gnu.org Resent-Date: Mon, 02 Oct 2023 14:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55025 X-GNU-PR-Package: automake X-GNU-PR-Keywords: confirmed To: 55025@debbugs.gnu.org Received: via spool by 55025-submit@debbugs.gnu.org id=B55025.16962566587214 (code B ref 55025); Mon, 02 Oct 2023 14:25:02 +0000 Received: (at 55025) by debbugs.gnu.org; 2 Oct 2023 14:24:18 +0000 Received: from localhost ([127.0.0.1]:37662 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnJqL-0001sI-My for submit@debbugs.gnu.org; Mon, 02 Oct 2023 10:24:18 -0400 Received: from joooj.vinc17.net ([2001:4b99:1:3:216:3eff:fe20:ac98]:40480) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnJqJ-0001s6-NM for 55025@debbugs.gnu.org; Mon, 02 Oct 2023 10:24:16 -0400 Received: from smtp-zira.vinc17.net (135.197.67.86.rev.sfr.net [86.67.197.135]) by joooj.vinc17.net (Postfix) with ESMTPSA id AB9AA210; Mon, 2 Oct 2023 16:23:55 +0200 (CEST) Received: by zira.vinc17.org (Postfix, from userid 1000) id 7ACD628001DF; Mon, 2 Oct 2023 16:23:55 +0200 (CEST) Date: Mon, 2 Oct 2023 16:23:55 +0200 From: Vincent Lefevre Message-ID: <20231002142355.GA404274@zira.vinc17.org> References: <20230113102155.GH9012@zira.vinc17.org> <202301132301.30DN13Mm013921@freefriends.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/2.2.12+67 (757ca3b3) vl-149028 (2023-09-09) X-Spam-Score: 0.0 (/) 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 (-) On 2023-01-14 01:30:24 -0500, Nick Bowler wrote: > Consider these two Makefiles, identical except for the presence of > the .POSIX special target: > > % cat >noposix.mk <<'EOF' > craziness: > @-false; echo hello > @false; echo hello > EOF > > % cat >posix.mk <<'EOF' > .POSIX: > craziness: > @-false; echo hello > @false; echo hello > EOF [...] > HP-UX 11: > > (this is the actual POSIX-specified behaviour which I also observed on > multiple other systems): > > % make -f noposix.mk > hello > *** Error exit code 1 > > Stop. > > % make -f posix.mk > hello > *** Error exit code 1 Same behavior on AIX, i.e. the .POSIX special target is useless for *this* example. However, if it is not the first non-comment line, I get a warning: warning: .POSIX directive is not first non-comment line. (found during my test of GNU MPFR on cfarm119.cfarm.net). Note that its "make" man page says: .POSIX Causes the make command to use a different default rules file. The file, /usr/ccs/lib/posix.mk, provides the default rules as specified in the POSIX standard. but I don't know whether this changes the behavior with Automake. If /usr/ccs/lib/posix.mk is included when the .POSIX directive is read, the fact that it is not the first non-comment line might cause issues. For instance, this file (re)defines some variables: MAKE=make AR=ar ARFLAGS=-rv YACC=yacc YFLAGS= LEX=lex LFLAGS= LDFLAGS= CC=c89 CFLAGS=-O FC=fort77 FFLAGS=-O 1 GET=get GFLAGS= So this is expected to be found early in the makefile. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) From unknown Sat Aug 16 15:59:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55025: Automake should allow one to enable POSIX make behavior References: <20220419153348.GD2033@cventin.lip.ens-lyon.fr> Resent-From: Karl Berry Original-Sender: "Debbugs-submit" Resent-CC: bug-automake@gnu.org Resent-Date: Mon, 02 Oct 2023 21:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55025 X-GNU-PR-Package: automake X-GNU-PR-Keywords: confirmed To: vincent@vinc17.net Cc: 55025@debbugs.gnu.org Received: via spool by 55025-submit@debbugs.gnu.org id=B55025.169628145431326 (code B ref 55025); Mon, 02 Oct 2023 21:18:02 +0000 Received: (at 55025) by debbugs.gnu.org; 2 Oct 2023 21:17:34 +0000 Received: from localhost ([127.0.0.1]:38153 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnQII-00089B-3A for submit@debbugs.gnu.org; Mon, 02 Oct 2023 17:17:34 -0400 Received: from frenzy.freefriends.org ([198.99.81.75]:54720 helo=freefriends.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnQIF-000891-Uf for 55025@debbugs.gnu.org; Mon, 02 Oct 2023 17:17:32 -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 392LHDgj003640 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 2 Oct 2023 15:17:13 -0600 Received: (from apache@localhost) by freefriends.org (8.14.7/8.14.7/Submit) id 392LHDeU003639; Mon, 2 Oct 2023 15:17:13 -0600 Date: Mon, 2 Oct 2023 15:17:13 -0600 Message-Id: <202310022117.392LHDeU003639@freefriends.org> From: Karl Berry In-Reply-To: <20231002142355.GA404274@zira.vinc17.org> X-Spam-Score: -0.0 (/) 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 (-) Sorry, I don't understand what you want Automake to do. Right now, as far as I can tell, Automake does nothing with .POSIX. It's not mentioned in the manual nor, as far as I can grep, the code. Maybe that's the issue, and you want a leading .POSIX in your Makefile.am to be specially copied at the beginning of the output Makefile.in? (Or an option, or something.) But ... have you tried to run a Makefile originating from Automake with .POSIX in effect? I feel doubtful that it will work, although I don't know it for a fact. -k From unknown Sat Aug 16 15:59:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55025: Automake should allow one to enable POSIX make behavior Resent-From: Vincent Lefevre Original-Sender: "Debbugs-submit" Resent-CC: bug-automake@gnu.org Resent-Date: Mon, 02 Oct 2023 23:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55025 X-GNU-PR-Package: automake X-GNU-PR-Keywords: confirmed To: Karl Berry Cc: 55025@debbugs.gnu.org Received: via spool by 55025-submit@debbugs.gnu.org id=B55025.169628878012102 (code B ref 55025); Mon, 02 Oct 2023 23:20:02 +0000 Received: (at 55025) by debbugs.gnu.org; 2 Oct 2023 23:19:40 +0000 Received: from localhost ([127.0.0.1]:38224 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnSCS-000398-0G for submit@debbugs.gnu.org; Mon, 02 Oct 2023 19:19:40 -0400 Received: from joooj.vinc17.net ([2001:4b99:1:3:216:3eff:fe20:ac98]:60502) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnSCP-00038w-7k for 55025@debbugs.gnu.org; Mon, 02 Oct 2023 19:19:38 -0400 Received: by joooj.vinc17.net (Postfix, from userid 1000) id D6D2034F; Tue, 3 Oct 2023 01:19:16 +0200 (CEST) Date: Tue, 3 Oct 2023 01:19:16 +0200 From: Vincent Lefevre Message-ID: <20231002231916.GH295100@joooj.vinc17.net> References: <20231002142355.GA404274@zira.vinc17.org> <202310022117.392LHDeU003639@freefriends.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <202310022117.392LHDeU003639@freefriends.org> X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/2.2.12+67 (757ca3b3) vl-149028 (2023-09-09) X-Spam-Score: 0.0 (/) 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 (-) On 2023-10-02 15:17:13 -0600, Karl Berry wrote: > Sorry, I don't understand what you want Automake to do. > > Right now, as far as I can tell, Automake does nothing with .POSIX. It's > not mentioned in the manual nor, as far as I can grep, the code. Maybe > that's the issue, and you want a leading .POSIX in your Makefile.am to > be specially copied at the beginning of the output Makefile.in? > (Or an option, or something.) Yes, Automake should either detect a ".POSIX:" in the Makefile.am file (at least if it is the first non-comment line) and place it at the beginning of Makefile.in, or provide an option to be used with AM_INIT_AUTOMAKE (or AUTOMAKE_OPTIONS) in order to have a ".POSIX:" at the beginning of Makefile.in. > But ... have you tried to run a Makefile originating from Automake with > .POSIX in effect? I feel doubtful that it will work, although I don't > know it for a fact. -k The Makefile.am files of GNU MPFR have a ".POSIX:" target as the first non-comment line: the shell for recipes is expected to be run with the -e flag. So, the ".POSIX:" is necessary for GNU Make in order to detect errors[*] (fortunately, GNU Make does not seem to care about its position in Makefile). [*] It is not needed for a successful build, but its absence might yield successful builds that are actually broken. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) From unknown Sat Aug 16 15:59:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55025: Automake should allow one to enable POSIX make behavior References: <20220419153348.GD2033@cventin.lip.ens-lyon.fr> Resent-From: Karl Berry Original-Sender: "Debbugs-submit" Resent-CC: bug-automake@gnu.org Resent-Date: Tue, 03 Oct 2023 21:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55025 X-GNU-PR-Package: automake X-GNU-PR-Keywords: confirmed To: vincent@vinc17.net Cc: 55025@debbugs.gnu.org Received: via spool by 55025-submit@debbugs.gnu.org id=B55025.169636734523507 (code B ref 55025); Tue, 03 Oct 2023 21:10:02 +0000 Received: (at 55025) by debbugs.gnu.org; 3 Oct 2023 21:09:05 +0000 Received: from localhost ([127.0.0.1]:40807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnmdc-000673-OQ for submit@debbugs.gnu.org; Tue, 03 Oct 2023 17:09:05 -0400 Received: from frenzy.freefriends.org ([198.99.81.75]:41590 helo=freefriends.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnmdZ-00066a-Jd for 55025@debbugs.gnu.org; Tue, 03 Oct 2023 17:09:02 -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 393L8gmZ001153 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 3 Oct 2023 15:08:42 -0600 Received: (from apache@localhost) by freefriends.org (8.14.7/8.14.7/Submit) id 393L8giM001152; Tue, 3 Oct 2023 15:08:42 -0600 Date: Tue, 3 Oct 2023 15:08:42 -0600 Message-Id: <202310032108.393L8giM001152@freefriends.org> From: Karl Berry In-Reply-To: <20231002231916.GH295100@joooj.vinc17.net> X-Spam-Score: -0.0 (/) 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 (-) Yes, Automake should either detect a ".POSIX:" in the Makefile.am file (at least if it is the first non-comment line) and place it at the beginning of Makefile.in, or provide an option to be used with AM_INIT_AUTOMAKE (or AUTOMAKE_OPTIONS) in order to have a ".POSIX:" at the beginning of Makefile.in. Ok. I welcome patches for either or both. It's not something I'll be implementing myself any time soon (regrettably). The Makefile.am files of GNU MPFR have a ".POSIX:" target Glad to know it works in practice for you. I'm just surprised that nothing in Automake's make output breaks under POSIX. --thanks, karl. From unknown Sat Aug 16 15:59:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55025: Automake should allow one to enable POSIX make behavior Resent-From: Vincent Lefevre Original-Sender: "Debbugs-submit" Resent-CC: bug-automake@gnu.org Resent-Date: Wed, 04 Oct 2023 15:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55025 X-GNU-PR-Package: automake X-GNU-PR-Keywords: confirmed To: Karl Berry Cc: 55025@debbugs.gnu.org Received: via spool by 55025-submit@debbugs.gnu.org id=B55025.16964350884513 (code B ref 55025); Wed, 04 Oct 2023 15:59:02 +0000 Received: (at 55025) by debbugs.gnu.org; 4 Oct 2023 15:58:08 +0000 Received: from localhost ([127.0.0.1]:45144 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qo4GG-0001Ai-5G for submit@debbugs.gnu.org; Wed, 04 Oct 2023 11:58:08 -0400 Received: from joooj.vinc17.net ([2001:4b99:1:3:216:3eff:fe20:ac98]:59172) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qo4GE-0001AY-8E for 55025@debbugs.gnu.org; Wed, 04 Oct 2023 11:58:07 -0400 Received: from smtp-zira.vinc17.net (2a02-8428-1b1d-4d01-9274-9d43-0c1c-f0d1.rev.sfr.net [IPv6:2a02:8428:1b1d:4d01:9274:9d43:c1c:f0d1]) by joooj.vinc17.net (Postfix) with ESMTPSA id 64EEA2DF; Wed, 4 Oct 2023 17:57:46 +0200 (CEST) Received: by zira.vinc17.org (Postfix, from userid 1000) id 28A652800166; Wed, 4 Oct 2023 17:57:46 +0200 (CEST) Date: Wed, 4 Oct 2023 17:57:46 +0200 From: Vincent Lefevre Message-ID: <20231004155746.GH6383@zira.vinc17.org> References: <20231002231916.GH295100@joooj.vinc17.net> <202310032108.393L8giM001152@freefriends.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <202310032108.393L8giM001152@freefriends.org> X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/2.2.12+67 (757ca3b3) vl-149028 (2023-09-09) X-Spam-Score: 0.0 (/) 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 (-) On 2023-10-03 15:08:42 -0600, Karl Berry wrote: > Yes, Automake should either detect a ".POSIX:" in the Makefile.am > file (at least if it is the first non-comment line) and place it at > the beginning of Makefile.in, or provide an option to be used with > AM_INIT_AUTOMAKE (or AUTOMAKE_OPTIONS) in order to have a ".POSIX:" > at the beginning of Makefile.in. > > Ok. I welcome patches for either or both. It's not something I'll be > implementing myself any time soon (regrettably). I think that a "posix" option is cleaner and simpler to implement. I have some idea of a patch. I'll try to look at it more closely late tonight. > The Makefile.am files of GNU MPFR have a ".POSIX:" target > > Glad to know it works in practice for you. I'm just surprised that > nothing in Automake's make output breaks under POSIX. --thanks, karl. On platforms with a POSIX "make", the generated makefile needs to work as expected. This limits the risk of breakage when using a ".POSIX:" target. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) From unknown Sat Aug 16 15:59:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55025: [PATCH] New "posix" automake option. Resent-From: Vincent Lefevre Original-Sender: "Debbugs-submit" Resent-CC: bug-automake@gnu.org Resent-Date: Thu, 05 Oct 2023 00:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55025 X-GNU-PR-Package: automake X-GNU-PR-Keywords: confirmed To: Karl Berry Cc: 55025@debbugs.gnu.org Received: via spool by 55025-submit@debbugs.gnu.org id=B55025.16964658606495 (code B ref 55025); Thu, 05 Oct 2023 00:31:01 +0000 Received: (at 55025) by debbugs.gnu.org; 5 Oct 2023 00:31:00 +0000 Received: from localhost ([127.0.0.1]:45582 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoCGZ-0001gh-Oy for submit@debbugs.gnu.org; Wed, 04 Oct 2023 20:31:00 -0400 Received: from cventin.lip.ens-lyon.fr ([140.77.13.17]:39572) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoCGY-0001gW-3r for 55025@debbugs.gnu.org; Wed, 04 Oct 2023 20:30:59 -0400 Received: from vlefevre by cventin.lip.ens-lyon.fr with local (Exim 4.97-RC1) (envelope-from ) id 1qoCGD-00000007XZg-2rcL; Thu, 05 Oct 2023 02:30:37 +0200 Date: Thu, 5 Oct 2023 02:30:37 +0200 From: Vincent Lefevre Message-ID: <20231005003037.GE2238@cventin.lip.ens-lyon.fr> References: <20231002231916.GH295100@joooj.vinc17.net> <202310032108.393L8giM001152@freefriends.org> <20231004155746.GH6383@zira.vinc17.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231004155746.GH6383@zira.vinc17.org> X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/2.2.12+67 (757ca3b3) vl-149028 (2023-09-09) X-Spam-Score: 0.0 (/) 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 (-) This patch is from https://bugs.gnu.org/55025. * lib/Automake/Options.pm: declare "posix" option. * bin/automake.in: if the "posix" option is present, add a .POSIX special target as the first non-comment line in the Makefile.in files. * NEWS: mention this. * doc/automake.texi: likewise. --- NEWS | 2 ++ bin/automake.in | 7 +++++++ doc/automake.texi | 6 ++++++ lib/Automake/Options.pm | 1 + 4 files changed, 16 insertions(+) diff --git a/NEWS b/NEWS index ced0fd640..821ae0cf1 100644 --- a/NEWS +++ b/NEWS @@ -30,6 +30,8 @@ New in 1.17: as given in the Makefile.am will be used. If @setfilename is present, it should be the basename of the Texinfo file, extended with .info. + - New option "posix" to generate a .POSIX special target. + * Bugs fixed - Generated file timestamp checks now handle filesystems with sub-second diff --git a/bin/automake.in b/bin/automake.in index 369a47fa2..edc0488b8 100644 --- a/bin/automake.in +++ b/bin/automake.in @@ -8126,6 +8126,13 @@ sub generate_makefile my $output = "$output_vars$output_all$output_header$output_rules$output_trailer"; + # The .POSIX special target must be the first non-comment line; + # otherwise, the behavior of "make" is unspecified by POSIX. + if (option 'posix') + { + $output =~ s/^((#.*)?\n)*\K/.POSIX:\n\n/; + } + # Decide whether we must update the output file or not. # We have to update in the following situations. # * $force_generation is set. diff --git a/doc/automake.texi b/doc/automake.texi index d14b769fd..97e3e3475 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -10679,6 +10679,12 @@ are ordinarily automatically provided by Automake. Don't require @file{texinfo.tex}, even if there are texinfo files in this directory. +@item @option{posix} +@cindex Option, @option{posix} +@opindex posix +Generate a @code{.POSIX} special target as the first non-comment line in +the @file{Makefile.in} files. + @item @option{serial-tests} @cindex Option, @option{serial-tests} @opindex serial-tests diff --git a/lib/Automake/Options.pm b/lib/Automake/Options.pm index 69fc2ecb5..22d527fac 100644 --- a/lib/Automake/Options.pm +++ b/lib/Automake/Options.pm @@ -290,6 +290,7 @@ sub _is_valid_easy_option ($) no-installman no-texinfo.tex nostdinc + posix readme-alpha serial-tests parallel-tests -- 2.42.0 From unknown Sat Aug 16 15:59:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55025: [PATCH] New "posix" automake option. References: <20220419153348.GD2033@cventin.lip.ens-lyon.fr> Resent-From: Karl Berry Original-Sender: "Debbugs-submit" Resent-CC: bug-automake@gnu.org Resent-Date: Thu, 05 Oct 2023 21:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55025 X-GNU-PR-Package: automake X-GNU-PR-Keywords: confirmed To: vincent@vinc17.net Cc: 55025@debbugs.gnu.org Received: via spool by 55025-submit@debbugs.gnu.org id=B55025.16965407447629 (code B ref 55025); Thu, 05 Oct 2023 21:20:01 +0000 Received: (at 55025) by debbugs.gnu.org; 5 Oct 2023 21:19:04 +0000 Received: from localhost ([127.0.0.1]:48656 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoVkO-0001yz-H8 for submit@debbugs.gnu.org; Thu, 05 Oct 2023 17:19:04 -0400 Received: from frenzy.freefriends.org ([198.99.81.75]:45742 helo=freefriends.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoVkJ-0001yK-Fg for 55025@debbugs.gnu.org; Thu, 05 Oct 2023 17:19:02 -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 395LIeSr020740 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 5 Oct 2023 15:18:40 -0600 Received: (from apache@localhost) by freefriends.org (8.14.7/8.14.7/Submit) id 395LIeBJ020739; Thu, 5 Oct 2023 15:18:40 -0600 Date: Thu, 5 Oct 2023 15:18:40 -0600 Message-Id: <202310052118.395LIeBJ020739@freefriends.org> From: Karl Berry In-Reply-To: <20231005003037.GE2238@cventin.lip.ens-lyon.fr> X-Spam-Score: -0.0 (/) 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 (-) This patch is from https://bugs.gnu.org/55025. Thanks Vincent! From unknown Sat Aug 16 15:59:00 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55025: [PATCH] New "posix" automake option. References: <20220419153348.GD2033@cventin.lip.ens-lyon.fr> Resent-From: Karl Berry Original-Sender: "Debbugs-submit" Resent-CC: bug-automake@gnu.org Resent-Date: Fri, 06 Oct 2023 22:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55025 X-GNU-PR-Package: automake X-GNU-PR-Keywords: confirmed To: vincent@vinc17.net Cc: 55025@debbugs.gnu.org Received: via spool by 55025-submit@debbugs.gnu.org id=B55025.169663205620968 (code B ref 55025); Fri, 06 Oct 2023 22:41:02 +0000 Received: (at 55025) by debbugs.gnu.org; 6 Oct 2023 22:40:56 +0000 Received: from localhost ([127.0.0.1]:52828 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qotV9-0005S2-EU for submit@debbugs.gnu.org; Fri, 06 Oct 2023 18:40:55 -0400 Received: from frenzy.freefriends.org ([198.99.81.75]:34704 helo=freefriends.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qotV6-0005Ro-Fd; Fri, 06 Oct 2023 18:40:53 -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 396MeWPM012678 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 6 Oct 2023 16:40:32 -0600 Received: (from apache@localhost) by freefriends.org (8.14.7/8.14.7/Submit) id 396MeW9U012677; Fri, 6 Oct 2023 16:40:32 -0600 Date: Fri, 6 Oct 2023 16:40:32 -0600 Message-Id: <202310062240.396MeW9U012677@freefriends.org> From: Karl Berry In-Reply-To: <20231005003037.GE2238@cventin.lip.ens-lyon.fr> X-Spam-Score: -0.0 (/) 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 (-) I installed your patch (and added a tiny test case). Thanks Vincent! Closing this bug (finally ...). -k From unknown Sat Aug 16 15:59:00 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Vincent Lefevre Subject: bug#55025: closed (Re: [PATCH] New "posix" automake option.) Message-ID: References: <202310062240.396MeW9U012677@freefriends.org> <20220419153348.GD2033@cventin.lip.ens-lyon.fr> X-Gnu-PR-Message: they-closed 55025 X-Gnu-PR-Package: automake X-Gnu-PR-Keywords: confirmed Reply-To: 55025@debbugs.gnu.org Date: Fri, 06 Oct 2023 22:41:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1696632063-20995-1" This is a multi-part message in MIME format... ------------=_1696632063-20995-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #55025: Automake should allow one to enable POSIX make behavior which was filed against the automake package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 55025@debbugs.gnu.org. --=20 55025: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D55025 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1696632063-20995-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 55025-done) by debbugs.gnu.org; 6 Oct 2023 22:40:55 +0000 Received: from localhost ([127.0.0.1]:52826 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qotV9-0005S0-7t for submit@debbugs.gnu.org; Fri, 06 Oct 2023 18:40:55 -0400 Received: from frenzy.freefriends.org ([198.99.81.75]:34704 helo=freefriends.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qotV6-0005Ro-Fd; Fri, 06 Oct 2023 18:40:53 -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 396MeWPM012678 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 6 Oct 2023 16:40:32 -0600 Received: (from apache@localhost) by freefriends.org (8.14.7/8.14.7/Submit) id 396MeW9U012677; Fri, 6 Oct 2023 16:40:32 -0600 Date: Fri, 6 Oct 2023 16:40:32 -0600 Message-Id: <202310062240.396MeW9U012677@freefriends.org> From: Karl Berry To: vincent@vinc17.net Subject: Re: [PATCH] New "posix" automake option. In-Reply-To: <20231005003037.GE2238@cventin.lip.ens-lyon.fr> X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 55025-done Cc: 55025@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: -1.0 (-) I installed your patch (and added a tiny test case). Thanks Vincent! Closing this bug (finally ...). -k ------------=_1696632063-20995-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 19 Apr 2022 15:34:07 +0000 Received: from localhost ([127.0.0.1]:43921 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ngprj-00008f-AW for submit@debbugs.gnu.org; Tue, 19 Apr 2022 11:34:07 -0400 Received: from lists.gnu.org ([209.51.188.17]:33718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ngprh-00008W-6F for submit@debbugs.gnu.org; Tue, 19 Apr 2022 11:34:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42840) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngprf-0001rH-LQ for bug-automake@gnu.org; Tue, 19 Apr 2022 11:34:04 -0400 Received: from cventin.lip.ens-lyon.fr ([140.77.13.17]:45684) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngprb-0006Yf-Vr for bug-automake@gnu.org; Tue, 19 Apr 2022 11:34:03 -0400 Received: from vlefevre by cventin.lip.ens-lyon.fr with local (Exim 4.95) (envelope-from ) id 1ngprQ-000E9Y-Nn; Tue, 19 Apr 2022 17:33:48 +0200 Date: Tue, 19 Apr 2022 17:33:48 +0200 From: Vincent Lefevre To: bug-automake@gnu.org Subject: Automake should allow one to enable POSIX make behavior Message-ID: <20220419153348.GD2033@cventin.lip.ens-lyon.fr> Mail-Followup-To: Vincent Lefevre , bug-automake@gnu.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/2.2.3+10 (6e7437c4) vl-138565 (2022-04-12) Received-SPF: none client-ip=140.77.13.17; envelope-from=vincent@vinc17.net; helo=cventin.lip.ens-lyon.fr 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_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit 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: -3.3 (---) https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html says about the target rules: .POSIX The application shall ensure that this special target is specified without prerequisites or commands. If it appears as the first non-comment line in the makefile, /make/ shall process the makefile as specified by this section; otherwise, the behavior of /make/ is unspecified. But even though one may add a .POSIX target as the first non-comment line in one's Makefile.am file, Automake will add various non-comment lines before this target in the generated Makefile. I received a remark about that for GNU MPFR. Though GNU make does not require this target to be the first non-comment line, this may matter with other make implementations. This could be done either by detecting a .POSIX target in Makefile.am or with some AM_* macro in the configure.ac file. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) ------------=_1696632063-20995-1--