1 # $NetBSD: varmod-l-name-to-value.mk,v 1.3 2020/08/25 22:25:05 rillig Exp $
3 # Tests for the :L modifier, which returns the variable name as the new value.
5 # The empty variable name leads to an empty string.
10 # The variable name is converted into an expression with the variable name
11 # "VARNAME" and the value "VARNAME".
12 .if ${VARNAME:L} != "VARNAME"
16 # The value of the expression can be modified afterwards.
17 .if ${VARNAME:L:S,VAR,,} != "NAME"
21 # The name of the expression is still the same as before. Using the :L
22 # modifier, it can be restored.
24 # Hmmm, this can be used as a double storage or a backup mechanism.
25 # Probably unintended, but maybe useful.
26 .if ${VARNAME:L:S,VAR,,:L} != "VARNAME"