VirtualBox

source: kBuild/vendor/gnumake/current/tests/scripts/variables/MAKE_RESTARTS

最後變更 在這個檔案是 3138,由 bird 提交於 7 年 前

Imported make 4.2.1 (2e55f5e4abdc0e38c1d64be703b446695e70b3b6) from https://git.savannah.gnu.org/git/make.git.

  • 屬性 svn:eol-style 設為 LF
檔案大小: 1.2 KB
 
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:
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette