Convert all "`'" quotes to "''" per new GNU Coding Standard guidelines.
[make.git] / tests / scripts / options / dash-I
blobd47a8d8a1e4c0f264b1d51a30993f34a38cc4895
1 #                                                                    -*-perl-*-
3 $description ="The following test creates a makefile to test the -I option.";
5 $details = "\
6 This test tests the -I option by including a filename in
7 another directory and giving make that directory name
8 under -I in the command line.  Without this option, the make
9 would fail to find the included file.  It also checks to make
10 sure that the -I option gets passed to recursive makes.";
12 $makefile2 = &get_tmpfile;
14 open(MAKEFILE,"> $makefile");
16 # The Contents of the MAKEFILE ...
18 $mf2 = substr ($makefile2, index ($makefile2, $pathsep) + 1);
19 print MAKEFILE <<EOF;
20 include $mf2
21 all:
22 \t\@echo There should be no errors for this makefile.
23 EOF
25 # END of Contents of MAKEFILE
27 close(MAKEFILE);
30 open(MAKEFILE,"> $makefile2");
32 print MAKEFILE <<EOF;
33 ANOTHER:
34 \t\@echo This is another included makefile
35 recurse:
36 \t\$(MAKE) ANOTHER -f $makefile
37 EOF
39 close(MAKEFILE);
41 &run_make_with_options($makefile,"-I $workdir all",&get_logfile);
43 # Create the answer to what should be produced by this Makefile
44 $answer = "There should be no errors for this makefile.\n";
45 &compare_output($answer,&get_logfile(1));
48 $answer = "This is another included makefile\n";
49 &run_make_with_options($makefile,"-I $workdir ANOTHER",&get_logfile);
50 &compare_output($answer,&get_logfile(1));
53 $answer = "$mkpath ANOTHER -f $makefile
54 ${make_name}[1]: Entering directory '$pwd'
55 This is another included makefile
56 ${make_name}[1]: Leaving directory '$pwd'\n";
58 &run_make_with_options($makefile,"-I $workdir recurse",&get_logfile);
59 &compare_output($answer,&get_logfile(1));