* tests/scripts/features/statipattrules: [SV 17374] Add test

Verify that double-colon static pattern rules work.
This commit is contained in:
Paul Smith 2022-09-20 02:18:48 -04:00
parent fabb03eac4
commit d12ff78cb2

View File

@ -138,9 +138,20 @@ hello.z: %.z: %.x ; @echo $@
unrelated: hello.x
!, '', "hello.z\n");
unlink('hello.z');
# sv 17374 Ensure double-colon static pattern rules work
touch(qw(a.src b.src));
run_make_test(q!
all: a.tgt b.tgt
a.tgt b.tgt:: %.tgt : %.src ; cp $< $@
!,
'', "cp a.src a.tgt\ncp b.src b.tgt\n");
unlink(qw(a.src b.src a.tgt b.tgt));
my @dir = ('', 'lib/'); # With and without last slash.
my @secondexpansion = ('', '.SECONDEXPANSION:');