Commit 4d33a7f2 authored by Peter Eisentraut's avatar Peter Eisentraut

Fix Perl code which had broken the Windows build

The previous change wanted to avoid modifying $_ in grep, but the code
just made the change in a local variable and then lost it.  Rewrite the
code using a separate map and grep, which is clearer anyway.

Author: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
parent a6f22e83
...@@ -520,11 +520,9 @@ sub fetchRegressOpts ...@@ -520,11 +520,9 @@ sub fetchRegressOpts
# Substitute known Makefile variables, then ignore options that retain # Substitute known Makefile variables, then ignore options that retain
# an unhandled variable reference. Ignore anything that isn't an # an unhandled variable reference. Ignore anything that isn't an
# option starting with "--". # option starting with "--".
@opts = grep { @opts = grep { !/\$\(/ && /^--/ }
my $x = $_; map { (my $x = $_) =~ s/\Q$(top_builddir)\E/\"$topdir\"/; $x; }
$x =~ s/\Q$(top_builddir)\E/\"$topdir\"/; split(/\s+/, $1);
$x !~ /\$\(/ && $x =~ /^--/
} split(/\s+/, $1);
} }
if ($m =~ /^\s*ENCODING\s*=\s*(\S+)/m) if ($m =~ /^\s*ENCODING\s*=\s*(\S+)/m)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment