]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/bmake/unit-tests/depsrc.mk
zfs: merge OpenZFS master-436ab35a5
[FreeBSD/FreeBSD.git] / contrib / bmake / unit-tests / depsrc.mk
1 # $NetBSD: depsrc.mk,v 1.4 2020/12/22 19:38:44 rillig Exp $
2 #
3 # Tests for special sources (those starting with a dot, followed by
4 # uppercase letters) in dependency declarations, such as .PHONY.
5
6 # TODO: Implementation
7
8 # TODO: Test 'target: ${:U.SILENT}'
9
10 # Demonstrate when exactly undefined variables are expanded in a dependency
11 # declaration.
12 target: .PHONY source-${DEFINED_LATER}
13 #
14 DEFINED_LATER=  later
15 #
16 source-: .PHONY
17         : 'Undefined variables are expanded directly in the dependency'
18         : 'declaration.  They are not preserved and maybe expanded later.'
19         : 'This is in contrast to local variables such as $${.TARGET}.'
20 source-later: .PHONY
21         : 'Undefined variables are tried to be expanded in a dependency'
22         : 'declaration.  If that fails because the variable is undefined,'
23         : 'the expression is preserved and tried to be expanded later.'
24
25 all:
26         @:;