aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2015-04-16 15:17:26 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2015-04-16 15:17:26 -0300
commit90898af30bb287a512bef743253770fc24886da6 (patch)
tree4b1906fe3a67943cd188524c9bdf6133791bc336 /src
parentb5e384e374657ead815a3393ca59333910611a24 (diff)
downloadpostgresql-90898af30bb287a512bef743253770fc24886da6.tar.gz
postgresql-90898af30bb287a512bef743253770fc24886da6.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/tools/msvc/Mkvcbuild.pm33
1 files changed, 19 insertions, 14 deletions
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm
index e4dbebf0604..986f3b3794c 100644
--- a/src/tools/msvc/Mkvcbuild.pm
+++ b/src/tools/msvc/Mkvcbuild.pm
@@ -28,7 +28,7 @@ my $libpgcommon;
my $postgres;
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_uselibpq =
('dblink', 'oid2name', 'postgres_fdw', 'vacuumlo');
@@ -50,7 +50,7 @@ my $contrib_extraincludes =
my $contrib_extrasource = {
'cube' => [ 'contrib\cube\cubescan.l', 'contrib\cube\cubeparse.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
my $frontend_defines = { 'initdb' => 'FRONTEND' };
@@ -564,15 +564,18 @@ sub mkvcbuild
my $mf = Project::read_file('contrib/pgcrypto/Makefile');
GenerateContribSqlFiles('pgcrypto', $mf);
- opendir($D, 'contrib') || croak "Could not opendir on contrib!\n";
- while (my $d = readdir($D))
+ foreach my $subdir ('contrib', 'src/test/modules')
{
- next if ($d =~ /^\./);
- next unless (-f "contrib/$d/Makefile");
- next if (grep { /^$d$/ } @contrib_excludes);
- AddContrib($d);
+ opendir($D, $subdir) || croak "Could not opendir on $subdir!\n";
+ while (my $d = readdir($D))
+ {
+ next if ($d =~ /^\./);
+ next unless (-f "$subdir/$d/Makefile");
+ next if (grep { /^$d$/ } @contrib_excludes);
+ AddContrib($subdir, $d);
+ }
+ closedir($D);
}
- closedir($D);
$mf =
Project::read_file('src\backend\utils\mb\conversion_procs\Makefile');
@@ -689,14 +692,15 @@ sub AddSimpleFrontend
# Add a simple contrib project
sub AddContrib
{
+ my $subdir = 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)
{
my $dn = $1;
my $proj =
- $solution->AddProject($dn, 'dll', 'contrib', 'contrib\\' . $n);
+ $solution->AddProject($dn, 'dll', 'contrib', "$subdir/$n");
$proj->AddReference($postgres);
AdjustContribProj($proj);
}
@@ -705,8 +709,9 @@ sub AddContrib
foreach my $mod (split /\s+/, $1)
{
my $proj =
- $solution->AddProject($mod, 'dll', 'contrib', 'contrib\\' . $n);
- $proj->AddFile('contrib\\' . $n . '\\' . $mod . '.c');
+ $solution->AddProject($mod, 'dll', 'contrib', "$subdir/$n");
+ my $filename = $mod . '.c';
+ $proj->AddFile($subdir . '\\' . $n . '\\' . $mod . '.c');
$proj->AddReference($postgres);
AdjustContribProj($proj);
}
@@ -714,7 +719,7 @@ sub AddContrib
elsif ($mf =~ /^PROGRAM\s*=\s*(.*)$/mg)
{
my $proj =
- $solution->AddProject($1, 'exe', 'contrib', 'contrib\\' . $n);
+ $solution->AddProject($1, 'exe', 'contrib', "$subdir/$n");
AdjustContribProj($proj);
}
else