This patch is from https://bugs.gnu.org/55025.
* lib/Automake/Options.pm (_is_valid_easy_option): declare new
option "posix".
* bin/automake.in (generate_makefile): 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.
* New features added
+ - New option "posix" to emit the special target .POSIX for make.
+
- RANLIB may be overridden on a per-target basis.
- AM_PATH_PYTHON will also search for Python versions 3.10 - 3.15. It has
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.
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 the special target @code{.POSIX} as the first non-comment
+line in the @file{Makefile.in} files. This alters the behavior of the
+@code{make} program. @xref{Special targets,, make, The GNU Make
+Manual}.
+
@item @option{serial-tests}
@cindex Option, @option{serial-tests}
@opindex serial-tests
no-installman
no-texinfo.tex
nostdinc
+ posix
readme-alpha
serial-tests
parallel-tests