VirtualBox

source: kBuild/branches/GNU/src/gmake/tests/scripts/features/default_names@ 283

Last change on this file since 283 was 53, checked in by bird, 21 years ago

Initial revision

  • Property svn:eol-style set to native
File size: 1.6 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");
10
11print MAKEFILE "FIRST: ; \@echo It chose GNUmakefile\n";
12
13close(MAKEFILE);
14
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).
17#
18if ($port_type eq 'UNIX')
19{
20 # Create another makefile called "makefile"
21 open(MAKEFILE,"> makefile");
22
23 print MAKEFILE "SECOND: ; \@echo It chose makefile\n";
24
25 close(MAKEFILE);
26}
27
28
29# Create another makefile called "Makefile"
30open(MAKEFILE,"> Makefile");
31
32print MAKEFILE "THIRD: ; \@echo It chose Makefile\n";
33
34close(MAKEFILE);
35
36
37&run_make_with_options("","",&get_logfile);
38
39# Create the answer to what should be produced by this Makefile
40$answer = "It chose GNUmakefile\n";
41
42# COMPARE RESULTS
43
44&compare_output($answer,&get_logfile(1)) || &error("abort");
45unlink $makefile;
46
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).
49#
50if ($port_type eq 'UNIX')
51{
52 $answer = "It chose makefile\n";
53
54 &run_make_with_options("","",&get_logfile);
55
56 &compare_output($answer,&get_logfile(1)) || &error("abort");
57 unlink "makefile";
58}
59
60$answer = "It chose Makefile\n";
61
62&run_make_with_options("","",&get_logfile);
63
64&compare_output($answer,&get_logfile(1)) || &error("abort");
65unlink "Makefile";
Note: See TracBrowser for help on using the repository browser.

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