Make pg_xlogdump MSVC build work more like others.

Instead of copying xlogreader.c and *desc.c files into the source directory,
build them where they are. That's what we do for other binaries that need to
compile and link in files from elsewhere in the source tree.

The commit history suggests that it was done this way because of issues with
older versions of MSVC. I think this should work, but we'll see if the
buildfarm complains.
This commit is contained in:
Heikki Linnakangas 2015-03-21 11:53:47 +02:00
parent 30a5ce8f5d
commit 1933a5bbc8
2 changed files with 3 additions and 13 deletions

View File

@ -13,7 +13,6 @@ use Project;
use Solution;
use Cwd;
use File::Copy;
use File::Basename;
use Config;
use VSObjectFactory;
use List::Util qw(first);
@ -628,15 +627,11 @@ sub mkvcbuild
(grep { $_->{name} eq 'pg_xlogdump' }
@{ $solution->{projects}->{contrib} })[0];
$pg_xlogdump->AddDefine('FRONTEND');
foreach my $xf (glob('src/backend/access/rmgrdesc/*desc.c'))
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");
$pg_xlogdump->AddFile($xf)
}
copy(
'src/backend/access/transam/xlogreader.c',
'contrib/pg_xlogdump/xlogreader.c');
$pg_xlogdump->AddFile('src\backend\access\transam\xlogreader.c');
$solution->Save();
return $solution->{vcver};

View File

@ -92,11 +92,6 @@ REM Clean up datafiles built with contrib
REM cd contrib
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%
REM Clean up ecpg regression test files