Debian Codegraph @

tests/scripts/options/dash-lowercase-c

raw
1 # -*-perl-*-
2
3 $description = "This script tests to make sure that Remke looks for
4 parent default makefiles in the correct order (GNUmakefile,makefile,Makefile)";
5
6 mkdir "work/options/testing";
7 chdir "work/options/testing";
8
9 # Create a makefile called "GNUmakefile"
10 my $makefile = "GNUmakefile";
11 my $log_filename_orig = $log_filename;
12 $log_filename = "../../../$log_filename";
13
14 open(MAKEFILE,"> $makefile");
15 print MAKEFILE "FIRST: ; \@echo It chose GNUmakefile\n";
16 close(MAKEFILE);
17
18 run_make_with_options("","-c",&get_logfile(1));
19
20 chdir "../../..";
21 $log_filename = $log_filename_orig;
22 compare_output("It chose GNUmakefile\n",&get_logfile(1));
23
24 chdir "work/options/testing";
25 $log_filename = "../../../$log_filename";
26 run_make_with_options("","--search-parent",&get_logfile(2));
27
28 chdir "../../..";
29 $log_filename = $log_filename_orig;
30 compare_output("It chose GNUmakefile\n",&get_logfile(2));
31
32 # FIXME: add a test without the option -c to see that this fails.
33 chdir "work/options/testing";
34
35 # $log_filename = "../../../$log_filename";
36 # run_make_with_options("","",&get_logfile(3));
37
38 unlink($makefile);
39 chdir "..";
40 rmdir "testing";
41 chdir "../..";
42
43 1;