]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/bmake/unit-tests/cond-func-target.mk
Update to bmake-20201101
[FreeBSD/FreeBSD.git] / contrib / bmake / unit-tests / cond-func-target.mk
1 # $NetBSD: cond-func-target.mk,v 1.4 2020/10/24 08:46:08 rillig Exp $
2 #
3 # Tests for the target() function in .if conditions.
4
5 .MAIN: all
6
7 # The target "target" does not exist yet.
8 .if target(target)
9 .  error
10 .endif
11
12 target:
13
14 # The target exists, even though it does not have any commands.
15 .if !target(target)
16 .  error
17 .endif
18
19 target:
20         # not a command
21
22 # Adding a comment to an existing target does not change whether the target
23 # is defined or not.
24 .if !target(target)
25 .  error
26 .endif
27
28 target:
29         @:;
30
31 # Adding a command to an existing target does not change whether the target
32 # is defined or not.
33 .if !target(target)
34 .  error
35 .endif
36
37 all:
38         @:;