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