1 1.4 rillig # $NetBSD: varmod-ifelse.mk,v 1.4 2020/10/09 07:03:20 rillig Exp $ 2 1.1 rillig # 3 1.2 rillig # Tests for the ${cond:?then:else} variable modifier, which evaluates either 4 1.2 rillig # the then-expression or the else-expression, depending on the condition. 5 1.1 rillig 6 1.1 rillig # TODO: Implementation 7 1.1 rillig 8 1.4 rillig # When the :? is parsed, it is greedy. The else branch spans all the 9 1.4 rillig # text, up until the closing character '}', even if the text looks like 10 1.4 rillig # another modifier. 11 1.4 rillig .if ${1:?then:else:Q} != "then" 12 1.4 rillig . error 13 1.4 rillig .endif 14 1.4 rillig .if ${0:?then:else:Q} != "else:Q" 15 1.4 rillig . error 16 1.4 rillig .endif 17 1.3 rillig 18 1.1 rillig all: 19 1.1 rillig @:; 20