summaryrefslogtreecommitdiff
path: root/tests/scripts/misc
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2020-11-27 11:37:29 -0500
committerPaul Smith <psmith@gnu.org>2020-11-29 17:55:02 -0500
commitc01222c0181f9bb4297459663d13444ebfe3ad97 (patch)
tree08cf64c970984796416387e1a8214a8d7d6b04e9 /tests/scripts/misc
parent957aa450a073796513f9d4d815ef36ad00823be0 (diff)
downloadmake-git-c01222c0181f9bb4297459663d13444ebfe3ad97.tar.gz
[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.
Diffstat (limited to 'tests/scripts/misc')
-rw-r--r--tests/scripts/misc/bs-nl2
1 files changed, 0 insertions, 2 deletions
diff --git a/tests/scripts/misc/bs-nl b/tests/scripts/misc/bs-nl
index fdf4aabc..e8ba0467 100644
--- a/tests/scripts/misc/bs-nl
+++ b/tests/scripts/misc/bs-nl
@@ -88,7 +88,6 @@ var:;@echo '|$(var)|'!,
# POSIX: Preserve trailing space
run_make_test(q!
.POSIX:
-x = y
var = he \
llo
var:;@echo '|$(var)|'!,
@@ -97,7 +96,6 @@ var:;@echo '|$(var)|'!,
# POSIX: One space per bs-nl
run_make_test(q!
.POSIX:
-x = y
var = he\
\
\