File: rule_glob

package info (click to toggle)
make-dfsg 4.4.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,948 kB
  • sloc: ansic: 31,304; sh: 5,222; perl: 1,716; makefile: 162; lisp: 26; sed: 16
file content (37 lines) | stat: -rw-r--r-- 916 bytes parent folder | download | duplicates (22)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#                                                                    -*-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;