Home | History | Annotate | Line # | Download | only in unit-tests
varmod-match-escape.mk revision 1.2
      1 # $NetBSD: varmod-match-escape.mk,v 1.2 2020/10/24 08:46:08 rillig Exp $
      2 #
      3 # As of 2020-08-01, the :M and :N modifiers interpret backslashes differently,
      4 # depending on whether there was a variable expression somewhere before the
      5 # first backslash or not.  See ApplyModifier_Match, "copy = TRUE".
      6 #
      7 # Apart from the different and possibly confusing debug output, there is no
      8 # difference in behavior.  When parsing the modifier text, only \{, \} and \:
      9 # are unescaped, and in the pattern matching these have the same meaning as
     10 # their plain variants '{', '}' and ':'.  In the pattern matching from
     11 # Str_Match, only \*, \? or \[ would make a noticeable difference.
     12 SPECIALS=	\: : \\ * \*
     13 RELEVANT=	yes
     14 .if ${SPECIALS:M${:U}\:} != ${SPECIALS:M\:${:U}}
     15 .  warning unexpected
     16 .endif
     17 RELEVANT=	no
     18 
     19 all:
     20 	@:;
     21