2005-12-13 14:44:17 +00:00
|
|
|
# -*-perl-*-
|
|
|
|
|
2004-05-16 19:16:52 +00:00
|
|
|
$description = "The following tests rules without Commands or Dependencies.";
|
1999-09-14 02:03:19 +00:00
|
|
|
|
|
|
|
$details = "If the rule ...\n";
|
|
|
|
|
|
|
|
open(MAKEFILE,"> $makefile");
|
|
|
|
|
|
|
|
# The Contents of the MAKEFILE ...
|
|
|
|
|
|
|
|
print MAKEFILE ".IGNORE :\n";
|
|
|
|
print MAKEFILE "clean: FORCE\n";
|
2004-05-16 19:16:52 +00:00
|
|
|
print MAKEFILE "\t$delete_command clean\n";
|
1999-09-14 02:03:19 +00:00
|
|
|
print MAKEFILE "FORCE:\n";
|
|
|
|
|
|
|
|
# END of Contents of MAKEFILE
|
|
|
|
|
|
|
|
close(MAKEFILE);
|
|
|
|
|
|
|
|
|
|
|
|
# Create a file named "clean". This is the same name as the target clean
|
2004-05-16 19:16:52 +00:00
|
|
|
# and tricks the target into thinking that it is up to date. (Unless you
|
1999-09-14 02:03:19 +00:00
|
|
|
# use the .PHONY target.
|
|
|
|
&touch("clean");
|
|
|
|
|
|
|
|
$answer = "$delete_command clean\n";
|
|
|
|
&run_make_with_options($makefile,"clean",&get_logfile);
|
|
|
|
|
2004-05-16 19:16:52 +00:00
|
|
|
&compare_output($answer,&get_logfile(1));
|
1999-09-14 02:03:19 +00:00
|
|
|
|
|
|
|
1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|