mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-01 10:01:21 +02:00
MSVC: Include modules of src/test/modules in build
commit_ts, being only a module used for test purposes, is ignored in the process for now. Author: Michael Paquier Reviewed by: Andrew Dunstan
This commit is contained in:
parent
b5e384e374
commit
90898af30b
@ -28,7 +28,7 @@ my $libpgcommon;
|
|||||||
my $postgres;
|
my $postgres;
|
||||||
my $libpq;
|
my $libpq;
|
||||||
|
|
||||||
# Set of variables for contrib modules
|
# Set of variables for modules in contrib/ and src/test/modules/
|
||||||
my $contrib_defines = { 'refint' => 'REFINT_VERBOSE' };
|
my $contrib_defines = { 'refint' => 'REFINT_VERBOSE' };
|
||||||
my @contrib_uselibpq =
|
my @contrib_uselibpq =
|
||||||
('dblink', 'oid2name', 'postgres_fdw', 'vacuumlo');
|
('dblink', 'oid2name', 'postgres_fdw', 'vacuumlo');
|
||||||
@ -50,7 +50,7 @@ my $contrib_extraincludes =
|
|||||||
my $contrib_extrasource = {
|
my $contrib_extrasource = {
|
||||||
'cube' => [ 'contrib\cube\cubescan.l', 'contrib\cube\cubeparse.y' ],
|
'cube' => [ 'contrib\cube\cubescan.l', 'contrib\cube\cubeparse.y' ],
|
||||||
'seg' => [ 'contrib\seg\segscan.l', 'contrib\seg\segparse.y' ], };
|
'seg' => [ 'contrib\seg\segscan.l', 'contrib\seg\segparse.y' ], };
|
||||||
my @contrib_excludes = ('pgcrypto', 'intagg', 'sepgsql');
|
my @contrib_excludes = ('pgcrypto', 'commit_ts', 'intagg', 'sepgsql');
|
||||||
|
|
||||||
# Set of variables for frontend modules
|
# Set of variables for frontend modules
|
||||||
my $frontend_defines = { 'initdb' => 'FRONTEND' };
|
my $frontend_defines = { 'initdb' => 'FRONTEND' };
|
||||||
@ -564,15 +564,18 @@ sub mkvcbuild
|
|||||||
my $mf = Project::read_file('contrib/pgcrypto/Makefile');
|
my $mf = Project::read_file('contrib/pgcrypto/Makefile');
|
||||||
GenerateContribSqlFiles('pgcrypto', $mf);
|
GenerateContribSqlFiles('pgcrypto', $mf);
|
||||||
|
|
||||||
opendir($D, 'contrib') || croak "Could not opendir on contrib!\n";
|
foreach my $subdir ('contrib', 'src/test/modules')
|
||||||
|
{
|
||||||
|
opendir($D, $subdir) || croak "Could not opendir on $subdir!\n";
|
||||||
while (my $d = readdir($D))
|
while (my $d = readdir($D))
|
||||||
{
|
{
|
||||||
next if ($d =~ /^\./);
|
next if ($d =~ /^\./);
|
||||||
next unless (-f "contrib/$d/Makefile");
|
next unless (-f "$subdir/$d/Makefile");
|
||||||
next if (grep { /^$d$/ } @contrib_excludes);
|
next if (grep { /^$d$/ } @contrib_excludes);
|
||||||
AddContrib($d);
|
AddContrib($subdir, $d);
|
||||||
}
|
}
|
||||||
closedir($D);
|
closedir($D);
|
||||||
|
}
|
||||||
|
|
||||||
$mf =
|
$mf =
|
||||||
Project::read_file('src\backend\utils\mb\conversion_procs\Makefile');
|
Project::read_file('src\backend\utils\mb\conversion_procs\Makefile');
|
||||||
@ -689,14 +692,15 @@ sub AddSimpleFrontend
|
|||||||
# Add a simple contrib project
|
# Add a simple contrib project
|
||||||
sub AddContrib
|
sub AddContrib
|
||||||
{
|
{
|
||||||
|
my $subdir = shift;
|
||||||
my $n = shift;
|
my $n = shift;
|
||||||
my $mf = Project::read_file('contrib\\' . $n . '\Makefile');
|
my $mf = Project::read_file("$subdir/$n/Makefile");
|
||||||
|
|
||||||
if ($mf =~ /^MODULE_big\s*=\s*(.*)$/mg)
|
if ($mf =~ /^MODULE_big\s*=\s*(.*)$/mg)
|
||||||
{
|
{
|
||||||
my $dn = $1;
|
my $dn = $1;
|
||||||
my $proj =
|
my $proj =
|
||||||
$solution->AddProject($dn, 'dll', 'contrib', 'contrib\\' . $n);
|
$solution->AddProject($dn, 'dll', 'contrib', "$subdir/$n");
|
||||||
$proj->AddReference($postgres);
|
$proj->AddReference($postgres);
|
||||||
AdjustContribProj($proj);
|
AdjustContribProj($proj);
|
||||||
}
|
}
|
||||||
@ -705,8 +709,9 @@ sub AddContrib
|
|||||||
foreach my $mod (split /\s+/, $1)
|
foreach my $mod (split /\s+/, $1)
|
||||||
{
|
{
|
||||||
my $proj =
|
my $proj =
|
||||||
$solution->AddProject($mod, 'dll', 'contrib', 'contrib\\' . $n);
|
$solution->AddProject($mod, 'dll', 'contrib', "$subdir/$n");
|
||||||
$proj->AddFile('contrib\\' . $n . '\\' . $mod . '.c');
|
my $filename = $mod . '.c';
|
||||||
|
$proj->AddFile($subdir . '\\' . $n . '\\' . $mod . '.c');
|
||||||
$proj->AddReference($postgres);
|
$proj->AddReference($postgres);
|
||||||
AdjustContribProj($proj);
|
AdjustContribProj($proj);
|
||||||
}
|
}
|
||||||
@ -714,7 +719,7 @@ sub AddContrib
|
|||||||
elsif ($mf =~ /^PROGRAM\s*=\s*(.*)$/mg)
|
elsif ($mf =~ /^PROGRAM\s*=\s*(.*)$/mg)
|
||||||
{
|
{
|
||||||
my $proj =
|
my $proj =
|
||||||
$solution->AddProject($1, 'exe', 'contrib', 'contrib\\' . $n);
|
$solution->AddProject($1, 'exe', 'contrib', "$subdir/$n");
|
||||||
AdjustContribProj($proj);
|
AdjustContribProj($proj);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user