1#                                                                    -*-perl-*-
2
3$description = "The following test creates a makefile to delete a \n"
4              ."file in the directory.  It tests to see if make will \n"
5              ."NOT execute the command unless the rule is given in \n"
6              ."the make command line.";
7
8$example = "EXAMPLE_FILE";
9
10open(MAKEFILE,"> $makefile");
11
12# The Contents of the MAKEFILE ...
13
14print MAKEFILE "all: \n";
15print MAKEFILE "\t\@echo This makefile did not clean the dir... good\n";
16print MAKEFILE "clean: \n";
17print MAKEFILE "\t$delete_command EXAMPLE_FILE\n";
18
19# END of Contents of MAKEFILE
20
21close(MAKEFILE);
22
23&touch($example);
24
25
26&run_make_with_options($makefile,"",&get_logfile,0);
27
28# Create the answer to what should be produced by this Makefile
29$answer = "This makefile did not clean the dir... good\n";
30
31&compare_output($answer,&get_logfile(1)) || &error ("abort");
32
33
34$answer = "$delete_command $example\n";
35&run_make_with_options($makefile,"clean",&get_logfile,0);
36if (-f $example) {
37  $test_passed = 0;
38}
39&compare_output($answer,&get_logfile(1)) || &error ("abort");
40
411;
42
43
44
45
46
47
48
49
50
51