diff options
Diffstat (limited to 'unit-tests/directive.mk')
-rw-r--r-- | unit-tests/directive.mk | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/unit-tests/directive.mk b/unit-tests/directive.mk index 8d01a49a34cf..d463ce4f009a 100644 --- a/unit-tests/directive.mk +++ b/unit-tests/directive.mk @@ -1,8 +1,35 @@ -# $NetBSD: directive.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $ +# $NetBSD: directive.mk,v 1.4 2020/11/15 11:57:00 rillig Exp $ # # Tests for the preprocessing directives, such as .if or .info. # TODO: Implementation +# Unknown directives are correctly named in the error messages, +# even if they are indented. +.indented none +. indented 2 spaces +. indented tab + +# Directives must be written directly, not indirectly via variable +# expressions. +.${:Uinfo} directives cannot be indirect + +# There is no directive called '.target', therefore this is parsed as a +# dependency declaration with 2 targets and 1 source. +.target target: source + +# This looks ambiguous. It could be either an .info message or a variable +# assignment. It is a variable assignment. +.MAKEFLAGS: -dv +.info:= value +.info?= value # This is a variable assignment as well. +.info := value # The space after the '.info' makes this + # a directive. +.MAKEFLAGS: -d0 + +# This is a dependency since directives must be given directly. +# Not even the space after the '.info' can change anything about this. +.${:Uinfo} : source + all: @:; |