2
$description = "The following test creates a makefile to ...\n";
6
open(MAKEFILE,"> $makefile");
8
# The Contents of the MAKEFILE ...
10
print MAKEFILE "all: \n"
11
."\t\$(MAKE) -f $makefile foo \n"
13
."\t\@echo \$(MAKE) \n"
14
."\t\@echo MAKELEVEL = \$(MAKELEVEL)\n"
15
."\t\$(MAKE) -f $makefile last \n"
17
."\t\@echo \$(MAKE) \n"
18
."\t\@echo MAKELEVEL = \$(MAKELEVEL) \n"
19
."\t\@echo THE END\n";
21
# END of Contents of MAKEFILE
27
$answer = "$make_name: Entering directory \`$pwd\'\n"
28
."make 'CFLAGS=-O' -f $makefile foo \n"
31
."make 'CFLAGS=-O' -f $makefile last \n"
35
."$make_name: Leaving directory `$pwd'\n";
39
$answer = "$make_name: Entering directory `$pwd'\n"
40
."$mkpath -f $makefile foo \n"
41
."${make_name}[1]: Entering directory `$pwd'\n"
44
."$mkpath -f $makefile last \n"
45
."${make_name}[2]: Entering directory `$pwd'\n"
49
."${make_name}[2]: Leaving directory `$pwd'\n"
50
."${make_name}[1]: Leaving directory `$pwd'\n"
51
."$make_name: Leaving directory `$pwd'\n";
54
$mkoptions = "CFLAGS=-O -w";
55
$mkoptions .= " -j 2" if ($parallel_jobs);
57
&run_make_with_options($makefile,$mkoptions,&get_logfile,0);
59
&compare_output($answer,&get_logfile(1));