VirtualBox

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

最後變更 在這個檔案從3208是 3138,由 bird 提交於 7 年 前

Imported make 4.2.1 (2e55f5e4abdc0e38c1d64be703b446695e70b3b6) from https://git.savannah.gnu.org/git/make.git.

  • 屬性 svn:eol-style 設為 LF
檔案大小: 1.3 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");
10print MAKEFILE "FIRST: ; \@echo It chose GNUmakefile\n";
11close(MAKEFILE);
12
13# Create another makefile called "makefile"
14open(MAKEFILE,"> makefile");
15print MAKEFILE "SECOND: ; \@echo It chose makefile\n";
16close(MAKEFILE);
17
18# DOS/WIN32/MacOSX platforms are case-insensitive / case-preserving, so
19# Makefile is the same file as makefile. Just test what we can here.
20
21my $case_sensitive = 0;
22if (! -f 'Makefile') {
23 # Create another makefile called "Makefile"
24 $case_sensitive = 1;
25 open(MAKEFILE,"> Makefile");
26 print MAKEFILE "THIRD: ; \@echo It chose Makefile\n";
27 close(MAKEFILE);
28}
29
30run_make_with_options("","",&get_logfile);
31compare_output("It chose GNUmakefile\n",&get_logfile(1));
32unlink($makefile);
33
34run_make_with_options("","",&get_logfile);
35compare_output("It chose makefile\n",&get_logfile(1));
36unlink("makefile");
37
38if ($case_sensitive) {
39 run_make_with_options("","",&get_logfile);
40 compare_output("It chose Makefile\n",&get_logfile(1));
41 unlink("Makefile");
42}
43
441;
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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