3 $description = "This script tests to make sure that Make looks for
4 default makefiles in the correct order (GNUmakefile,makefile,Makefile)";
6 # Create a makefile called "GNUmakefile"
7 $makefile = "GNUmakefile";
9 open(MAKEFILE,"> $makefile");
10 print MAKEFILE "FIRST: ; \@echo It chose GNUmakefile\n";
13 # Create another makefile called "makefile"
14 open(MAKEFILE,"> makefile");
15 print MAKEFILE "SECOND: ; \@echo It chose makefile\n";
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.
21 my $case_sensitive = 0;
22 if (! -f 'Makefile') {
23 # Create another makefile called "Makefile"
25 open(MAKEFILE,"> Makefile");
26 print MAKEFILE "THIRD: ; \@echo It chose Makefile\n";
30 run_make_with_options("","",&get_logfile);
31 compare_output("It chose GNUmakefile\n",&get_logfile(1));
34 run_make_with_options("","",&get_logfile);
35 compare_output("It chose makefile\n",&get_logfile(1));
38 if ($case_sensitive) {
39 run_make_with_options("","",&get_logfile);
40 compare_output("It chose Makefile\n",&get_logfile(1));