mirror of
https://github.com/mirror/make.git
synced 2026-08-22 18:03:27 +08:00
* src/read.c (eval): [SV 40942] Allow targets named "load"
Previously "load:" worked but "load :" failed. Allow the latter as well. This doesn't fix all issues; "load foo :" is still treated as a load operation for "foo" and ":". Avoids SV 50413 as well. * tests/scripts/features/load: Write tests.
This commit is contained in:
@@ -144,7 +144,25 @@ all: ; @echo pre=$(PRE) post=$(POST) $(TESTLOAD)
|
||||
testload.so: testload.c ; @echo "rebuilding $@"; !.$sobuild,
|
||||
'', "pre= post=testload.so implicit\n");
|
||||
|
||||
unlink(qw(testload.c testload.so)) unless $keep;
|
||||
# Check using load as a target or variable name
|
||||
run_make_test(q!
|
||||
load: ; @echo $@
|
||||
-load&: ; @echo $@
|
||||
!,
|
||||
"", "load\n");
|
||||
|
||||
run_make_test(q!
|
||||
load : ; @echo $@
|
||||
-load &: ; echo $@
|
||||
!,
|
||||
"", "load\n");
|
||||
|
||||
run_make_test(q!
|
||||
load = @echo $@
|
||||
all: ; $(load)
|
||||
load |: ; echo $@
|
||||
!,
|
||||
"", "all\n");
|
||||
|
||||
# This tells the test driver that the perl test script executed properly.
|
||||
1;
|
||||
|
||||
Reference in New Issue
Block a user