]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
MSVC: Substitute $(top_builddir) in REGRESS_OPTS.
authorNoah Misch <noah@leadboat.com>
Wed, 23 Jul 2014 04:35:07 +0000 (00:35 -0400)
committerNoah Misch <noah@leadboat.com>
Wed, 23 Jul 2014 04:36:21 +0000 (00:36 -0400)
Commit d7cdf6ee36adeac9233678fb8f2a112e6678a770 introduced a usage
thereof.  Back-patch to 9.0, like that commit.

src/tools/msvc/vcregress.pl

index cc067ca54486bddb821302bbf0a54447bb717f10..8fd6cd40151a0393f54e7844c8c78a46c5e85e03 100644 (file)
@@ -249,9 +249,13 @@ sub fetchRegressOpts
     if ($m =~ /^\s*REGRESS_OPTS\s*=(.*)/m)
     {
 
-        # ignore options that use makefile variables - can't handle those
-        # ignore anything that isn't an option staring with --
-        @opts = grep { $_ !~ /\$\(/ && $_ =~ /^--/ } split(/\s+/,$1);
+               # Substitute known Makefile variables, then ignore options that retain
+               # an unhandled variable reference.  Ignore anything that isn't an
+               # option starting with "--".
+               @opts = grep {
+                       s/\Q$(top_builddir)\E/\"$topdir\"/;
+                       $_ !~ /\$\(/ && $_ =~ /^--/
+               } split(/\s+/, $1);
     }
     if ($m =~ /^\s*ENCODING\s*=\s*(\S+)/m)
     {