Skip to content

Commit f12976a

Browse files
committed
MSVC: Substitute $(top_builddir) in REGRESS_OPTS.
Commit d7cdf6e introduced a usage thereof. Back-patch to 9.0, like that commit.
1 parent 6306d07 commit f12976a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/tools/msvc/vcregress.pl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,9 +326,13 @@ sub fetchRegressOpts
326326
if ($m =~ /^\s*REGRESS_OPTS\s*=(.*)/m)
327327
{
328328

329-
# ignore options that use makefile variables - can't handle those
330-
# ignore anything that isn't an option staring with --
331-
@opts = grep { $_ !~ /\$\(/ && $_ =~ /^--/ } split(/\s+/, $1);
329+
# Substitute known Makefile variables, then ignore options that retain
330+
# an unhandled variable reference. Ignore anything that isn't an
331+
# option starting with "--".
332+
@opts = grep {
333+
s/\Q$(top_builddir)\E/\"$topdir\"/;
334+
$_ !~ /\$\(/ && $_ =~ /^--/
335+
} split(/\s+/, $1);
332336
}
333337
if ($m =~ /^\s*ENCODING\s*=\s*(\S+)/m)
334338
{

0 commit comments

Comments
 (0)