FORCE 839 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. $description = "The following tests rules without Commands or Dependencies.";
  2. $details = "If the rule ...\n";
  3. if ($vos)
  4. {
  5. $delete_command = "delete_file";
  6. }
  7. else
  8. {
  9. $delete_command = "rm";
  10. }
  11. open(MAKEFILE,"> $makefile");
  12. # The Contents of the MAKEFILE ...
  13. print MAKEFILE ".IGNORE :\n";
  14. print MAKEFILE "clean: FORCE\n";
  15. print MAKEFILE "\t$delete_command clean\n";
  16. print MAKEFILE "FORCE:\n";
  17. # END of Contents of MAKEFILE
  18. close(MAKEFILE);
  19. # Create a file named "clean". This is the same name as the target clean
  20. # and tricks the target into thinking that it is up to date. (Unless you
  21. # use the .PHONY target.
  22. &touch("clean");
  23. $answer = "$delete_command clean\n";
  24. &run_make_with_options($makefile,"clean",&get_logfile);
  25. &compare_output($answer,&get_logfile(1));
  26. if (-f $example)
  27. {
  28. $test_passed = 0;
  29. }
  30. 1;