No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gmake / tests / scripts / features / recursion
blob444f7ce933839c18d1c0e8361802ef14bf10b2b3
1 #                                                                    -*-perl-*-
2 $description = "The following test creates a makefile to ...\n";
4 $details = "DETAILS";
6 open(MAKEFILE,"> $makefile");
8 # The Contents of the MAKEFILE ...
10 print MAKEFILE "all: \n"
11               ."\t\$(MAKE) -f $makefile foo \n"
12               ."foo: \n"
13               ."\t\@echo \$(MAKE) \n"
14               ."\t\@echo MAKELEVEL = \$(MAKELEVEL)\n"
15               ."\t\$(MAKE) -f $makefile last \n"
16               ."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
23 close(MAKEFILE);
25 if ($vos)
27    $answer = "$make_name: Entering directory \`$pwd\'\n"
28             ."make 'CFLAGS=-O' -f $makefile foo \n"
29             ."make CFLAGS=-O\n"
30             ."MAKELEVEL = 0\n"
31             ."make 'CFLAGS=-O' -f $makefile last \n"
32             ."make CFLAGS=-O\n"
33             ."MAKELEVEL = 0\n"
34             ."THE END\n"
35             ."$make_name: Leaving directory `$pwd'\n";
37 else
39    $answer = "$make_name: Entering directory `$pwd'\n"
40             ."$mkpath -f $makefile foo \n"
41             ."${make_name}[1]: Entering directory `$pwd'\n"
42             ."$mkpath\n"
43             ."MAKELEVEL = 1\n"
44             ."$mkpath -f $makefile last \n"
45             ."${make_name}[2]: Entering directory `$pwd'\n"
46             ."$mkpath\n"
47             ."MAKELEVEL = 2\n"
48             ."THE END\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));