VirtualBox

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

Last change on this file since 1993 was 1993, checked in by bird, 16 years ago

Merged in current GNU Make code (CVS from 2008-10-28). Ref #55.

  • Property svn:eol-style set to LF
File size: 1.7 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&run_make_test('
55define foo
56: foo-one \
57foo-two
58: foo-three
59 : foo-four
60endef
61
62orig: ; : orig-one
63 : orig-two \
64orig-three \
65 orig-four \
66 orig-five \\\\
67 : orig-six
68 $(foo)
69
70.RECIPEPREFIX = >
71test: ; : test-one
72>: test-two \
73test-three \
74>test-four \
75> test-five \\\\
76>: test-six
77>$(foo)
78
79.RECIPEPREFIX =
80reset: ; : reset-one
81 : reset-two \
82reset-three \
83 reset-four \
84 reset-five \\\\
85 : reset-six
86 $(foo)
87',
88 'orig test reset',
89 ': orig-one
90: orig-two \
91orig-three \
92orig-four \
93 orig-five \\\\
94: orig-six
95: foo-one foo-two
96: foo-three
97: foo-four
98: test-one
99: test-two \
100test-three \
101test-four \
102 test-five \\\\
103: test-six
104: foo-one foo-two
105: foo-three
106: foo-four
107: reset-one
108: reset-two \
109reset-three \
110reset-four \
111 reset-five \\\\
112: reset-six
113: foo-one foo-two
114: foo-three
115: foo-four');
116
1171;
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