Commit ecfb932a authored by Magnus Hagander's avatar Magnus Hagander

Properly parse the name of contrib modules that aren't named the same

way as their directory (notably xml2/pgxml and intarray/_int)
parent e019bbc9
...@@ -3,7 +3,7 @@ package Mkvcbuild; ...@@ -3,7 +3,7 @@ package Mkvcbuild;
# #
# Package that generates build files for msvc build # Package that generates build files for msvc build
# #
# $PostgreSQL: pgsql/src/tools/msvc/Mkvcbuild.pm,v 1.5 2007/03/23 09:53:33 mha Exp $ # $PostgreSQL: pgsql/src/tools/msvc/Mkvcbuild.pm,v 1.6 2007/03/24 14:13:27 mha Exp $
# #
use Carp; use Carp;
use Win32; use Win32;
...@@ -205,13 +205,13 @@ sub mkvcbuild ...@@ -205,13 +205,13 @@ sub mkvcbuild
if ($solution->{options}->{xml}) if ($solution->{options}->{xml})
{ {
$contrib_extraincludes->{'xml2'} = [ $contrib_extraincludes->{'pgxml'} = [
$solution->{options}->{xml} . '\include', $solution->{options}->{xml} . '\include',
$solution->{options}->{xslt} . '\include', $solution->{options}->{xslt} . '\include',
$solution->{options}->{iconv} . '\include' $solution->{options}->{iconv} . '\include'
]; ];
$contrib_extralibs->{'xml2'} = [ $contrib_extralibs->{'pgxml'} = [
$solution->{options}->{xml} . '\lib\libxml2.lib', $solution->{options}->{xml} . '\lib\libxml2.lib',
$solution->{options}->{xslt} . '\lib\libxslt.lib' $solution->{options}->{xslt} . '\lib\libxslt.lib'
]; ];
...@@ -264,7 +264,7 @@ sub mkvcbuild ...@@ -264,7 +264,7 @@ sub mkvcbuild
} }
closedir($D); closedir($D);
my $mf = Project::read_file('src\backend\utils\mb\conversion_procs\Makefile'); $mf = Project::read_file('src\backend\utils\mb\conversion_procs\Makefile');
$mf =~ s{\\s*[\r\n]+}{}mg; $mf =~ s{\\s*[\r\n]+}{}mg;
$mf =~ m{DIRS\s*=\s*(.*)$}m || die 'Could not match in conversion makefile' . "\n"; $mf =~ m{DIRS\s*=\s*(.*)$}m || die 'Could not match in conversion makefile' . "\n";
foreach my $sub (split /\s+/,$1) foreach my $sub (split /\s+/,$1)
...@@ -360,10 +360,11 @@ sub AddContrib ...@@ -360,10 +360,11 @@ sub AddContrib
my $n = shift; my $n = shift;
my $mf = Project::read_file('contrib\\' . $n . '\Makefile'); my $mf = Project::read_file('contrib\\' . $n . '\Makefile');
if ($mf =~ /^MODULE_big/mg) if ($mf =~ /^MODULE_big\s*=\s*(.*)$/mg)
{ {
my $dn = $1;
$mf =~ s{\\\s*[\r\n]+}{}mg; $mf =~ s{\\\s*[\r\n]+}{}mg;
my $proj = $solution->AddProject($n, 'dll', 'contrib'); my $proj = $solution->AddProject($dn, 'dll', 'contrib');
$mf =~ /^OBJS\s*=\s*(.*)$/gm || croak "Could not find objects in MODULE_big for $n\n"; $mf =~ /^OBJS\s*=\s*(.*)$/gm || croak "Could not find objects in MODULE_big for $n\n";
foreach my $o (split /\s+/, $1) foreach my $o (split /\s+/, $1)
{ {
...@@ -456,7 +457,9 @@ sub GenerateContribSqlFiles ...@@ -456,7 +457,9 @@ sub GenerateContribSqlFiles
{ {
print "Building $out from $in (contrib/$n)...\n"; print "Building $out from $in (contrib/$n)...\n";
my $cont = Project::read_file("contrib/$n/$in"); my $cont = Project::read_file("contrib/$n/$in");
$cont =~ s/MODULE_PATHNAME/\$libdir\/$n/g; my $dn = $n;
if ($mf =~ /^MODULE_big\s*=\s*(.*)$/m) { $dn = $1 }
$cont =~ s/MODULE_PATHNAME/\$libdir\/$dn/g;
my $o; my $o;
open($o,">contrib/$n/$out") || croak "Could not write to contrib/$n/$d"; open($o,">contrib/$n/$out") || croak "Could not write to contrib/$n/$d";
print $o $cont; print $o $cont;
......
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