VirtualBox

source: kBuild/branches/GNU/src/gmake/tests/scripts/features/recursion@ 54

最後變更 在這個檔案從54是 53,由 bird 提交於 21 年 前

Initial revision

  • 屬性 svn:eol-style 設為 native
檔案大小: 1.8 KB
 
1# -*-perl-*-
2$description = "The following test creates a makefile to ...\n";
3
4$details = "DETAILS";
5
6open(MAKEFILE,"> $makefile");
7
8# The Contents of the MAKEFILE ...
9
10print 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";
20
21# END of Contents of MAKEFILE
22
23close(MAKEFILE);
24
25if ($vos)
26{
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";
36}
37else
38{
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";
52}
53
54$mkoptions = "CFLAGS=-O -w";
55$mkoptions .= " -j 2" if ($parallel_jobs);
56
57&run_make_with_options($makefile,$mkoptions,&get_logfile,0);
58
59&compare_output($answer,&get_logfile(1));
60
611;
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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