diff options
author | Dmitry Goncharov <dgoncharov@users.sf.net> | 2021-05-30 13:48:29 -0400 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2021-07-25 17:15:38 -0400 |
commit | 33468b3f31d65815152c11f32dc5c4384a6267b5 (patch) | |
tree | dd6ea8bec02ce9b16af732d0a229b7e74e63d75e /src/filedef.h | |
parent | 1cffd0a203bc1477671a02aafd6360b7bb964670 (diff) | |
download | make-git-33468b3f31d65815152c11f32dc5c4384a6267b5.tar.gz |
[SV 60297] Add .NOTINTERMEDIATE special target
Support a new special target, .NOTINTERMEDIATE. Any file or pattern
prerequisite of this target will never be considered intermediate.
This differs from .SECONDARY in that .SECONDARY files won't be deleted
but they will still not be built if they are missing.
.NOTINTERMEDIATE files are treated the same way as a target which is
explicitly mentioned in the makefile. This is mostly useful with
patterns; obviously mentioning a target explicitly here is enough in
and of itself to make something not intermediate.
Some adjustments made by psmith@gnu.org
* NEWS: Announce the new feature.
* doc/make.texi (Special Targets): Document .NOTINTERMEDIATE.
(Chained Rules): Describe how to use .NOTINTERMEDIATE.
* src/main.c (main): Add "notintermediate" to the .FEATURES variable.
* src/filedef.h (struct file): Add "notintermediate" flag.
* src/file.c (no_intermediates): Mark global .NOTINTERMEDIATE.
(snap_file): Support .NOTINTERMEDIATE special target. Throw an error
if the same target is marked both .NOTINTERMEDIATE and .SECONDARY or
.INTERMEDIATE.
(rehash_file): Merge intermediate, notintermediate, secondary flags.
(remove_intermediates): Check notintermediate flag before removing.
(print_file):
* src/implicit.c (pattern_search): Set notintermediate based on the
pattern.
* tests/scripts/targets/NOTINTERMEDIATE: Add a new test suite.
Diffstat (limited to 'src/filedef.h')
-rw-r--r-- | src/filedef.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/filedef.h b/src/filedef.h index 972f8533..36701b76 100644 --- a/src/filedef.h +++ b/src/filedef.h @@ -98,6 +98,8 @@ struct file unsigned int intermediate:1;/* Nonzero if this is an intermediate file. */ unsigned int secondary:1; /* Nonzero means remove_intermediates should not delete it. */ + unsigned int notintermediate:1; /* Nonzero means a file is a prereq to + .NOTINTERMEDIATE. */ unsigned int dontcare:1; /* Nonzero if no complaint is to be made if this target cannot be remade. */ unsigned int ignore_vpath:1;/* Nonzero if we threw out VPATH name. */ |