1 1.3 rillig # $NetBSD: depsrc-use.mk,v 1.3 2020/08/22 07:49:44 rillig Exp $ 2 1.1 rillig # 3 1.3 rillig # Tests for the special source .USE in dependency declarations, 4 1.3 rillig # which allows to append common commands to other targets. 5 1.1 rillig 6 1.3 rillig all: action directly 7 1.1 rillig 8 1.3 rillig first: .USE 9 1.3 rillig @echo first # Using ${.TARGET} here would expand to "action" 10 1.3 rillig 11 1.3 rillig second: .USE 12 1.3 rillig @echo second 13 1.3 rillig 14 1.3 rillig # It's possible but uncommon to have a .USE target with no commands. 15 1.3 rillig # This may happen as the result of expanding a .for loop. 16 1.3 rillig empty: .USE 17 1.3 rillig 18 1.3 rillig # It's possible but uncommon to directly make a .USEBEFORE target. 19 1.3 rillig directly: .USE 20 1.3 rillig @echo directly 21 1.3 rillig 22 1.3 rillig action: first second empty 23