Skip to content

Commit ecfb932

Browse files
committed
Properly parse the name of contrib modules that aren't named the same
way as their directory (notably xml2/pgxml and intarray/_int)
1 parent e019bbc commit ecfb932

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/tools/msvc/Mkvcbuild.pm

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package Mkvcbuild;
33
#
44
# Package that generates build files for msvc build
55
#
6-
# $PostgreSQL: pgsql/src/tools/msvc/Mkvcbuild.pm,v 1.5 2007/03/23 09:53:33 mha Exp $
6+
# $PostgreSQL: pgsql/src/tools/msvc/Mkvcbuild.pm,v 1.6 2007/03/24 14:13:27 mha Exp $
77
#
88
use Carp;
99
use Win32;
@@ -205,13 +205,13 @@ sub mkvcbuild
205205

206206
if ($solution->{options}->{xml})
207207
{
208-
$contrib_extraincludes->{'xml2'} = [
208+
$contrib_extraincludes->{'pgxml'} = [
209209
$solution->{options}->{xml} . '\include',
210210
$solution->{options}->{xslt} . '\include',
211211
$solution->{options}->{iconv} . '\include'
212212
];
213213

214-
$contrib_extralibs->{'xml2'} = [
214+
$contrib_extralibs->{'pgxml'} = [
215215
$solution->{options}->{xml} . '\lib\libxml2.lib',
216216
$solution->{options}->{xslt} . '\lib\libxslt.lib'
217217
];
@@ -264,7 +264,7 @@ sub mkvcbuild
264264
}
265265
closedir($D);
266266

267-
my $mf = Project::read_file('src\backend\utils\mb\conversion_procs\Makefile');
267+
$mf = Project::read_file('src\backend\utils\mb\conversion_procs\Makefile');
268268
$mf =~ s{\\s*[\r\n]+}{}mg;
269269
$mf =~ m{DIRS\s*=\s*(.*)$}m || die 'Could not match in conversion makefile' . "\n";
270270
foreach my $sub (split /\s+/,$1)
@@ -360,10 +360,11 @@ sub AddContrib
360360
my $n = shift;
361361
my $mf = Project::read_file('contrib\\' . $n . '\Makefile');
362362

363-
if ($mf =~ /^MODULE_big/mg)
363+
if ($mf =~ /^MODULE_big\s*=\s*(.*)$/mg)
364364
{
365+
my $dn = $1;
365366
$mf =~ s{\\\s*[\r\n]+}{}mg;
366-
my $proj = $solution->AddProject($n, 'dll', 'contrib');
367+
my $proj = $solution->AddProject($dn, 'dll', 'contrib');
367368
$mf =~ /^OBJS\s*=\s*(.*)$/gm || croak "Could not find objects in MODULE_big for $n\n";
368369
foreach my $o (split /\s+/, $1)
369370
{
@@ -456,7 +457,9 @@ sub GenerateContribSqlFiles
456457
{
457458
print "Building $out from $in (contrib/$n)...\n";
458459
my $cont = Project::read_file("contrib/$n/$in");
459-
$cont =~ s/MODULE_PATHNAME/\$libdir\/$n/g;
460+
my $dn = $n;
461+
if ($mf =~ /^MODULE_big\s*=\s*(.*)$/m) { $dn = $1 }
462+
$cont =~ s/MODULE_PATHNAME/\$libdir\/$dn/g;
460463
my $o;
461464
open($o,">contrib/$n/$out") || croak "Could not write to contrib/$n/$d";
462465
print $o $cont;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy