1 1.4 rillig # $NetBSD: varmod-remember.mk,v 1.4 2021/03/14 17:07:11 rillig Exp $ 2 1.1 rillig # 3 1.2 rillig # Tests for the :_ modifier, which saves the current variable value 4 1.2 rillig # in the _ variable or another, to be used later again. 5 1.1 rillig 6 1.4 rillig .if ${1 2 3:L:_:@var@${_}@} != "1 2 3 1 2 3 1 2 3" 7 1.4 rillig . error 8 1.4 rillig .endif 9 1.4 rillig 10 1.3 rillig # In the parameterized form, having the variable name on the right side of 11 1.3 rillig # the = assignment operator is confusing. In almost all other situations 12 1.3 rillig # the variable name is on the left-hand side of the = operator. Luckily 13 1.3 rillig # this modifier is only rarely needed. 14 1.4 rillig .if ${1 2 3:L:@var@${var:_=SAVED:}@} != "1 2 3" 15 1.4 rillig . error 16 1.4 rillig .elif ${SAVED} != "3" 17 1.4 rillig . error 18 1.4 rillig .endif 19 1.4 rillig 20 1.1 rillig all: 21