VirtualBox

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

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.2 KB
Line 
1# -*-perl-*-
2
3$description = "Test the MAKE_RESTARTS variable.";
4
5# Test basic capability
6
7run_make_test('
8all: ; @:
9$(info MAKE_RESTARTS=$(MAKE_RESTARTS))
10include foo.x
11foo.x: ; @touch $@
12',
13 '', 'MAKE_RESTARTS=
14MAKE_RESTARTS=1');
15
16rmfiles('foo.x');
17
18# Test multiple restarts
19
20run_make_test('
21all: ; @:
22$(info MAKE_RESTARTS=$(MAKE_RESTARTS))
23include foo.x
24foo.x: ; @echo "include bar.x" > $@
25bar.x: ; @touch $@
26',
27 '', 'MAKE_RESTARTS=
28MAKE_RESTARTS=1
29MAKE_RESTARTS=2');
30
31rmfiles('foo.x', 'bar.x');
32
33# Test multiple restarts and make sure the variable is cleaned up
34
35run_make_test('
36recurse:
37 @echo recurse MAKE_RESTARTS=$$MAKE_RESTARTS
38 @$(MAKE) -f #MAKEFILE# all
39all:
40 @echo all MAKE_RESTARTS=$$MAKE_RESTARTS
41$(info MAKE_RESTARTS=$(MAKE_RESTARTS))
42include foo.x
43foo.x: ; @echo "include bar.x" > $@
44bar.x: ; @touch $@
45',
46 '', "MAKE_RESTARTS=
47MAKE_RESTARTS=1
48MAKE_RESTARTS=2
49recurse MAKE_RESTARTS=
50#MAKE#[1]: Entering directory '#PWD#'
51MAKE_RESTARTS=
52all MAKE_RESTARTS=
53#MAKE#[1]: Leaving directory '#PWD#'");
54
55rmfiles('foo.x', 'bar.x');
56
571;
58
59### Local Variables:
60### eval: (setq whitespace-action (delq 'auto-cleanup whitespace-action))
61### End:
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