]> git.ipfire.org Git - thirdparty/make.git/commit
[SV 40657] Reinstate old behavior for suffix rules with prereqs
authorPaul Smith <psmith@gnu.org>
Thu, 16 Jan 2020 18:49:07 +0000 (13:49 -0500)
committerPaul Smith <psmith@gnu.org>
Sun, 19 Jan 2020 22:04:52 +0000 (17:04 -0500)
commit3b5e47b2e2904884a9d853848be3348b7cdd4f8a
tree73b2e64406f08c325f129ca977fd69d62e6f7239
parent4e277f6fbdc9361a006f00f18a13125cc709d0f8
[SV 40657] Reinstate old behavior for suffix rules with prereqs

POSIX says that suffix rules cannot have prerequisites, but after
making this change we observed a number of makefiles "in the wild"
that were relying on this behavior and failed.

For .POSIX: makefiles, obey POSIX.  Otherwise preserve the old
behavior.  However, generate a warning so users know this is a
problem.  In a future version we will change all behavior to be
POSIX-conforming.

* NEWS: describe the change
* src/rule.c (convert_to_pattern): If posix_pedantic don't make a
pattern rule if prereqs exist.  Otherwise show a warning.
* tests/scripts/features/suffixrules: Add tests for the new behavior
including .POSIX vs. non-.POSIX.
NEWS
doc/make.texi
src/rule.c
tests/scripts/features/suffixrules