1 # $NetBSD: directive-elifndef.mk,v 1.3 2022/01/22 21:50:41 rillig Exp $ 2 # 3 # Tests for the .elifndef directive, which is an obscure form of writing the 4 # more usual '.elif !defined(VAR)'. 5 6 # At this point, VAR is not yet defined, and due to the 'n' in 'elifndef' the 7 # condition evaluates to true. 8 .if 0 9 .elifndef VAR && VAR || VAR 10 .else 11 . error 12 .endif 13 14 VAR= # defined 15 16 # At this point, VAR is defined, and due to the 'n' in 'elifndef' the 17 # condition evaluates to false. 18 .if 0 19 .elifndef VAR && VAR || VAR 20 . error 21 .endif 22 23 all: 24