GNU bug report logs - #55025
Automake should allow one to enable POSIX make behavior

Previous Next

Package: automake;

Reported by: Vincent Lefevre <vincent <at> vinc17.net>

Date: Tue, 19 Apr 2022 15:35:02 UTC

Severity: wishlist

Tags: confirmed

Done: Karl Berry <karl <at> freefriends.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mike Frysinger <vapier <at> gentoo.org>
To: Vincent Lefevre <vincent <at> vinc17.net>, bug-automake <at> gnu.org
Subject: Re: bug#55025: Automake should allow one to enable POSIX make behavior
Date: Fri, 13 Jan 2023 01:19:39 -0500
[Message part 1 (text/plain, inline)]
On 19 Apr 2022 17:33, Vincent Lefevre wrote:
> 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.

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 <https://www.gnu.org/licenses/>.
 
+.POSIX:
+
 VPATH = @srcdir@
 
 @SET_MAKE@
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 1 year and 285 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.