2 $description = "Test second expansion in static pattern rules.";
6 # Test #1: automatic variables.
10 .DEFAULT: ; @echo '$@'
12 foo.a foo.b: foo.%: bar.% baz.%
13 foo.a foo.b: foo.%: biz.% | buz.%
15 foo.a foo.b: foo.%: $$@.1 \
17 $$(addsuffix .3,$$^) \
18 $$(addsuffix .4,$$+) \
39 # Test #2: target/pattern -specific variables.
43 .DEFAULT: ; @echo '$@'
45 foo.x foo.y: foo.%: $$(%_a) $$($$*_b)
54 # Test #3: order of prerequisites.
58 .DEFAULT: ; @echo '$@'
60 all: foo.a bar.a baz.a
63 foo.a foo.b: foo.%: foo.%.1; @:
64 foo.a foo.b: foo.%: foo.%.2
65 foo.a foo.b: foo.%: foo.%.3
69 bar.a bar.b: bar.%: bar.%.2
70 bar.a bar.b: bar.%: bar.%.1; @:
71 bar.a bar.b: bar.%: bar.%.3
75 baz.a baz.b: baz.%: baz.%.1
76 baz.a baz.b: baz.%: baz.%.2
90 # Test #4: Make sure stem triple-expansion does not happen.
94 foo$$bar: f%r: % $$*.1
106 # This tells the test driver that the perl test script executed properly.