Home | History | Annotate | Line # | Download | only in unit-tests
varmod-remember.mk revision 1.3
      1  1.3  rillig # $NetBSD: varmod-remember.mk,v 1.3 2020/08/23 15:18:43 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.3  rillig # In the parameterized form, having the variable name on the right side of
      7  1.3  rillig # the = assignment operator is confusing.  In almost all other situations
      8  1.3  rillig # the variable name is on the left-hand side of the = operator.  Luckily
      9  1.3  rillig # this modifier is only rarely needed.
     10  1.1  rillig all:
     11  1.3  rillig 	@echo ${1 2 3:L:_:@var@${_}@}
     12  1.3  rillig 	@echo ${1 2 3:L:@var@${var:_=SAVED:}@}, SAVED=${SAVED}
     13