mirror of
https://git.savannah.gnu.org/git/make.git
synced 2024-12-29 08:09:02 +00:00
40a49f244d
We tried to get some efficiency by avoiding a parse_file_seq() for simple pattern prerequisites, but this also means no wildcard expansion was happening, so add it back. Add regression tests for wildcards in target and prerequisite lists.
37 lines
916 B
Perl
37 lines
916 B
Perl
# -*-perl-*-
|
|
|
|
$description = "Test globbing in targets and prerequisites.";
|
|
|
|
$details = "";
|
|
|
|
touch(qw(a.one a.two a.three));
|
|
|
|
# Test wildcards in regular targets and prerequisites
|
|
run_make_test(q{
|
|
.PHONY: all a.one a.two a.three
|
|
all: a.one* a.t[a-z0-9]o a.th[!q]ee
|
|
a.o[Nn][Ee] a.t*: ; @echo $@
|
|
},
|
|
'', "a.one\na.two\na.three");
|
|
|
|
# Test wildcards in pattern targets and prerequisites
|
|
run_make_test(q{
|
|
.PHONY: all
|
|
all: a.four
|
|
%.four : %.t* ; @echo $@: $(sort $^)
|
|
},
|
|
'', "a.four: a.three a.two");
|
|
|
|
# Test wildcards in second expansion targets and prerequisites
|
|
run_make_test(q{
|
|
.PHONY: all
|
|
all: a.four
|
|
.SECONDEXPANSION:
|
|
%.four : $$(sort %.t*) ; @echo $@: $(sort $^)
|
|
},
|
|
'', "a.four: a.three a.two");
|
|
|
|
unlink(qw(a.one a.two a.three));
|
|
|
|
# This tells the test driver that the perl test script executed properly.
|
|
1;
|