Skip to content

Commit 98d3a7b

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 810f0d2 commit 98d3a7b

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
@@ -323,9 +323,13 @@ sub fetchRegressOpts
323323
if ($m =~ /^\s*REGRESS_OPTS\s*=(.*)/m)
324324
{
325325

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

0 commit comments

Comments
 (0)