freebsd-nq/contrib/bmake/unit-tests/varmod-match-escape.mk
Simon J. Gerraty 2c3632d14f Update to bmake-20200902
Lots of code refactoring, simplification and cleanup.
Lots of new unit-tests providing much higher code coverage.
All courtesy of rillig at netbsd.

Other significant changes:

o new read-only variable .SHELL which provides the path of the shell
  used to run scripts (as defined by  the .SHELL target).

o variable parsing detects more errors.

o new debug option -dl: LINT mode, does the equivalent of := for all
  variable assignments so that file and line number are reported for
  variable parse errors.
2020-09-05 19:29:42 +00:00

21 lines
804 B
Makefile
Executable File

# $NetBSD: varmod-match-escape.mk,v 1.1 2020/08/16 20:03:53 rillig Exp $
#
# As of 2020-08-01, the :M and :N modifiers interpret backslashes differently,
# depending on whether there was a variable expression somewhere before the
# first backslash or not. See ApplyModifier_Match, "copy = TRUE".
#
# Apart from the different and possibly confusing debug output, there is no
# difference in behavior. When parsing the modifier text, only \{, \} and \:
# are unescaped, and in the pattern matching these have the same meaning as
# their plain variants '{', '}' and ':'. In the pattern matching from
# Str_Match, only \*, \? or \[ would make a noticeable difference.
SPECIALS= \: : \\ * \*
RELEVANT= yes
.if ${SPECIALS:M${:U}\:} != ${SPECIALS:M\:${:U}}
.warning unexpected
.endif
RELEVANT= no
all:
@:;