VirtualBox

source: kBuild/trunk/src/kmk/tests/scripts/features/default_names@ 3140

Last change on this file since 3140 was 3140, checked in by bird, 7 years ago

kmk: Merged in changes from GNU make 4.2.1 (2e55f5e4abdc0e38c1d64be703b446695e70b3b6 / https://git.savannah.gnu.org/git/make.git).

  • Property svn:eol-style set to LF
File size: 1.3 KB
Line 
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;
Note: See TracBrowser for help on using the repository browser.

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