summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2022-10-02 10:18:21 -0400
committerPaul Smith <psmith@gnu.org>2022-10-02 10:18:21 -0400
commit7296991d6c2feec34099934af75c35b5c0a47e3a (patch)
tree8d0be5d6a99ecfe900dcf64c04345f6983b0d983 /doc
parentd51ac701227e89cbab8c88668d71198ff52f92a7 (diff)
downloadmake-git-7296991d6c2feec34099934af75c35b5c0a47e3a.tar.gz
[SV 63098] Temporarily revert the change to pattern rule behavior
The fix for SV 12078 caused a backward-compatibility issue with some makefiles. In order to allow users to resolve this issue, revert that change for this release cycle: it will be reinstated in the next release cycle. Introduce a warning if we detect that the recipe of a multi-target pattern rule doesn't create all the targets. * NEWS: Announce the future backward-incompatibility. * doc/make.texi (Pattern Intro): Describe the behavior and that it will change in the future. * src/remake.c (check_also_make): Check for also_make targets that were not created and generate a warning. (update_goal_chain): Call the new function. (check_dep): Ditto. (update_file_1): Defer implicit rule detection until after we check all the also_make files (as it used to be). * tests/scripts/features/patternrules: Add tests of the new warning. Skip the tests for SV 12078.
Diffstat (limited to 'doc')
-rw-r--r--doc/make.texi9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/make.texi b/doc/make.texi
index 4bcd4fbe..79dc34dc 100644
--- a/doc/make.texi
+++ b/doc/make.texi
@@ -10623,6 +10623,15 @@ always treated as grouped targets (@pxref{Multiple Targets, , Multiple Targets
in a Rule}) regardless of whether they use the @code{:} or @code{&:}
separator.
+There is one exception: if a pattern target is out of date or does
+not exist and the makefile does not need to build it, then it will not cause
+the other targets to be considered out of date. Note that this historical
+exception will be removed in future versions of GNU @code{make} and should not
+be relied on. If this situation is detected @code{make} will generate a
+warning @emph{pattern recipe did not update peer target}; however, @code{make}
+cannot detect all such situations. Please be sure that your recipe updates
+@emph{all} the target patterns when it runs.
+
@node Pattern Examples, Automatic Variables, Pattern Intro, Pattern Rules
@subsection Pattern Rule Examples