Skip to content

Commit d5e70c7

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 9dc2a3f commit d5e70c7

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
@@ -222,9 +222,13 @@ sub fetchRegressOpts
222222
if ($m =~ /^\s*REGRESS_OPTS\s*=(.*)/m)
223223
{
224224

225-
# ignore options that use makefile variables - can't handle those
226-
# ignore anything that isn't an option staring with --
227-
@opts = grep { $_ !~ /\$\(/ && $_ =~ /^--/ } split(/\s+/,$1);
225+
# Substitute known Makefile variables, then ignore options that retain
226+
# an unhandled variable reference. Ignore anything that isn't an
227+
# option starting with "--".
228+
@opts = grep {
229+
s/\Q$(top_builddir)\E/\"$topdir\"/;
230+
$_ !~ /\$\(/ && $_ =~ /^--/
231+
} split(/\s+/, $1);
228232
}
229233
return @opts;
230234
}

0 commit comments

Comments
 (0)