VirtualBox

source: kBuild/trunk/src/kmk/tests/scripts/features/recursion

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.4 KB
Line 
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 = $('. (!$is_kmk ? 'MAKELEVEL' : 'KMK_LEVEL') .')
13 $(MAKE) -f #MAKEFILE# last
14last:
15 @echo $(MAKE)
16 @echo MAKELEVEL = $('. (!$is_kmk ? 'MAKELEVEL' : 'KMK_LEVEL') .')
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 = $('. (!$is_kmk ? 'MAKEOVERRIDES' : 'KMK_OVERRIDES') .')"
49',
50 'a=ZZ',
51 'MAKEOVERRIDES = a=ZZ
52MAKEOVERRIDES = a=AA
53');
54
551;
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