]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/bmake/unit-tests/directive.mk
Merge bmake-20201117
[FreeBSD/FreeBSD.git] / contrib / bmake / unit-tests / directive.mk
1 # $NetBSD: directive.mk,v 1.4 2020/11/15 11:57:00 rillig Exp $
2 #
3 # Tests for the preprocessing directives, such as .if or .info.
4
5 # TODO: Implementation
6
7 # Unknown directives are correctly named in the error messages,
8 # even if they are indented.
9 .indented none
10 .  indented 2 spaces
11 .       indented tab
12
13 # Directives must be written directly, not indirectly via variable
14 # expressions.
15 .${:Uinfo} directives cannot be indirect
16
17 # There is no directive called '.target', therefore this is parsed as a
18 # dependency declaration with 2 targets and 1 source.
19 .target target: source
20
21 # This looks ambiguous.  It could be either an .info message or a variable
22 # assignment.  It is a variable assignment.
23 .MAKEFLAGS: -dv
24 .info:=         value
25 .info?=         value           # This is a variable assignment as well.
26 .info :=        value           # The space after the '.info' makes this
27                                 # a directive.
28 .MAKEFLAGS: -d0
29
30 # This is a dependency since directives must be given directly.
31 # Not even the space after the '.info' can change anything about this.
32 .${:Uinfo} : source
33
34 all:
35         @:;