make/tests/scripts/targets
Dmitry Goncharov 33468b3f31 [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.
2021-07-25 17:15:38 -04:00
..
clean
DEFAULT Refresh the test suite framework implementation. 2019-09-16 08:25:33 -04:00
DELETE_ON_ERROR * job.c (child_error): Modify error message string. 2019-09-22 17:02:57 -04:00
FORCE
INTERMEDIATE * tests/scripts/targets/INTERMEDIATE: [SV 60188] Add one more test 2021-05-30 15:11:14 -04:00
NOTINTERMEDIATE [SV 60297] Add .NOTINTERMEDIATE special target 2021-07-25 17:15:38 -04:00
ONESHELL
PHONY
POSIX [SV 35711] Check for special targets earlier 2020-11-29 17:55:02 -05:00
SECONDARY Use Jenkins hash. 2017-11-11 10:08:30 -05:00
SILENT [SV 54740] Ensure .SILENT settings do not leak into sub-makes 2019-05-19 15:27:26 -04:00