VirtualBox

source: kBuild/trunk/src/kmk/tests/scripts/variables/flavors

Last change on this file was 3140, checked in by bird, 7 years ago

kmk: Merged in changes from GNU make 4.2.1 (2e55f5e4abdc0e38c1d64be703b446695e70b3b6 / https://git.savannah.gnu.org/git/make.git).

  • Property svn:eol-style set to LF
File size: 1.4 KB
Line 
1# -*-perl-*-
2
3$description = "Test various flavors of make variable setting.";
4
5$details = "";
6
7# TEST 0: Recursive
8
9run_make_test('
10ugh = Goodbye
11foo = $(bar)
12bar = ${ugh}
13ugh = Hello
14all: ; @echo $(foo)
15',
16 '', "Hello\n");
17
18# TEST 1: Simple
19
20run_make_test('
21bar = Goodbye
22foo := $(bar)
23bar = ${ugh}
24ugh = Hello
25all: ; @echo $(foo)
26',
27 '', "Goodbye\n");
28
29# TEST 2: Append to recursive
30
31run_make_test('
32foo = Hello
33ugh = Goodbye
34foo += $(bar)
35bar = ${ugh}
36ugh = Hello
37all: ; @echo $(foo)
38',
39 '', "Hello Hello\n");
40
41# TEST 3: Append to simple
42
43run_make_test('
44foo := Hello
45ugh = Goodbye
46bar = ${ugh}
47foo += $(bar)
48ugh = Hello
49all: ; @echo $(foo)
50',
51 '', "Hello Goodbye\n");
52
53# TEST 4: Conditional pre-set
54
55run_make_test('
56foo = Hello
57ugh = Goodbye
58bar = ${ugh}
59foo ?= $(bar)
60ugh = Hello
61all: ; @echo $(foo)
62',
63 '', "Hello\n");
64
65# TEST 5: Conditional unset
66
67run_make_test('
68ugh = Goodbye
69bar = ${ugh}
70foo ?= $(bar)
71ugh = Hello
72all: ; @echo $(foo)
73',
74 '', "Hello\n");
75
76# TEST 6: Simple using POSIX syntax
77run_make_test('
78bar = Goodbye
79foo ::= $(bar)
80bar = ${ugh}
81ugh = Hello
82all: ; @echo $(foo)
83',
84 '', "Goodbye\n");
85
86# TEST 7: POSIX syntax no spaces
87run_make_test('
88bar = Goodbye
89foo::=$(bar)
90bar = ${ugh}
91ugh = Hello
92all: ; @echo $(foo)
93',
94 '', "Goodbye\n");
95
961;
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