|
Last change
on this file since 54 was 53, checked in by bird, 21 years ago |
|
Initial revision
|
-
Property svn:eol-style
set to
native
|
|
File size:
894 bytes
|
| Line | |
|---|
| 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 |
|
|---|
| 5 | $details = "This test is the same as the clean test except that it should\n"
|
|---|
| 6 | ."not echo its command before deleting the specified file.\n";
|
|---|
| 7 |
|
|---|
| 8 | if ($vos)
|
|---|
| 9 | {
|
|---|
| 10 | $delete_command = "delete_file";
|
|---|
| 11 | }
|
|---|
| 12 | else
|
|---|
| 13 | {
|
|---|
| 14 | $delete_command = "rm";
|
|---|
| 15 | }
|
|---|
| 16 |
|
|---|
| 17 | $example = "EXAMPLE_FILE";
|
|---|
| 18 |
|
|---|
| 19 | open(MAKEFILE,"> $makefile");
|
|---|
| 20 |
|
|---|
| 21 | # The Contents of the MAKEFILE ...
|
|---|
| 22 |
|
|---|
| 23 | print MAKEFILE ".SILENT : clean\n";
|
|---|
| 24 | print MAKEFILE "clean: \n";
|
|---|
| 25 | print MAKEFILE "\t$delete_command EXAMPLE_FILE\n";
|
|---|
| 26 |
|
|---|
| 27 | # END of Contents of MAKEFILE
|
|---|
| 28 |
|
|---|
| 29 | close(MAKEFILE);
|
|---|
| 30 |
|
|---|
| 31 | &touch($example);
|
|---|
| 32 |
|
|---|
| 33 | $answer = "";
|
|---|
| 34 | &run_make_with_options($makefile,"clean",&get_logfile,0);
|
|---|
| 35 |
|
|---|
| 36 | &compare_output($answer,&get_logfile(1));
|
|---|
| 37 | if (-f $example)
|
|---|
| 38 | {
|
|---|
| 39 | $test_passed = 0;
|
|---|
| 40 | }
|
|---|
| 41 |
|
|---|
| 42 | 1;
|
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 |
|
|---|
| 46 |
|
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 |
|
|---|
| 50 |
|
|---|
| 51 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.