1
$description = "The following test creates a makefile to override part\n"
2
."of one Makefile with Another Makefile with the .DEFAULT\n"
5
$details = "This tests the use of the .DEFAULT special target to say that \n"
6
."to remake any target that cannot be made fram the information\n"
7
."in the containing makefile, make should look in another makefile\n"
8
."This test gives this makefile the target bar which is not \n"
9
."defined here but passes the target bar on to another makefile\n"
10
."which does have the target bar defined.\n";
12
$makefile2 = &get_tmpfile;
14
open(MAKEFILE,"> $makefile");
16
# The Contents of the MAKEFILE ...
18
print MAKEFILE "foo:\n";
19
print MAKEFILE "\t\@echo Executing rule FOO\n\n";
20
print MAKEFILE ".DEFAULT:\n";
21
print MAKEFILE "\t\@\$(MAKE) -f $makefile2 \$\@ \n";
23
# END of Contents of MAKEFILE
28
open(MAKEFILE,"> $makefile2");
30
print MAKEFILE "bar:\n";
31
print MAKEFILE "\t\@echo Executing rule BAR\n\n";
35
&run_make_with_options($makefile,'bar',&get_logfile);
37
# Create the answer to what should be produced by this Makefile
38
$answer = "${make_name}[1]: Entering directory `$pwd'\n"
39
. "Executing rule BAR\n"
40
. "${make_name}[1]: Leaving directory `$pwd'\n";
44
&compare_output($answer,&get_logfile(1));
46
# This tells the test driver that the perl test script executed properly.