diff options
author | Dmitry Goncharov <dgoncharov@users.sf.net> | 2021-09-07 00:08:27 -0400 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2021-09-07 01:14:20 -0400 |
commit | 9e4b3d3f4c8241a2c3cd66e1a7695befa5a6a0aa (patch) | |
tree | 57d940970aefe3e884095eaa7c273038a7940800 /doc | |
parent | 5a96d5a066e86178886b80ad00130faf1cc079bf (diff) | |
download | make-git-9e4b3d3f4c8241a2c3cd66e1a7695befa5a6a0aa.tar.gz |
[SV 60435] Ensure intermediate grouped files are removed
If multiple intermediate files are built together be sure all of them
are removed after make is finished. Continue to ensure that targets
that exist before make starts are not removed even if they appear to be
intermediate.
Add a number of tests to pattern rules to verify this behavior.
* src/filedef.h (struct file): Add a new is_explicit bitfield.
* src/file.c (rehash_file): Merge the is_explicit bit.
(enter_prereqs): Set is_explicit if the file is explicitly mentioned.
* src/implicit.c (pattern_search): Set intermediate on the file if it's
not explicit.
(record_files): Set is_explicit if a file is mentioned as a target.
* src/remake.c (update_file_1): Set secondary on files that already
exist so they won't be removed.
* tests/scripts/features/double_colon: Add a test for double-colon
pattern rules.
* tests/scripts/features/patternrules: Update KGO for tests where more
files are removed.
Add new tests to verify handling removal of intermediate files in the
context of grouped pattern targets.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/make.texi | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/make.texi b/doc/make.texi index 627d4f14..4470386d 100644 --- a/doc/make.texi +++ b/doc/make.texi @@ -10024,12 +10024,12 @@ either, unless there is some other reason to update that target: for example the target doesn't exist or a different prerequisite is newer than the target. -The second difference is that if @code{make} @emph{does} create @var{b} -in order to update something else, it deletes @var{b} later on after it -is no longer needed. Therefore, an intermediate file which did not -exist before @code{make} also does not exist after @code{make}. -@code{make} reports the deletion to you by printing a @samp{rm -f} -command showing which file it is deleting. +The second difference is that if @code{make} @emph{does} create @var{b} in +order to update something else, it deletes @var{b} later on after it is no +longer needed. Therefore, an intermediate file which did not exist before +@code{make} also does not exist after @code{make}. @code{make} reports the +deletion to you by printing a @samp{rm} command showing which file it is +deleting. Ordinarily, a file cannot be intermediate if it is mentioned in the makefile as a target or prerequisite. However, you can explicitly mark a |