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");
11 print MAKEFILE "FIRST: ; \@echo It chose GNUmakefile\n";
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).
18 if ($port_type eq 'UNIX')
20 # Create another makefile called "makefile"
21 open(MAKEFILE,"> makefile");
23 print MAKEFILE "SECOND: ; \@echo It chose makefile\n";
29 # Create another makefile called "Makefile"
30 open(MAKEFILE,"> Makefile");
32 print MAKEFILE "THIRD: ; \@echo It chose Makefile\n";
37 &run_make_with_options("","",&get_logfile);
39 # Create the answer to what should be produced by this Makefile
40 $answer = "It chose GNUmakefile\n";
44 &compare_output($answer,&get_logfile(1)) || &error("abort");
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).
50 if ($port_type eq 'UNIX')
52 $answer = "It chose makefile\n";
54 &run_make_with_options("","",&get_logfile);
56 &compare_output($answer,&get_logfile(1)) || &error("abort");
60 $answer = "It chose Makefile\n";
62 &run_make_with_options("","",&get_logfile);
64 &compare_output($answer,&get_logfile(1)) || &error("abort");