VirtualBox

source: kBuild/vendor/gnumake/current/tests/scripts/features/recursion

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

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

  • 屬性 svn:eol-style 設為 LF
檔案大小: 1.3 KB
 
1# -*-perl-*-
2$description = "Test recursion.";
3
4$details = "DETAILS";
5
6# Test some basic recursion.
7run_make_test('
8all:
9 $(MAKE) -f #MAKEFILE# foo
10foo:
11 @echo $(MAKE)
12 @echo MAKELEVEL = $(MAKELEVEL)
13 $(MAKE) -f #MAKEFILE# last
14last:
15 @echo $(MAKE)
16 @echo MAKELEVEL = $(MAKELEVEL)
17 @echo THE END
18',
19 ('CFLAGS=-O -w' . ($parallel_jobs ? ' -j 2' : '')),
20 ($vos
21 ? "#MAKE#: Entering directory '#PWD#'
22make 'CFLAGS=-O' -f #MAKEFILE# foo
23make CFLAGS=-O
24MAKELEVEL = 0
25make 'CFLAGS=-O' -f #MAKEFILE# last
26make CFLAGS=-O
27MAKELEVEL = 0
28THE END
29#MAKE#: Leaving directory '#PWD#'"
30 : "#MAKE#: Entering directory '#PWD#'
31#MAKEPATH# -f #MAKEFILE# foo
32#MAKE#[1]: Entering directory '#PWD#'
33#MAKEPATH#
34MAKELEVEL = 1
35#MAKEPATH# -f #MAKEFILE# last
36#MAKE#[2]: Entering directory '#PWD#'
37#MAKEPATH#
38MAKELEVEL = 2
39THE END
40#MAKE#[2]: Leaving directory '#PWD#'
41#MAKE#[1]: Leaving directory '#PWD#'
42#MAKE#: Leaving directory '#PWD#'"));
43
44
45# Test command line overrides.
46run_make_test('
47recur: all ; @$(MAKE) --no-print-directory -f #MAKEFILE# a=AA all
48all: ; @echo "MAKEOVERRIDES = $(MAKEOVERRIDES)"
49',
50 'a=ZZ',
51 'MAKEOVERRIDES = a=ZZ
52MAKEOVERRIDES = a=AA
53');
54
551;
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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