VirtualBox

source: kBuild/trunk/src/kmk/tests/scripts/variables/special@ 2634

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
9X1 := $(sort $(filter FOO BAR,$(.VARIABLES)))
10
11FOO := foo
12
13X2 := $(sort $(filter FOO BAR,$(.VARIABLES)))
14
15BAR := bar
16
17all:
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('
56define foo
57: foo-one \
58foo-two
59: foo-three
60 : foo-four
61endef
62
63orig: ; : orig-one
64 : orig-two \
65orig-three \
66 orig-four \
67 orig-five \\\\
68 : orig-six
69 $(foo)
70
71.RECIPEPREFIX = >
72test: ; : test-one
73>: test-two \
74test-three \
75>test-four \
76> test-five \\\\
77>: test-six
78>$(foo)
79
80.RECIPEPREFIX =
81reset: ; : reset-one
82 : reset-two \
83reset-three \
84 reset-four \
85 reset-five \\\\
86 : reset-six
87 $(foo)
88',
89 '-j1 orig test reset',
90 ': orig-one
91: orig-two \
92orig-three \
93orig-four \
94 orig-five \\\\
95: orig-six
96: foo-one foo-two
97: foo-three
98: foo-four
99: test-one
100: test-two \
101test-three \
102test-four \
103 test-five \\\\
104: test-six
105: foo-one foo-two
106: foo-three
107: foo-four
108: reset-one
109: reset-two \
110reset-three \
111reset-four \
112 reset-five \\\\
113: reset-six
114: foo-one foo-two
115: foo-three
116: foo-four');
117
1181;
Note: See TracBrowser for help on using the repository browser.

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