|
Last change
on this file since 53 was 53, checked in by bird, 21 years ago |
|
Initial revision
|
-
Property svn:eol-style
set to
native
|
|
File size:
839 bytes
|
| Line | |
|---|
| 1 | $description = "The following tests rules without Commands or Dependencies.";
|
|---|
| 2 |
|
|---|
| 3 | $details = "If the rule ...\n";
|
|---|
| 4 |
|
|---|
| 5 | if ($vos)
|
|---|
| 6 | {
|
|---|
| 7 | $delete_command = "delete_file";
|
|---|
| 8 | }
|
|---|
| 9 | else
|
|---|
| 10 | {
|
|---|
| 11 | $delete_command = "rm";
|
|---|
| 12 | }
|
|---|
| 13 |
|
|---|
| 14 | open(MAKEFILE,"> $makefile");
|
|---|
| 15 |
|
|---|
| 16 | # The Contents of the MAKEFILE ...
|
|---|
| 17 |
|
|---|
| 18 | print MAKEFILE ".IGNORE :\n";
|
|---|
| 19 | print MAKEFILE "clean: FORCE\n";
|
|---|
| 20 | print MAKEFILE "\t$delete_command clean\n";
|
|---|
| 21 | print MAKEFILE "FORCE:\n";
|
|---|
| 22 |
|
|---|
| 23 | # END of Contents of MAKEFILE
|
|---|
| 24 |
|
|---|
| 25 | close(MAKEFILE);
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 | # Create a file named "clean". This is the same name as the target clean
|
|---|
| 29 | # and tricks the target into thinking that it is up to date. (Unless you
|
|---|
| 30 | # use the .PHONY target.
|
|---|
| 31 | &touch("clean");
|
|---|
| 32 |
|
|---|
| 33 | $answer = "$delete_command clean\n";
|
|---|
| 34 | &run_make_with_options($makefile,"clean",&get_logfile);
|
|---|
| 35 |
|
|---|
| 36 | &compare_output($answer,&get_logfile(1));
|
|---|
| 37 |
|
|---|
| 38 | if (-f $example)
|
|---|
| 39 | {
|
|---|
| 40 | $test_passed = 0;
|
|---|
| 41 | }
|
|---|
| 42 |
|
|---|
| 43 | 1;
|
|---|
| 44 |
|
|---|
| 45 |
|
|---|
| 46 |
|
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 |
|
|---|
| 50 |
|
|---|
| 51 |
|
|---|
| 52 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.