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 7TARGETS_1:= ${.ALLTARGETS} 8 9first second: source 10 11TARGETS_2:= ${.ALLTARGETS} 12 13all: 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} 26