1 # $NetBSD: cond-op-or.mk,v 1.8 2021/12/10 19:14:35 rillig Exp $
3 # Tests for the || operator in .if conditions.
22 # The right-hand side is not evaluated since the left-hand side is already
27 # When an outer condition makes the inner '||' condition irrelevant, neither
28 # of its operands must be evaluated. This had been wrong in cond.c 1.283 from
29 # 2021-12-09 and was reverted in cond.c 1.284 an hour later.
30 .if 0 && (!defined(UNDEF) || ${UNDEF})
33 # Test combinations of outer '&&' with inner '||', to ensure that the operands
34 # of the inner '||' is only evaluated if necessary.
36 .if 0 && (${DEF} || ${UNDEF})
38 .if 0 && (!${DEF} || ${UNDEF})
40 .if 0 && (${UNDEF} || ${UNDEF})
42 .if 0 && (!${UNDEF} || ${UNDEF})
44 .if 1 && (${DEF} || ${UNDEF})
46 .if 1 && (!${DEF} || ${UNDEF})
48 .if 1 && (${UNDEF} || ${UNDEF})
50 .if 1 && (!${UNDEF} || ${UNDEF})
54 # The || operator may be abbreviated as |. This is not widely known though
55 # and is also not documented in the manual page.
70 # There is no operator |||.