3 $description = "Test the -C option to GNU make.";
6 This test is similar to the clean test except that this test creates the file
7 to delete in the work directory instead of the current directory. Make is
8 called from another directory using the -C workdir option so that it can both
9 find the makefile and the file to delete in the work directory.";
11 $example = $workdir . $pathsep . "EXAMPLE";
13 open(MAKEFILE,"> $makefile");
15 all: ; \@echo This makefile did not clean the dir ... good
16 clean: ; $delete_command EXAMPLE\$(ext)
24 &run_make_with_options("${testname}.mk",
29 $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\n"
39 . "$make_name: Leaving directory `$wpath'\n";
41 &compare_output($answer,&get_logfile(1));
46 # Do it again with trailing "/"; this should work the same
52 &run_make_with_options("${testname}.mk",
53 "-C $workdir/ clean ext=slash",
57 $wpath = &get_this_pwd;
64 # Create the answer to what should be produced by this Makefile
65 $answer = "$make_name: Entering directory `$wpath'\n"
66 . "$delete_command EXAMPLEslash\n"
67 . "$make_name: Leaving directory `$wpath'\n";
69 &compare_output($answer,&get_logfile(1));