1 # $NetBSD: varmod.mk,v 1.4 2020/11/02 17:30:22 rillig Exp $
3 # Tests for variable modifiers, such as :Q, :S,from,to or :Ufallback.
8 # To get a single '$' sign in the value of a variable expression, it has to
9 # be written as '$$' in a literal variable value.
11 # See Var_Parse, where it calls Var_Subst.
12 .if ${DOLLAR1} != "\$"
16 # Another way to get a single '$' sign is to use the :U modifier. In the
17 # argument of that modifier, a '$' is escaped using the backslash instead.
19 # See Var_Parse, where it calls Var_Subst.
20 .if ${DOLLAR2} != "\$"
24 # It is also possible to use the :U modifier directly in the expression.
26 # See Var_Parse, where it calls Var_Subst.
31 # XXX: As of 2020-09-13, it is not possible to use '$$' in a variable name
32 # to mean a single '$'. This contradicts the manual page, which says that
33 # '$' can be escaped as '$$'.
38 # In lint mode, make prints helpful error messages.
39 # For compatibility, make does not print these error messages in normal mode.
46 # A '$' followed by nothing is an error as well.
47 .if ${:Uword:@word@${word}$@} != "word"
51 # The variable modifier :P does not fall back to the SysV modifier.
52 # Therefore the modifier :P=RE generates a parse error.
53 # XXX: The .error should not be reached since the variable expression is
56 .if ${VAR:P=RE} != "STORE"