SILENT 894 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. $description = "The following tests the special target .SILENT. By simply\n"
  2. ."mentioning this as a target, it tells make not to print\n"
  3. ."commands before executing them.";
  4. $details = "This test is the same as the clean test except that it should\n"
  5. ."not echo its command before deleting the specified file.\n";
  6. if ($vos)
  7. {
  8. $delete_command = "delete_file";
  9. }
  10. else
  11. {
  12. $delete_command = "rm";
  13. }
  14. $example = "EXAMPLE_FILE";
  15. open(MAKEFILE,"> $makefile");
  16. # The Contents of the MAKEFILE ...
  17. print MAKEFILE ".SILENT : clean\n";
  18. print MAKEFILE "clean: \n";
  19. print MAKEFILE "\t$delete_command EXAMPLE_FILE\n";
  20. # END of Contents of MAKEFILE
  21. close(MAKEFILE);
  22. &touch($example);
  23. $answer = "";
  24. &run_make_with_options($makefile,"clean",&get_logfile,0);
  25. &compare_output($answer,&get_logfile(1));
  26. if (-f $example)
  27. {
  28. $test_passed = 0;
  29. }
  30. 1;