1 # -*-perl-*- 2 $description = "Test recursion."; 3 4 $details = "DETAILS"; 5 6 # Test some basic recursion. 7 run_make_test(' 8 all: 9 $(MAKE) -f #MAKEFILE# foo 10 foo: 11 @echo $(MAKE) 12 @echo MAKELEVEL = $(MAKELEVEL) 13 $(MAKE) -f #MAKEFILE# last 14 last: 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#' 22 make 'CFLAGS=-O' -f #MAKEFILE# foo 23 make CFLAGS=-O 24 MAKELEVEL = 0 25 make 'CFLAGS=-O' -f #MAKEFILE# last 26 make CFLAGS=-O 27 MAKELEVEL = 0 28 THE END 29 #MAKE#: Leaving directory `#PWD#'" 30 : "#MAKE#: Entering directory `#PWD#' 31 #MAKEPATH# -f #MAKEFILE# foo 32 #MAKE#[1]: Entering directory `#PWD#' 33 #MAKEPATH# 34 MAKELEVEL = 1 35 #MAKEPATH# -f #MAKEFILE# last 36 #MAKE#[2]: Entering directory `#PWD#' 37 #MAKEPATH# 38 MAKELEVEL = 2 39 THE 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. 46 run_make_test(' 47 recur: all ; @$(MAKE) --no-print-directory -f #MAKEFILE# a=AA all 48 all: ; @echo "MAKEOVERRIDES = $(MAKEOVERRIDES)" 49 ', 50 'a=ZZ', 51 'MAKEOVERRIDES = a=ZZ 52 MAKEOVERRIDES = a=AA 53 '); 54 55 1; 56