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