1
$description ="The following test creates a makefile to test the -I option.";
4
This test tests the -I option by including a filename in
5
another directory and giving make that directory name
6
under -I in the command line. Without this option, the make
7
would fail to find the included file. It also checks to make
8
sure that the -I option gets passed to recursive makes.";
10
$makefile2 = &get_tmpfile;
12
open(MAKEFILE,"> $makefile");
14
# The Contents of the MAKEFILE ...
16
$mf2 = substr ($makefile2, index ($makefile2, $pathsep) + 1);
20
\t\@echo There should be no errors for this makefile.
23
# END of Contents of MAKEFILE
28
open(MAKEFILE,"> $makefile2");
32
\t\@echo This is another included makefile
34
\t\$(MAKE) ANOTHER -f $makefile
39
&run_make_with_options($makefile,"-I $workdir all",&get_logfile);
41
# Create the answer to what should be produced by this Makefile
42
$answer = "There should be no errors for this makefile.\n";
43
&compare_output($answer,&get_logfile(1));
46
$answer = "This is another included makefile\n";
47
&run_make_with_options($makefile,"-I $workdir ANOTHER",&get_logfile);
48
&compare_output($answer,&get_logfile(1));
51
$answer = "$mkpath ANOTHER -f $makefile
52
${make_name}[1]: Entering directory `$pwd'
53
This is another included makefile
54
${make_name}[1]: Leaving directory `$pwd'\n";
56
&run_make_with_options($makefile,"-I $workdir recurse",&get_logfile);
57
&compare_output($answer,&get_logfile(1));