| @@ -1,8 +1,17 @@ | | | @@ -1,8 +1,17 @@ |
1 | # $NetBSD: opt-file.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $ | | 1 | # $NetBSD: opt-file.mk,v 1.3 2020/12/06 19:00:48 rillig Exp $ |
2 | # | | 2 | # |
3 | # Tests for the -f command line option. | | 3 | # Tests for the -f command line option. |
4 | | | 4 | |
5 | # TODO: Implementation | | 5 | # TODO: Implementation |
6 | | | 6 | |
| | | 7 | all: .PHONY file-ending-in-backslash |
| | | 8 | |
| | | 9 | # Passing '-' as the filename reads from stdin. This is unusual but possible. |
| | | 10 | # |
| | | 11 | # In the unlikely case where a file ends in a backslash instead of a newline, |
| | | 12 | # that backslash is trimmed. See ParseGetLine. |
| | | 13 | file-ending-in-backslash: .PHONY |
| | | 14 | @printf '%s' 'VAR=value\' | ${MAKE} -r -f - -v VAR |
| | | 15 | |
7 | all: | | 16 | all: |
8 | @:; | | 17 | @:; |