VirtualBox

source: kBuild/trunk/src/kmk/tests/scripts/features/se_explicit@ 2267

Last change on this file since 2267 was 1981, checked in by bird, 17 years ago

two more -j sensitive tests found during valgrind run.

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Author Date Id Revision
File size: 1.6 KB
Line 
1# -*-perl-*-
2$description = "Test second expansion in ordinary rules.";
3
4$details = "";
5
6# TEST #0: Test handing of '$' in prerequisites with and without second
7# expansion.
8# bird: Modified this test to use ${PRE} instead of $(PRE) as it failes
9# when make is built with NO_ARCHIVES defined.
10
11run_make_test(q!
12ifdef SE
13 .SECONDEXPANSION:
14endif
15foo$$bar: bar$$baz bar$$biz ; @echo '$@ : $^'
16PRE = one two
17bar$$baz: $${PRE}
18baraz: $${PRE}
19PRE = three four
20.DEFAULT: ; @echo '$@'
21!,
22 '',
23 "\${PRE}\nbar\$biz\nfoo\$bar : bar\$baz bar\$biz");
24
25run_make_test(undef, 'SE=1', "three\nfour\nbariz\nfoo\$bar : baraz bariz");
26
27# TEST #1: automatic variables.
28#
29run_make_test('
30.SECONDEXPANSION:
31.DEFAULT: ; @echo $@
32
33foo: bar baz
34
35foo: biz | buz
36
37foo: [email protected] \
38 $$<.2 \
39 $$(addsuffix .3,$$^) \
40 $$(addsuffix .4,$$+) \
41 $$|.5 \
42 $$*.6
43
44',
45'-j1',
46'bar
47baz
48biz
49buz
50foo.1
51bar.2
52bar.3
53baz.3
54biz.3
55bar.4
56baz.4
57biz.4
58buz.5
59.6
60');
61
62
63# Test #2: target/pattern -specific variables.
64#
65run_make_test('
66.SECONDEXPANSION:
67.DEFAULT: ; @echo $@
68
69foo.x: $$a $$b
70
71foo.x: a := bar
72
73%.x: b := baz
74
75',
76'',
77'bar
78baz
79');
80
81
82# Test #3: order of prerequisites.
83#
84run_make_test('
85.SECONDEXPANSION:
86.DEFAULT: ; @echo $@
87
88all: foo bar baz
89
90# Subtest #1
91#
92foo: foo.1; @:
93
94foo: foo.2
95
96foo: foo.3
97
98
99# Subtest #2
100#
101bar: bar.2
102
103bar: bar.1; @:
104
105bar: bar.3
106
107
108# Subtest #3
109#
110baz: baz.1
111
112baz: baz.2
113
114baz: ; @:
115
116',
117'-j1',
118'foo.1
119foo.2
120foo.3
121bar.1
122bar.2
123bar.3
124baz.1
125baz.2
126');
127
128# This tells the test driver that the perl test script executed properly.
1291;
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette