]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/bmake/unit-tests/varname-dot-alltargets.mk
Update to bmake-20200902
[FreeBSD/FreeBSD.git] / contrib / bmake / unit-tests / varname-dot-alltargets.mk
1 # $NetBSD: varname-dot-alltargets.mk,v 1.3 2020/08/25 22:51:54 rillig Exp $
2 #
3 # Tests for the special .ALLTARGETS variable.
4
5 .MAIN: all
6
7 TARGETS_1:=     ${.ALLTARGETS}
8
9 first second: source
10
11 TARGETS_2:=     ${.ALLTARGETS}
12
13 all:
14         # Since the tests are run with the -r option, no targets are
15         # defined at the beginning.
16         @echo ${TARGETS_1}
17
18         # Only first and second are "real" targets.
19         # The .ALLTARGETS variable is not about targets though, but
20         # about all nodes, therefore source is also included.
21         @echo ${TARGETS_2}
22
23         # Interestingly, the .END target is also implicitly defined at
24         # this point.
25         @echo ${.ALLTARGETS}