mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Redo MSVC build implementation for pg_xlogdump.
The previous commit didn't work on MSVC editions earlier than Visual Studio 2011, apparently. This works by copying files into the contrib directory, and making provision to clean them up, which should work on all editions.
This commit is contained in:
@ -13,6 +13,7 @@ use Project;
|
|||||||
use Solution;
|
use Solution;
|
||||||
use Cwd;
|
use Cwd;
|
||||||
use File::Copy;
|
use File::Copy;
|
||||||
|
use File::Basename;
|
||||||
use Config;
|
use Config;
|
||||||
use VSObjectFactory;
|
use VSObjectFactory;
|
||||||
use List::Util qw(first);
|
use List::Util qw(first);
|
||||||
@ -49,8 +50,6 @@ my $contrib_extraincludes =
|
|||||||
my $contrib_extrasource = {
|
my $contrib_extrasource = {
|
||||||
'cube' => [ 'cubescan.l', 'cubeparse.y' ],
|
'cube' => [ 'cubescan.l', 'cubeparse.y' ],
|
||||||
'seg' => [ 'segscan.l', 'segparse.y' ],
|
'seg' => [ 'segscan.l', 'segparse.y' ],
|
||||||
'pg_xlogdump' => [ '../../src/backend/access/transam/xlogreader.c',
|
|
||||||
map { "../../$_" } glob('src/backend/access/rmgrdesc/*desc.c') ],
|
|
||||||
};
|
};
|
||||||
my @contrib_excludes = ('pgcrypto', 'intagg', 'sepgsql');
|
my @contrib_excludes = ('pgcrypto', 'intagg', 'sepgsql');
|
||||||
|
|
||||||
@ -586,9 +585,19 @@ sub mkvcbuild
|
|||||||
$pgregress->AddDefine('HOST_TUPLE="i686-pc-win32vc"');
|
$pgregress->AddDefine('HOST_TUPLE="i686-pc-win32vc"');
|
||||||
$pgregress->AddReference($libpgport, $libpgcommon);
|
$pgregress->AddReference($libpgport, $libpgcommon);
|
||||||
|
|
||||||
my $pg_xlogdump = (grep {$_->{name} eq 'pg_xlogdump'} @{$solution->{projects}->{contrib}} )[0];
|
# fix up pg_xlogdump once it's been set up
|
||||||
delete $pg_xlogdump->{files}->{'contrib\\pg_xlogdump\\xlogreader.c'};
|
# files symlinked on Unix are copied on windows
|
||||||
|
my $pg_xlogdump = (grep {$_->{name} eq 'pg_xlogdump'}
|
||||||
|
@{$solution->{projects}->{contrib}} )[0];
|
||||||
$pg_xlogdump->AddDefine('FRONTEND');
|
$pg_xlogdump->AddDefine('FRONTEND');
|
||||||
|
foreach my $xf (glob('src/backend/access/rmgrdesc/*desc.c') )
|
||||||
|
{
|
||||||
|
my $bf = basename $xf;
|
||||||
|
copy($xf,"contrib/pg_xlogdump/$bf");
|
||||||
|
$pg_xlogdump->AddFile("contrib\\pg_xlogdump\\$bf");
|
||||||
|
}
|
||||||
|
copy('src/backend/access/transam/xlogreader.c',
|
||||||
|
'contrib/pg_xlogdump/xlogreader.c');
|
||||||
|
|
||||||
$solution->Save();
|
$solution->Save();
|
||||||
return $solution->{vcver};
|
return $solution->{vcver};
|
||||||
|
@ -78,6 +78,11 @@ REM Clean up datafiles built with contrib
|
|||||||
REM cd contrib
|
REM cd contrib
|
||||||
REM for /r %%f in (*.sql) do if exist %%f.in del %%f
|
REM for /r %%f in (*.sql) do if exist %%f.in del %%f
|
||||||
|
|
||||||
|
REM clean up files copied into contrib\pg_xlogdump
|
||||||
|
if exist contrib\pg_xlogdump\xlogreader.c del /q contrib\pg_xlogdump\xlogreader.c
|
||||||
|
for %%f in (contrib\pg_xlogdump\*desc.c) do if not %%f==contrib\pg_xlogdump\rmgrdesc.c del /q %%f
|
||||||
|
|
||||||
|
|
||||||
cd %D%
|
cd %D%
|
||||||
|
|
||||||
REM Clean up ecpg regression test files
|
REM Clean up ecpg regression test files
|
||||||
|
Reference in New Issue
Block a user