| @@ -1,8 +1,33 @@ | | | @@ -1,8 +1,33 @@ |
1 | # $NetBSD: depsrc-ignore.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $ | | 1 | # $NetBSD: depsrc-ignore.mk,v 1.3 2020/08/29 15:06:33 rillig Exp $ |
2 | # | | 2 | # |
3 | # Tests for the special source .IGNORE in dependency declarations. | | 3 | # Tests for the special source .IGNORE in dependency declarations, |
| | | 4 | # which ignores any command failures for that target. |
| | | 5 | # |
| | | 6 | # Even though ignore-errors fails, the all target is still made. |
| | | 7 | # Since the all target is not marked with .IGNORE, it stops at the |
| | | 8 | # first failing command. |
| | | 9 | # |
| | | 10 | # XXX: The messages in the output are confusing. |
| | | 11 | # The "ignored" comes much too late to be related to the "false |
| | | 12 | # ignore-errors". |
| | | 13 | # The "continuing" is confusing as well since it doesn't answer the |
| | | 14 | # question "continuing with what?". |
| | | 15 | # |
| | | 16 | # Even more interestingly, enabling the debugging option -de changes |
| | | 17 | # the order in which the messages appear. Now the "ignored" message |
| | | 18 | # is issued in the correct position. The manual page even defines the |
| | | 19 | # buffering of debug_file and stdout, so there should be no variance. |
| | | 20 | |
| | | 21 | #.MAKEFLAGS: -de |
| | | 22 | |
| | | 23 | all: ignore-errors |
4 | | | 24 | |
5 | # TODO: Implementation | | 25 | ignore-errors: .IGNORE |
| | | 26 | @echo $@ begin |
| | | 27 | false $@ |
| | | 28 | @echo $@ end |
6 | | | 29 | |
7 | all: | | 30 | all: |
8 | @:; | | 31 | @echo $@ begin |
| | | 32 | false $@ |
| | | 33 | @echo $@ end |