VirtualBox

source: kBuild/vendor/gnumake/current/tests/scripts/targets/DEFAULT@ 1989

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

Initial revision

  • 屬性 svn:eol-style 設為 native
檔案大小: 1.4 KB
 
1$description = "The following test creates a makefile to override part\n"
2 ."of one Makefile with Another Makefile with the .DEFAULT\n"
3 ."rule.";
4
5$details = "This tests the use of the .DEFAULT special target to say that \n"
6 ."to remake any target that cannot be made fram the information\n"
7 ."in the containing makefile, make should look in another makefile\n"
8 ."This test gives this makefile the target bar which is not \n"
9 ."defined here but passes the target bar on to another makefile\n"
10 ."which does have the target bar defined.\n";
11
12$makefile2 = &get_tmpfile;
13
14open(MAKEFILE,"> $makefile");
15
16# The Contents of the MAKEFILE ...
17
18print MAKEFILE "foo:\n";
19print MAKEFILE "\t\@echo Executing rule FOO\n\n";
20print MAKEFILE ".DEFAULT:\n";
21print MAKEFILE "\t\@\$(MAKE) -f $makefile2 \$\@ \n";
22
23# END of Contents of MAKEFILE
24
25close(MAKEFILE);
26
27
28open(MAKEFILE,"> $makefile2");
29
30print MAKEFILE "bar:\n";
31print MAKEFILE "\t\@echo Executing rule BAR\n\n";
32
33close(MAKEFILE);
34
35&run_make_with_options($makefile,'bar',&get_logfile);
36
37# Create the answer to what should be produced by this Makefile
38$answer = "${make_name}[1]: Entering directory `$pwd'\n"
39 . "Executing rule BAR\n"
40 . "${make_name}[1]: Leaving directory `$pwd'\n";
41
42# COMPARE RESULTS
43
44&compare_output($answer,&get_logfile(1));
45
46# This tells the test driver that the perl test script executed properly.
471;
48
49
50
51
52
53
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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