make/tests/scripts/targets
Paul Smith c01222c018 [SV 35711] Check for special targets earlier
GNU make must recognize some special targets as they are defined.
Because of the way targets are defined, we were not recognizing these
special targets until we were handling the NEXT statement.  However
that's too late for some special targets such as .POSIX etc. which can
change the behavior of make during parsing.

Check for special targets earlier, as soon as we've finished parsing
the target introduction line (before we've even parsed the recipe).

* NEWS: Mention the change.
* src/read.c (check_specials): New function to look for special
targets.  Move checks from eval() and record_files() to this new
function.
(eval): Call check_specials() after we've completed parsing the target
introduction line.  Move default goal detection to check_specials().
(record_files): Move handling of .POSIX, .SECONDEXPANSION, and
.ONESHELL to check_specials().
* tests/scripts/misc/bs-nl: Remove workaround for late .POSIX issue.
* tests/scripts/targets/POSIX: Add a comment.
2020-11-29 17:55:02 -05:00
..
clean Portability changes for the test suite. 2016-12-26 09:01:59 -05:00
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 Portability changes for the test suite. 2016-12-26 09:01:59 -05:00
INTERMEDIATE Use Jenkins hash. 2017-11-11 10:08:30 -05:00
ONESHELL Add test suite support to Windows 2017-06-04 18:37:20 -04:00
PHONY Portability changes for the test suite. 2016-12-26 09:01:59 -05:00
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