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