Last change
on this file since 2634 was 2000, checked in by bird, 16 years ago |
scripts/variables/special: yet another -j1 test (hope it's not a bug).
|
-
Property svn:eol-style
set to
LF
|
File size:
1.8 KB
|
Line | |
---|
1 | # -*-perl-*-
|
---|
2 |
|
---|
3 | $description = "Test special GNU make variables.";
|
---|
4 |
|
---|
5 | $details = "";
|
---|
6 |
|
---|
7 | &run_make_test('
|
---|
8 |
|
---|
9 | X1 := $(sort $(filter FOO BAR,$(.VARIABLES)))
|
---|
10 |
|
---|
11 | FOO := foo
|
---|
12 |
|
---|
13 | X2 := $(sort $(filter FOO BAR,$(.VARIABLES)))
|
---|
14 |
|
---|
15 | BAR := bar
|
---|
16 |
|
---|
17 | all:
|
---|
18 | @echo X1 = $(X1)
|
---|
19 | @echo X2 = $(X2)
|
---|
20 | @echo LAST = $(sort $(filter FOO BAR,$(.VARIABLES)))
|
---|
21 | ',
|
---|
22 | '', "X1 =\nX2 = FOO\nLAST = BAR FOO\n");
|
---|
23 |
|
---|
24 |
|
---|
25 |
|
---|
26 | # $makefile2 = &get_tmpfile;
|
---|
27 | # open(MAKEFILE, "> $makefile2");
|
---|
28 |
|
---|
29 | # print MAKEFILE <<'EOF';
|
---|
30 |
|
---|
31 | # X1 := $(sort $(.TARGETS))
|
---|
32 |
|
---|
33 | # all: foo
|
---|
34 | # @echo X1 = $(X1)
|
---|
35 | # @echo X2 = $(X2)
|
---|
36 | # @echo LAST = $(sort $(.TARGETS))
|
---|
37 |
|
---|
38 | # X2 := $(sort $(.TARGETS))
|
---|
39 |
|
---|
40 | # foo:
|
---|
41 |
|
---|
42 | # EOF
|
---|
43 |
|
---|
44 | # close(MAKEFILE);
|
---|
45 |
|
---|
46 | # # TEST #2
|
---|
47 | # # -------
|
---|
48 |
|
---|
49 | # &run_make_with_options($makefile2, "", &get_logfile);
|
---|
50 | # $answer = "X1 =\nX2 = all\nLAST = all foo\n";
|
---|
51 | # &compare_output($answer, &get_logfile(1));
|
---|
52 |
|
---|
53 | # Test the .RECIPEPREFIX variable
|
---|
54 | # kmk: This test isn't -j1 safe, haven't bother looking into why yet.
|
---|
55 | &run_make_test('
|
---|
56 | define foo
|
---|
57 | : foo-one \
|
---|
58 | foo-two
|
---|
59 | : foo-three
|
---|
60 | : foo-four
|
---|
61 | endef
|
---|
62 |
|
---|
63 | orig: ; : orig-one
|
---|
64 | : orig-two \
|
---|
65 | orig-three \
|
---|
66 | orig-four \
|
---|
67 | orig-five \\\\
|
---|
68 | : orig-six
|
---|
69 | $(foo)
|
---|
70 |
|
---|
71 | .RECIPEPREFIX = >
|
---|
72 | test: ; : test-one
|
---|
73 | >: test-two \
|
---|
74 | test-three \
|
---|
75 | >test-four \
|
---|
76 | > test-five \\\\
|
---|
77 | >: test-six
|
---|
78 | >$(foo)
|
---|
79 |
|
---|
80 | .RECIPEPREFIX =
|
---|
81 | reset: ; : reset-one
|
---|
82 | : reset-two \
|
---|
83 | reset-three \
|
---|
84 | reset-four \
|
---|
85 | reset-five \\\\
|
---|
86 | : reset-six
|
---|
87 | $(foo)
|
---|
88 | ',
|
---|
89 | '-j1 orig test reset',
|
---|
90 | ': orig-one
|
---|
91 | : orig-two \
|
---|
92 | orig-three \
|
---|
93 | orig-four \
|
---|
94 | orig-five \\\\
|
---|
95 | : orig-six
|
---|
96 | : foo-one foo-two
|
---|
97 | : foo-three
|
---|
98 | : foo-four
|
---|
99 | : test-one
|
---|
100 | : test-two \
|
---|
101 | test-three \
|
---|
102 | test-four \
|
---|
103 | test-five \\\\
|
---|
104 | : test-six
|
---|
105 | : foo-one foo-two
|
---|
106 | : foo-three
|
---|
107 | : foo-four
|
---|
108 | : reset-one
|
---|
109 | : reset-two \
|
---|
110 | reset-three \
|
---|
111 | reset-four \
|
---|
112 | reset-five \\\\
|
---|
113 | : reset-six
|
---|
114 | : foo-one foo-two
|
---|
115 | : foo-three
|
---|
116 | : foo-four');
|
---|
117 |
|
---|
118 | 1;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.