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