VirtualBox

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

Last change on this file since 1960 was 1937, checked in by bird, 16 years ago

GNU Make tests: added check for case insensitive file system, fixed default_names so it'll for on HFS+.

  • Property svn:eol-style set to LF
File size: 1.4 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# DOS/WIN32 platforms preserve case, but Makefile is the same file as makefile.
14# Just test what we can here (avoid Makefile versus makefile test).
15# bird: made this generic, darwin is also defaulting to case insensitive fs.
16
17if ($port_type eq 'UNIX' && !$case_insensitive_fs) {
18 # Create another makefile called "makefile"
19 open(MAKEFILE,"> makefile");
20 print MAKEFILE "SECOND: ; \@echo It chose makefile\n";
21 close(MAKEFILE);
22}
23
24# Create another makefile called "Makefile"
25open(MAKEFILE,"> Makefile");
26print MAKEFILE "THIRD: ; \@echo It chose Makefile\n";
27close(MAKEFILE);
28
29
30&run_make_with_options("","",&get_logfile);
31&compare_output("It chose GNUmakefile\n",&get_logfile(1));
32unlink $makefile;
33
34if ($port_type eq 'UNIX' && !$case_insensitive_fs) {
35 &run_make_with_options("","",&get_logfile);
36 &compare_output("It chose makefile\n",&get_logfile(1));
37 unlink "makefile";
38}
39
40&run_make_with_options("","",&get_logfile);
41&compare_output("It chose Makefile\n",&get_logfile(1));
42unlink "Makefile";
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