VirtualBox

source: kBuild/trunk/src/kmk/tests/scripts/features/override@ 2591

Last change on this file since 2591 was 2591, checked in by bird, 13 years ago

kmk: Merged in changes from GNU make 3.82. Previous GNU make base version was gnumake-2008-10-28-CVS.

  • Property svn:eol-style set to LF
File size: 873 bytes
Line 
1# -*-perl-*-
2
3$description = "Test the override directive on variable assignments.";
4
5$details = "";
6
7# TEST 0: Basic override
8
9run_make_test('
10X = start
11override recur = $(X)
12override simple := $(X)
13X = end
14all: ; @echo "$(recur) $(simple)"
15',
16 'recur=I simple=J', "end start\n");
17
18# TEST 1: Override with append
19
20run_make_test('
21X += X1
22override X += X2
23override Y += Y1
24Y += Y2
25all: ; @echo "$(X) $(Y)"
26',
27 '', "X1 X2 Y1\n");
28
29# TEST 2: Override with append to the command line
30
31run_make_test(undef, 'X=C Y=C', "C X2 C Y1\n");
32
33# Test override of define/endef
34
35run_make_test('
36override define foo
37@echo First comes the definition.
38@echo Then comes the override.
39endef
40all: ; $(foo)
41',
42 'foo=Hello', "First comes the definition.\nThen comes the override.\n");
43
44
451;
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