1 $description = "The following test creates a makefile to test the -C dir \n"
2 ."option in make. This option tells make to change to \n"
3 ."directory dir before reading the makefile.";
5 $details = "This test is similar to the clean test except that this test\n"
6 ."creates the file to delete in the work directory instead of\n"
7 ."the current directory. Make is called from another directory\n"
8 ."using the -C workdir option so that it can both find the \n"
9 ."makefile and the file to delete in the work directory. ";
11 $example = $workdir . $pathsep . "EXAMPLE_FILE";
13 open(MAKEFILE,"> $makefile");
15 # The Contents of the MAKEFILE ...
17 print MAKEFILE "all: \n";
18 print MAKEFILE "\t\@echo This makefile did not clean the dir ... good\n";
19 print MAKEFILE "clean: \n";
20 print MAKEFILE "\t$delete_command EXAMPLE_FILE\n";
22 # END of Contents of MAKEFILE
28 &run_make_with_options("${testname}.mk",
33 $wpath = &get_this_pwd;
36 # Create the answer to what should be produced by this Makefile
37 $answer = "$make_name: Entering directory `$wpath'\n"
38 . "$delete_command EXAMPLE_FILE\n"
39 . "$make_name: Leaving directory `$wpath'\n";
41 &compare_output($answer,&get_logfile(1));