VirtualBox

source: kBuild/vendor/gnumake/current/tests/scripts/features/default_names@ 486

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

Initial revision

  • 屬性 svn:eol-style 設為 native
檔案大小: 1.6 KB
 
1# -*-perl-*-
2
3$description = "This script tests to make sure that Make looks for
4default makefiles in the correct order (GNUmakefile,makefile,Makefile)";
5
6# Create a makefile called "GNUmakefile"
7$makefile = "GNUmakefile";
8
9open(MAKEFILE,"> $makefile");
10
11print MAKEFILE "FIRST: ; \@echo It chose GNUmakefile\n";
12
13close(MAKEFILE);
14
15# DOS/WIN32 platforms preserve case, but Makefile is the same file as makefile.
16# Just test what we can here (avoid Makefile versus makefile test).
17#
18if ($port_type eq 'UNIX')
19{
20 # Create another makefile called "makefile"
21 open(MAKEFILE,"> makefile");
22
23 print MAKEFILE "SECOND: ; \@echo It chose makefile\n";
24
25 close(MAKEFILE);
26}
27
28
29# Create another makefile called "Makefile"
30open(MAKEFILE,"> Makefile");
31
32print MAKEFILE "THIRD: ; \@echo It chose Makefile\n";
33
34close(MAKEFILE);
35
36
37&run_make_with_options("","",&get_logfile);
38
39# Create the answer to what should be produced by this Makefile
40$answer = "It chose GNUmakefile\n";
41
42# COMPARE RESULTS
43
44&compare_output($answer,&get_logfile(1)) || &error("abort");
45unlink $makefile;
46
47# DOS/WIN32 platforms preserve case, but Makefile is the same file as makefile.
48# Just test what we can here (avoid Makefile versus makefile test).
49#
50if ($port_type eq 'UNIX')
51{
52 $answer = "It chose makefile\n";
53
54 &run_make_with_options("","",&get_logfile);
55
56 &compare_output($answer,&get_logfile(1)) || &error("abort");
57 unlink "makefile";
58}
59
60$answer = "It chose Makefile\n";
61
62&run_make_with_options("","",&get_logfile);
63
64&compare_output($answer,&get_logfile(1)) || &error("abort");
65unlink "Makefile";
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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