my @contrib_uselibpq =
('dblink', 'oid2name', 'postgres_fdw', 'vacuumlo');
my @contrib_uselibpgport = (
+ 'chkpass',
'oid2name',
'pg_standby',
'vacuumlo');
my @contrib_uselibpgcommon = (
+ 'chkpass',
'oid2name',
'pg_standby',
'vacuumlo');
my $contrib_extraincludes =
{ 'tsearch2' => ['contrib/tsearch2'], 'dblink' => ['src/backend'] };
my $contrib_extrasource = {
- 'cube' => [ 'contrib\cube\cubescan.l', 'contrib\cube\cubeparse.y' ],
- 'seg' => [ 'contrib\seg\segscan.l', 'contrib\seg\segparse.y' ], };
+ 'cube' => [ 'contrib/cube/cubescan.l', 'contrib/cube/cubeparse.y' ],
+ 'seg' => [ 'contrib/seg/segscan.l', 'contrib/seg/segparse.y' ], };
my @contrib_excludes = ('pgcrypto', 'commit_ts', 'intagg', 'sepgsql');
# Set of variables for frontend modules
'pgbench' => ['ws2_32.lib'],
'psql' => ['ws2_32.lib'] };
my $frontend_extraincludes = {
- 'initdb' => ['src\timezone'],
- 'psql' => [ 'src\bin\pg_dump', 'src\backend' ] };
+ 'initdb' => ['src/timezone'],
+ 'psql' => [ 'src/bin/pg_dump', 'src/backend' ] };
my $frontend_extrasource = {
- 'psql' => ['src\bin\psql\psqlscan.l'],
+ 'psql' => ['src/bin/psql/psqlscan.l'],
'pgbench' =>
- [ 'src\bin\pgbench\exprscan.l', 'src\bin\pgbench\exprparse.y' ],
+ [ 'src/bin/pgbench/exprscan.l', 'src/bin/pgbench/exprparse.y' ],
};
my @frontend_excludes =
('pgevent', 'pg_basebackup', 'pg_rewind', 'pg_dump', 'pg_xlogdump', 'scripts');
{
our $config = shift;
- chdir('..\..\..') if (-d '..\msvc' && -d '..\..\..\src');
+ chdir('../../..') if (-d '../msvc' && -d '../../../src');
die 'Must run from root or msvc directory'
- unless (-d 'src\tools\msvc' && -d 'src');
+ unless (-d 'src/tools/msvc' && -d 'src');
my $vsVersion = DetermineVisualStudioVersion();
$libpgport = $solution->AddProject('libpgport', 'lib', 'misc');
$libpgport->AddDefine('FRONTEND');
- $libpgport->AddFiles('src\port', @pgportfiles);
+ $libpgport->AddFiles('src/port', @pgportfiles);
$libpgcommon = $solution->AddProject('libpgcommon', 'lib', 'misc');
$libpgcommon->AddDefine('FRONTEND');
- $libpgcommon->AddFiles('src\common', @pgcommonfrontendfiles);
+ $libpgcommon->AddFiles('src/common', @pgcommonfrontendfiles);
- $postgres = $solution->AddProject('postgres', 'exe', '', 'src\backend');
- $postgres->AddIncludeDir('src\backend');
- $postgres->AddDir('src\backend\port\win32');
- $postgres->AddFile('src\backend\utils\fmgrtab.c');
+ $postgres = $solution->AddProject('postgres', 'exe', '', 'src/backend');
+ $postgres->AddIncludeDir('src/backend');
+ $postgres->AddDir('src/backend/port/win32');
+ $postgres->AddFile('src/backend/utils/fmgrtab.c');
$postgres->ReplaceFile(
- 'src\backend\port\dynloader.c',
- 'src\backend\port\dynloader\win32.c');
- $postgres->ReplaceFile('src\backend\port\pg_sema.c',
- 'src\backend\port\win32_sema.c');
- $postgres->ReplaceFile('src\backend\port\pg_shmem.c',
- 'src\backend\port\win32_shmem.c');
- $postgres->ReplaceFile('src\backend\port\pg_latch.c',
- 'src\backend\port\win32_latch.c');
- $postgres->AddFiles('src\port', @pgportfiles);
- $postgres->AddFiles('src\common', @pgcommonbkndfiles);
- $postgres->AddDir('src\timezone');
-
- # We need source files from src\timezone, but that directory's resource
+ 'src/backend/port/dynloader.c',
+ 'src/backend/port/dynloader/win32.c');
+ $postgres->ReplaceFile('src/backend/port/pg_sema.c',
+ 'src/backend/port/win32_sema.c');
+ $postgres->ReplaceFile('src/backend/port/pg_shmem.c',
+ 'src/backend/port/win32_shmem.c');
+ $postgres->ReplaceFile('src/backend/port/pg_latch.c',
+ 'src/backend/port/win32_latch.c');
+ $postgres->AddFiles('src/port', @pgportfiles);
+ $postgres->AddFiles('src/common', @pgcommonbkndfiles);
+ $postgres->AddDir('src/timezone');
+
+ # We need source files from src/timezone, but that directory's resource
# file pertains to "zic", not to the backend.
- $postgres->RemoveFile('src\timezone\win32ver.rc');
- $postgres->AddFiles('src\backend\parser', 'scan.l', 'gram.y');
- $postgres->AddFiles('src\backend\bootstrap', 'bootscanner.l',
+ $postgres->RemoveFile('src/timezone/win32ver.rc');
+ $postgres->AddFiles('src/backend/parser', 'scan.l', 'gram.y');
+ $postgres->AddFiles('src/backend/bootstrap', 'bootscanner.l',
'bootparse.y');
- $postgres->AddFiles('src\backend\utils\misc', 'guc-file.l');
- $postgres->AddFiles('src\backend\replication', 'repl_scanner.l',
+ $postgres->AddFiles('src/backend/utils/misc', 'guc-file.l');
+ $postgres->AddFiles('src/backend/replication', 'repl_scanner.l',
'repl_gram.y');
$postgres->AddDefine('BUILDING_DLL');
$postgres->AddLibrary('secur32.lib');
# if building without OpenSSL
if (!$solution->{options}->{openssl})
{
- $postgres->RemoveFile('src\backend\libpq\be-secure-openssl.c');
+ $postgres->RemoveFile('src/backend/libpq/be-secure-openssl.c');
}
my $snowball = $solution->AddProject('dict_snowball', 'dll', '',
- 'src\backend\snowball');
+ 'src/backend/snowball');
# This Makefile uses VPATH to find most source files in a subdirectory.
$snowball->RelocateFiles(
- 'src\backend\snowball\libstemmer',
+ 'src/backend/snowball/libstemmer',
sub {
return shift !~ /(dict_snowball.c|win32ver.rc)$/;
});
- $snowball->AddIncludeDir('src\include\snowball');
+ $snowball->AddIncludeDir('src/include/snowball');
$snowball->AddReference($postgres);
my $plpgsql =
- $solution->AddProject('plpgsql', 'dll', 'PLs', 'src\pl\plpgsql\src');
- $plpgsql->AddFiles('src\pl\plpgsql\src', 'pl_gram.y');
+ $solution->AddProject('plpgsql', 'dll', 'PLs', 'src/pl/plpgsql/src');
+ $plpgsql->AddFiles('src/pl/plpgsql/src', 'pl_gram.y');
$plpgsql->AddReference($postgres);
if ($solution->{options}->{perl})
{
- my $plperlsrc = "src\\pl\\plperl\\";
+ my $plperlsrc = "src/pl/plperl/";
my $plperl =
- $solution->AddProject('plperl', 'dll', 'PLs', 'src\pl\plperl');
+ $solution->AddProject('plperl', 'dll', 'PLs', 'src/pl/plperl');
$plperl->AddIncludeDir($solution->{options}->{perl} . '/lib/CORE');
$plperl->AddDefine('PLPERL_HAVE_UID_GID');
foreach my $xs ('SPI.xs', 'Util.xs')
(my $xsc = $xs) =~ s/\.xs/.c/;
if (Solution::IsNewer("$plperlsrc$xsc", "$plperlsrc$xs"))
{
- my $xsubppdir = first { -e "$_\\ExtUtils\\xsubpp" } @INC;
+ my $xsubppdir = first { -e "$_/ExtUtils/xsubpp" } @INC;
print "Building $plperlsrc$xsc...\n";
system( $solution->{options}->{perl}
. '/bin/perl '
}
}
if (Solution::IsNewer(
- 'src\pl\plperl\perlchunks.h',
- 'src\pl\plperl\plc_perlboot.pl')
+ 'src/pl/plperl/perlchunks.h',
+ 'src/pl/plperl/plc_perlboot.pl')
|| Solution::IsNewer(
- 'src\pl\plperl\perlchunks.h',
- 'src\pl\plperl\plc_trusted.pl'))
+ 'src/pl/plperl/perlchunks.h',
+ 'src/pl/plperl/plc_trusted.pl'))
{
- print 'Building src\pl\plperl\perlchunks.h ...' . "\n";
+ print 'Building src/pl/plperl/perlchunks.h ...' . "\n";
my $basedir = getcwd;
- chdir 'src\pl\plperl';
+ chdir 'src/pl/plperl';
system( $solution->{options}->{perl}
. '/bin/perl '
. 'text2macro.pl '
. 'plc_perlboot.pl plc_trusted.pl '
. '>perlchunks.h');
chdir $basedir;
- if ((!(-f 'src\pl\plperl\perlchunks.h'))
- || -z 'src\pl\plperl\perlchunks.h')
+ if ((!(-f 'src/pl/plperl/perlchunks.h'))
+ || -z 'src/pl/plperl/perlchunks.h')
{
- unlink('src\pl\plperl\perlchunks.h'); # if zero size
+ unlink('src/pl/plperl/perlchunks.h'); # if zero size
die 'Failed to create perlchunks.h' . "\n";
}
}
if (Solution::IsNewer(
- 'src\pl\plperl\plperl_opmask.h',
- 'src\pl\plperl\plperl_opmask.pl'))
+ 'src/pl/plperl/plperl_opmask.h',
+ 'src/pl/plperl/plperl_opmask.pl'))
{
- print 'Building src\pl\plperl\plperl_opmask.h ...' . "\n";
+ print 'Building src/pl/plperl/plperl_opmask.h ...' . "\n";
my $basedir = getcwd;
- chdir 'src\pl\plperl';
+ chdir 'src/pl/plperl';
system( $solution->{options}->{perl}
. '/bin/perl '
. 'plperl_opmask.pl '
. 'plperl_opmask.h');
chdir $basedir;
- if ((!(-f 'src\pl\plperl\plperl_opmask.h'))
- || -z 'src\pl\plperl\plperl_opmask.h')
+ if ((!(-f 'src/pl/plperl/plperl_opmask.h'))
+ || -z 'src/pl/plperl/plperl_opmask.h')
{
- unlink('src\pl\plperl\plperl_opmask.h'); # if zero size
+ unlink('src/pl/plperl/plperl_opmask.h'); # if zero size
die 'Failed to create plperl_opmask.h' . "\n";
}
}
my $pymajorver = substr($pyver, 0, 1);
my $plpython = $solution->AddProject('plpython' . $pymajorver,
- 'dll', 'PLs', 'src\pl\plpython');
- $plpython->AddIncludeDir($pyprefix . '\include');
- $plpython->AddLibrary($pyprefix . "\\Libs\\python$pyver.lib");
+ 'dll', 'PLs', 'src/pl/plpython');
+ $plpython->AddIncludeDir($pyprefix . '/include');
+ $plpython->AddLibrary($pyprefix . "/Libs/python$pyver.lib");
$plpython->AddReference($postgres);
}
if ($solution->{options}->{tcl})
{
my $pltcl =
- $solution->AddProject('pltcl', 'dll', 'PLs', 'src\pl\tcl');
- $pltcl->AddIncludeDir($solution->{options}->{tcl} . '\include');
+ $solution->AddProject('pltcl', 'dll', 'PLs', 'src/pl/tcl');
+ $pltcl->AddIncludeDir($solution->{options}->{tcl} . '/include');
$pltcl->AddReference($postgres);
- if (-e $solution->{options}->{tcl} . '\lib\tcl85.lib')
+ if (-e $solution->{options}->{tcl} . '/lib/tcl85.lib')
{
$pltcl->AddLibrary(
- $solution->{options}->{tcl} . '\lib\tcl85.lib');
+ $solution->{options}->{tcl} . '/lib/tcl85.lib');
}
else
{
$pltcl->AddLibrary(
- $solution->{options}->{tcl} . '\lib\tcl84.lib');
+ $solution->{options}->{tcl} . '/lib/tcl84.lib');
}
}
$libpq = $solution->AddProject('libpq', 'dll', 'interfaces',
- 'src\interfaces\libpq');
+ 'src/interfaces/libpq');
$libpq->AddDefine('FRONTEND');
$libpq->AddDefine('UNSAFE_STAT_OK');
- $libpq->AddIncludeDir('src\port');
+ $libpq->AddIncludeDir('src/port');
$libpq->AddLibrary('secur32.lib');
$libpq->AddLibrary('ws2_32.lib');
$libpq->AddLibrary('wldap32.lib') if ($solution->{options}->{ldap});
- $libpq->UseDef('src\interfaces\libpq\libpqdll.def');
- $libpq->ReplaceFile('src\interfaces\libpq\libpqrc.c',
- 'src\interfaces\libpq\libpq.rc');
+ $libpq->UseDef('src/interfaces/libpq/libpqdll.def');
+ $libpq->ReplaceFile('src/interfaces/libpq/libpqrc.c',
+ 'src/interfaces/libpq/libpq.rc');
$libpq->AddReference($libpgport);
# The OBJS scraper doesn't know about ifdefs, so remove fe-secure-openssl.c
# if building without OpenSSL
if (!$solution->{options}->{openssl})
{
- $libpq->RemoveFile('src\interfaces\libpq\fe-secure-openssl.c');
+ $libpq->RemoveFile('src/interfaces/libpq/fe-secure-openssl.c');
}
my $libpqwalreceiver =
$solution->AddProject('libpqwalreceiver', 'dll', '',
- 'src\backend\replication\libpqwalreceiver');
- $libpqwalreceiver->AddIncludeDir('src\interfaces\libpq');
+ 'src/backend/replication/libpqwalreceiver');
+ $libpqwalreceiver->AddIncludeDir('src/interfaces/libpq');
$libpqwalreceiver->AddReference($postgres, $libpq);
my $pgtypes = $solution->AddProject(
'libpgtypes', 'dll',
- 'interfaces', 'src\interfaces\ecpg\pgtypeslib');
+ 'interfaces', 'src/interfaces/ecpg/pgtypeslib');
$pgtypes->AddDefine('FRONTEND');
$pgtypes->AddReference($libpgport);
- $pgtypes->UseDef('src\interfaces\ecpg\pgtypeslib\pgtypeslib.def');
- $pgtypes->AddIncludeDir('src\interfaces\ecpg\include');
+ $pgtypes->UseDef('src/interfaces/ecpg/pgtypeslib/pgtypeslib.def');
+ $pgtypes->AddIncludeDir('src/interfaces/ecpg/include');
my $libecpg = $solution->AddProject('libecpg', 'dll', 'interfaces',
- 'src\interfaces\ecpg\ecpglib');
+ 'src/interfaces/ecpg/ecpglib');
$libecpg->AddDefine('FRONTEND');
- $libecpg->AddIncludeDir('src\interfaces\ecpg\include');
- $libecpg->AddIncludeDir('src\interfaces\libpq');
- $libecpg->AddIncludeDir('src\port');
- $libecpg->UseDef('src\interfaces\ecpg\ecpglib\ecpglib.def');
+ $libecpg->AddIncludeDir('src/interfaces/ecpg/include');
+ $libecpg->AddIncludeDir('src/interfaces/libpq');
+ $libecpg->AddIncludeDir('src/port');
+ $libecpg->UseDef('src/interfaces/ecpg/ecpglib/ecpglib.def');
$libecpg->AddLibrary('ws2_32.lib');
$libecpg->AddReference($libpq, $pgtypes, $libpgport);
my $libecpgcompat = $solution->AddProject(
'libecpg_compat', 'dll',
- 'interfaces', 'src\interfaces\ecpg\compatlib');
+ 'interfaces', 'src/interfaces/ecpg/compatlib');
$libecpgcompat->AddDefine('FRONTEND');
- $libecpgcompat->AddIncludeDir('src\interfaces\ecpg\include');
- $libecpgcompat->AddIncludeDir('src\interfaces\libpq');
- $libecpgcompat->UseDef('src\interfaces\ecpg\compatlib\compatlib.def');
+ $libecpgcompat->AddIncludeDir('src/interfaces/ecpg/include');
+ $libecpgcompat->AddIncludeDir('src/interfaces/libpq');
+ $libecpgcompat->UseDef('src/interfaces/ecpg/compatlib/compatlib.def');
$libecpgcompat->AddReference($pgtypes, $libecpg, $libpgport);
my $ecpg = $solution->AddProject('ecpg', 'exe', 'interfaces',
- 'src\interfaces\ecpg\preproc');
- $ecpg->AddIncludeDir('src\interfaces\ecpg\include');
- $ecpg->AddIncludeDir('src\interfaces\libpq');
- $ecpg->AddPrefixInclude('src\interfaces\ecpg\preproc');
- $ecpg->AddFiles('src\interfaces\ecpg\preproc', 'pgc.l', 'preproc.y');
+ 'src/interfaces/ecpg/preproc');
+ $ecpg->AddIncludeDir('src/interfaces/ecpg/include');
+ $ecpg->AddIncludeDir('src/interfaces/libpq');
+ $ecpg->AddPrefixInclude('src/interfaces/ecpg/preproc');
+ $ecpg->AddFiles('src/interfaces/ecpg/preproc', 'pgc.l', 'preproc.y');
$ecpg->AddDefine('MAJOR_VERSION=4');
$ecpg->AddDefine('MINOR_VERSION=11');
$ecpg->AddDefine('PATCHLEVEL=0');
my $pgregress_ecpg =
$solution->AddProject('pg_regress_ecpg', 'exe', 'misc');
- $pgregress_ecpg->AddFile('src\interfaces\ecpg\test\pg_regress_ecpg.c');
- $pgregress_ecpg->AddFile('src\test\regress\pg_regress.c');
- $pgregress_ecpg->AddIncludeDir('src\port');
- $pgregress_ecpg->AddIncludeDir('src\test\regress');
+ $pgregress_ecpg->AddFile('src/interfaces/ecpg/test/pg_regress_ecpg.c');
+ $pgregress_ecpg->AddFile('src/test/regress/pg_regress.c');
+ $pgregress_ecpg->AddIncludeDir('src/port');
+ $pgregress_ecpg->AddIncludeDir('src/test/regress');
$pgregress_ecpg->AddDefine('HOST_TUPLE="i686-pc-win32vc"');
$pgregress_ecpg->AddLibrary('ws2_32.lib');
- $pgregress_ecpg->AddDirResourceFile('src\interfaces\ecpg\test');
+ $pgregress_ecpg->AddDirResourceFile('src/interfaces/ecpg/test');
$pgregress_ecpg->AddReference($libpgcommon, $libpgport);
my $isolation_tester =
$solution->AddProject('isolationtester', 'exe', 'misc');
- $isolation_tester->AddFile('src\test\isolation\isolationtester.c');
- $isolation_tester->AddFile('src\test\isolation\specparse.y');
- $isolation_tester->AddFile('src\test\isolation\specscanner.l');
- $isolation_tester->AddFile('src\test\isolation\specparse.c');
- $isolation_tester->AddIncludeDir('src\test\isolation');
- $isolation_tester->AddIncludeDir('src\port');
- $isolation_tester->AddIncludeDir('src\test\regress');
- $isolation_tester->AddIncludeDir('src\interfaces\libpq');
+ $isolation_tester->AddFile('src/test/isolation/isolationtester.c');
+ $isolation_tester->AddFile('src/test/isolation/specparse.y');
+ $isolation_tester->AddFile('src/test/isolation/specscanner.l');
+ $isolation_tester->AddFile('src/test/isolation/specparse.c');
+ $isolation_tester->AddIncludeDir('src/test/isolation');
+ $isolation_tester->AddIncludeDir('src/port');
+ $isolation_tester->AddIncludeDir('src/test/regress');
+ $isolation_tester->AddIncludeDir('src/interfaces/libpq');
$isolation_tester->AddDefine('HOST_TUPLE="i686-pc-win32vc"');
$isolation_tester->AddLibrary('ws2_32.lib');
- $isolation_tester->AddDirResourceFile('src\test\isolation');
+ $isolation_tester->AddDirResourceFile('src/test/isolation');
$isolation_tester->AddReference($libpq, $libpgcommon, $libpgport);
my $pgregress_isolation =
$solution->AddProject('pg_isolation_regress', 'exe', 'misc');
- $pgregress_isolation->AddFile('src\test\isolation\isolation_main.c');
- $pgregress_isolation->AddFile('src\test\regress\pg_regress.c');
- $pgregress_isolation->AddIncludeDir('src\port');
- $pgregress_isolation->AddIncludeDir('src\test\regress');
+ $pgregress_isolation->AddFile('src/test/isolation/isolation_main.c');
+ $pgregress_isolation->AddFile('src/test/regress/pg_regress.c');
+ $pgregress_isolation->AddIncludeDir('src/port');
+ $pgregress_isolation->AddIncludeDir('src/test/regress');
$pgregress_isolation->AddDefine('HOST_TUPLE="i686-pc-win32vc"');
$pgregress_isolation->AddLibrary('ws2_32.lib');
- $pgregress_isolation->AddDirResourceFile('src\test\isolation');
+ $pgregress_isolation->AddDirResourceFile('src/test/isolation');
$pgregress_isolation->AddReference($libpgcommon, $libpgport);
# src/bin
}
my $pgbasebackup = AddSimpleFrontend('pg_basebackup', 1);
- $pgbasebackup->AddFile('src\bin\pg_basebackup\pg_basebackup.c');
+ $pgbasebackup->AddFile('src/bin/pg_basebackup/pg_basebackup.c');
$pgbasebackup->AddLibrary('ws2_32.lib');
my $pgreceivexlog = AddSimpleFrontend('pg_basebackup', 1);
$pgreceivexlog->{name} = 'pg_receivexlog';
- $pgreceivexlog->AddFile('src\bin\pg_basebackup\pg_receivexlog.c');
+ $pgreceivexlog->AddFile('src/bin/pg_basebackup/pg_receivexlog.c');
$pgreceivexlog->AddLibrary('ws2_32.lib');
my $pgrecvlogical = AddSimpleFrontend('pg_basebackup', 1);
$pgrecvlogical->{name} = 'pg_recvlogical';
- $pgrecvlogical->AddFile('src\bin\pg_basebackup\pg_recvlogical.c');
+ $pgrecvlogical->AddFile('src/bin/pg_basebackup/pg_recvlogical.c');
$pgrecvlogical->AddLibrary('ws2_32.lib');
my $pgrewind = AddSimpleFrontend('pg_rewind', 1);
$pgrewind->{name} = 'pg_rewind';
- $pgrewind->AddFile('src\backend\access\transam\xlogreader.c');
+ $pgrewind->AddFile('src/backend/access/transam/xlogreader.c');
$pgrewind->AddLibrary('ws2_32.lib');
$pgrewind->AddDefine('FRONTEND');
my $pgevent = $solution->AddProject('pgevent', 'dll', 'bin');
- $pgevent->AddFiles('src\bin\pgevent', 'pgevent.c', 'pgmsgevent.rc');
- $pgevent->AddResourceFile('src\bin\pgevent', 'Eventlog message formatter',
+ $pgevent->AddFiles('src/bin/pgevent', 'pgevent.c', 'pgmsgevent.rc');
+ $pgevent->AddResourceFile('src/bin/pgevent', 'Eventlog message formatter',
'win32');
- $pgevent->RemoveFile('src\bin\pgevent\win32ver.rc');
- $pgevent->UseDef('src\bin\pgevent\pgevent.def');
+ $pgevent->RemoveFile('src/bin/pgevent/win32ver.rc');
+ $pgevent->UseDef('src/bin/pgevent/pgevent.def');
$pgevent->DisableLinkerWarnings('4104');
my $pgdump = AddSimpleFrontend('pg_dump', 1);
- $pgdump->AddIncludeDir('src\backend');
- $pgdump->AddFile('src\bin\pg_dump\pg_dump.c');
- $pgdump->AddFile('src\bin\pg_dump\common.c');
- $pgdump->AddFile('src\bin\pg_dump\pg_dump_sort.c');
- $pgdump->AddFile('src\bin\pg_dump\keywords.c');
- $pgdump->AddFile('src\backend\parser\kwlookup.c');
+ $pgdump->AddIncludeDir('src/backend');
+ $pgdump->AddFile('src/bin/pg_dump/pg_dump.c');
+ $pgdump->AddFile('src/bin/pg_dump/common.c');
+ $pgdump->AddFile('src/bin/pg_dump/pg_dump_sort.c');
+ $pgdump->AddFile('src/bin/pg_dump/keywords.c');
+ $pgdump->AddFile('src/backend/parser/kwlookup.c');
$pgdump->AddLibrary('ws2_32.lib');
my $pgdumpall = AddSimpleFrontend('pg_dump', 1);
# pg_dump and pg_restore.
# So remove their sources from the object, keeping the other setup that
# AddSimpleFrontend() has done.
- my @nodumpall = grep { m/src\\bin\\pg_dump\\.*\.c$/ }
+ my @nodumpall = grep { m!src/bin/pg_dump/.*\.c$! }
keys %{ $pgdumpall->{files} };
delete @{ $pgdumpall->{files} }{@nodumpall};
$pgdumpall->{name} = 'pg_dumpall';
- $pgdumpall->AddIncludeDir('src\backend');
- $pgdumpall->AddFile('src\bin\pg_dump\pg_dumpall.c');
- $pgdumpall->AddFile('src\bin\pg_dump\dumputils.c');
- $pgdumpall->AddFile('src\bin\pg_dump\keywords.c');
- $pgdumpall->AddFile('src\backend\parser\kwlookup.c');
+ $pgdumpall->AddIncludeDir('src/backend');
+ $pgdumpall->AddFile('src/bin/pg_dump/pg_dumpall.c');
+ $pgdumpall->AddFile('src/bin/pg_dump/dumputils.c');
+ $pgdumpall->AddFile('src/bin/pg_dump/keywords.c');
+ $pgdumpall->AddFile('src/backend/parser/kwlookup.c');
$pgdumpall->AddLibrary('ws2_32.lib');
my $pgrestore = AddSimpleFrontend('pg_dump', 1);
$pgrestore->{name} = 'pg_restore';
- $pgrestore->AddIncludeDir('src\backend');
- $pgrestore->AddFile('src\bin\pg_dump\pg_restore.c');
- $pgrestore->AddFile('src\bin\pg_dump\keywords.c');
- $pgrestore->AddFile('src\backend\parser\kwlookup.c');
+ $pgrestore->AddIncludeDir('src/backend');
+ $pgrestore->AddFile('src/bin/pg_dump/pg_restore.c');
+ $pgrestore->AddFile('src/bin/pg_dump/keywords.c');
+ $pgrestore->AddFile('src/backend/parser/kwlookup.c');
$pgrestore->AddLibrary('ws2_32.lib');
my $zic = $solution->AddProject('zic', 'exe', 'utils');
- $zic->AddFiles('src\timezone', 'zic.c', 'ialloc.c', 'scheck.c',
+ $zic->AddFiles('src/timezone', 'zic.c', 'ialloc.c', 'scheck.c',
'localtime.c');
- $zic->AddDirResourceFile('src\timezone');
+ $zic->AddDirResourceFile('src/timezone');
$zic->AddReference($libpgcommon, $libpgport);
if ($solution->{options}->{xml})
{
$contrib_extraincludes->{'pgxml'} = [
- $solution->{options}->{xml} . '\include',
- $solution->{options}->{xslt} . '\include',
- $solution->{options}->{iconv} . '\include' ];
+ $solution->{options}->{xml} . '/include',
+ $solution->{options}->{xslt} . '/include',
+ $solution->{options}->{iconv} . '/include' ];
$contrib_extralibs->{'pgxml'} = [
- $solution->{options}->{xml} . '\lib\libxml2.lib',
- $solution->{options}->{xslt} . '\lib\libxslt.lib' ];
+ $solution->{options}->{xml} . '/lib/libxml2.lib',
+ $solution->{options}->{xslt} . '/lib/libxslt.lib' ];
}
else
{
if ($solution->{options}->{uuid})
{
$contrib_extraincludes->{'uuid-ossp'} =
- [ $solution->{options}->{uuid} . '\include' ];
+ [ $solution->{options}->{uuid} . '/include' ];
$contrib_extralibs->{'uuid-ossp'} =
- [ $solution->{options}->{uuid} . '\lib\uuid.lib' ];
+ [ $solution->{options}->{uuid} . '/lib/uuid.lib' ];
}
else
{
# AddProject() does not recognize the constructs used to populate OBJS in
# the pgcrypto Makefile, so it will discover no files.
my $pgcrypto =
- $solution->AddProject('pgcrypto', 'dll', 'crypto', 'contrib\\pgcrypto');
+ $solution->AddProject('pgcrypto', 'dll', 'crypto', 'contrib/pgcrypto');
$pgcrypto->AddFiles(
- 'contrib\pgcrypto', 'pgcrypto.c',
+ 'contrib/pgcrypto', 'pgcrypto.c',
'px.c', 'px-hmac.c',
'px-crypt.c', 'crypt-gensalt.c',
'crypt-blowfish.c', 'crypt-des.c',
'pgp-pgsql.c');
if ($solution->{options}->{openssl})
{
- $pgcrypto->AddFiles('contrib\pgcrypto', 'openssl.c',
+ $pgcrypto->AddFiles('contrib/pgcrypto', 'openssl.c',
'pgp-mpi-openssl.c');
}
else
{
$pgcrypto->AddFiles(
- 'contrib\pgcrypto', 'md5.c',
+ 'contrib/pgcrypto', 'md5.c',
'sha1.c', 'sha2.c',
'internal.c', 'internal-sha2.c',
'blf.c', 'rijndael.c',
}
$mf =
- Project::read_file('src\backend\utils\mb\conversion_procs\Makefile');
+ Project::read_file('src/backend/utils/mb/conversion_procs/Makefile');
$mf =~ s{\\\r?\n}{}g;
$mf =~ m{SUBDIRS\s*=\s*(.*)$}m
|| die 'Could not match in conversion makefile' . "\n";
foreach my $sub (split /\s+/, $1)
{
- my $dir = 'src\backend\utils\mb\conversion_procs\\' . $sub;
+ my $dir = 'src/backend/utils/mb/conversion_procs/' . $sub;
my $p = $solution->AddProject($sub, 'dll', 'conversion procs', $dir);
- $p->AddFile("$dir\\$sub.c"); # implicit source file
+ $p->AddFile("$dir/$sub.c"); # implicit source file
$p->AddReference($postgres);
}
- $mf = Project::read_file('src\bin\scripts\Makefile');
+ $mf = Project::read_file('src/bin/scripts/Makefile');
$mf =~ s{\\\r?\n}{}g;
$mf =~ m{PROGRAMS\s*=\s*(.*)$}m
- || die 'Could not match in bin\scripts\Makefile' . "\n";
+ || die 'Could not match in bin/scripts/Makefile' . "\n";
foreach my $prg (split /\s+/, $1)
{
my $proj = $solution->AddProject($prg, 'exe', 'bin');
$f =~ s/\.o$/\.c/;
if ($f eq 'keywords.c')
{
- $proj->AddFile('src\bin\pg_dump\keywords.c');
+ $proj->AddFile('src/bin/pg_dump/keywords.c');
}
elsif ($f eq 'kwlookup.c')
{
- $proj->AddFile('src\backend\parser\kwlookup.c');
+ $proj->AddFile('src/backend/parser/kwlookup.c');
}
elsif ($f eq 'dumputils.c')
{
- $proj->AddFile('src\bin\pg_dump\dumputils.c');
+ $proj->AddFile('src/bin/pg_dump/dumputils.c');
}
elsif ($f =~ /print\.c$/)
{ # Also catches mbprint.c
- $proj->AddFile('src\bin\psql\\' . $f);
+ $proj->AddFile('src/bin/psql/' . $f);
}
elsif ($f =~ /\.c$/)
{
- $proj->AddFile('src\bin\scripts\\' . $f);
+ $proj->AddFile('src/bin/scripts/' . $f);
}
}
- $proj->AddIncludeDir('src\interfaces\libpq');
- $proj->AddIncludeDir('src\bin\pg_dump');
- $proj->AddIncludeDir('src\bin\psql');
+ $proj->AddIncludeDir('src/interfaces/libpq');
+ $proj->AddIncludeDir('src/bin/pg_dump');
+ $proj->AddIncludeDir('src/bin/psql');
$proj->AddReference($libpq, $libpgcommon, $libpgport);
- $proj->AddDirResourceFile('src\bin\scripts');
+ $proj->AddDirResourceFile('src/bin/scripts');
$proj->AddLibrary('ws2_32.lib');
}
# Regression DLL and EXE
my $regress = $solution->AddProject('regress', 'dll', 'misc');
- $regress->AddFile('src\test\regress\regress.c');
- $regress->AddDirResourceFile('src\test\regress');
+ $regress->AddFile('src/test/regress/regress.c');
+ $regress->AddDirResourceFile('src/test/regress');
$regress->AddReference($postgres);
my $pgregress = $solution->AddProject('pg_regress', 'exe', 'misc');
- $pgregress->AddFile('src\test\regress\pg_regress.c');
- $pgregress->AddFile('src\test\regress\pg_regress_main.c');
- $pgregress->AddIncludeDir('src\port');
+ $pgregress->AddFile('src/test/regress/pg_regress.c');
+ $pgregress->AddFile('src/test/regress/pg_regress_main.c');
+ $pgregress->AddIncludeDir('src/port');
$pgregress->AddDefine('HOST_TUPLE="i686-pc-win32vc"');
$pgregress->AddLibrary('ws2_32.lib');
- $pgregress->AddDirResourceFile('src\test\regress');
+ $pgregress->AddDirResourceFile('src/test/regress');
$pgregress->AddReference($libpgcommon, $libpgport);
# fix up pg_xlogdump once it's been set up
# files symlinked on Unix are copied on windows
my $pg_xlogdump = AddSimpleFrontend('pg_xlogdump');
$pg_xlogdump->AddDefine('FRONTEND');
- foreach my $xf (glob('src\\backend\\access\\rmgrdesc\\*desc.c'))
+ foreach my $xf (glob('src/backend/access/rmgrdesc/*desc.c'))
{
$pg_xlogdump->AddFile($xf)
}
- $pg_xlogdump->AddFile('src\backend\access\transam\xlogreader.c');
+ $pg_xlogdump->AddFile('src/backend/access/transam/xlogreader.c');
$solution->Save();
return $solution->{vcver};
my $uselibpq = shift;
my $p = $solution->AddProject($n, 'exe', 'bin');
- $p->AddDir('src\bin\\' . $n);
+ $p->AddDir('src/bin/' . $n);
$p->AddReference($libpgcommon, $libpgport);
if ($uselibpq)
{
- $p->AddIncludeDir('src\interfaces\libpq');
+ $p->AddIncludeDir('src/interfaces/libpq');
$p->AddReference($libpq);
}
my $proj =
$solution->AddProject($mod, 'dll', 'contrib', "$subdir/$n");
my $filename = $mod . '.c';
- $proj->AddFile($subdir . '\\' . $n . '\\' . $mod . '.c');
+ $proj->AddFile("$subdir/$n/$filename");
$proj->AddReference($postgres);
AdjustContribProj($proj);
}
sub IsNewer
{
my ($newfile, $oldfile) = @_;
- if ( $oldfile ne 'src\tools\msvc\config.pl'
- && $oldfile ne 'src\tools\msvc\config_default.pl')
+ if ( $oldfile ne 'src/tools/msvc/config.pl'
+ && $oldfile ne 'src/tools/msvc/config_default.pl')
{
return 1
- if (-f 'src\tools\msvc\config.pl')
- && IsNewer($newfile, 'src\tools\msvc\config.pl');
+ if (-f 'src/tools/msvc/config.pl')
+ && IsNewer($newfile, 'src/tools/msvc/config.pl');
return 1
- if (-f 'src\tools\msvc\config_default.pl')
- && IsNewer($newfile, 'src\tools\msvc\config_default.pl');
+ if (-f 'src/tools/msvc/config_default.pl')
+ && IsNewer($newfile, 'src/tools/msvc/config_default.pl');
}
return 1 if (!(-e $newfile));
my @nstat = stat($newfile);
if ($self->{strver} eq '' || $self->{numver} eq '');
if (IsNewer(
- "src\\include\\pg_config_os.h", "src\\include\\port\\win32.h"))
+ "src/include/pg_config_os.h", "src/include/port/win32.h"))
{
print "Copying pg_config_os.h...\n";
- copyFile("src\\include\\port\\win32.h",
- "src\\include\\pg_config_os.h");
+ copyFile("src/include/port/win32.h",
+ "src/include/pg_config_os.h");
}
if (IsNewer(
- "src\\include\\pg_config.h", "src\\include\\pg_config.h.win32"))
+ "src/include/pg_config.h", "src/include/pg_config.h.win32"))
{
print "Generating pg_config.h...\n";
- open(I, "src\\include\\pg_config.h.win32")
+ open(I, "src/include/pg_config.h.win32")
|| confess "Could not open pg_config.h.win32\n";
- open(O, ">src\\include\\pg_config.h")
+ open(O, ">src/include/pg_config.h")
|| confess "Could not write to pg_config.h\n";
my $extraver = $self->{options}->{extraver};
$extraver = '' unless defined $extraver;
}
if (IsNewer(
- "src\\include\\pg_config_ext.h",
- "src\\include\\pg_config_ext.h.win32"))
+ "src/include/pg_config_ext.h",
+ "src/include/pg_config_ext.h.win32"))
{
print "Copying pg_config_ext.h...\n";
copyFile(
- "src\\include\\pg_config_ext.h.win32",
- "src\\include\\pg_config_ext.h");
+ "src/include/pg_config_ext.h.win32",
+ "src/include/pg_config_ext.h");
}
$self->GenerateDefFile(
- "src\\interfaces\\libpq\\libpqdll.def",
- "src\\interfaces\\libpq\\exports.txt",
+ "src/interfaces/libpq/libpqdll.def",
+ "src/interfaces/libpq/exports.txt",
"LIBPQ");
$self->GenerateDefFile(
- "src\\interfaces\\ecpg\\ecpglib\\ecpglib.def",
- "src\\interfaces\\ecpg\\ecpglib\\exports.txt",
+ "src/interfaces/ecpg/ecpglib/ecpglib.def",
+ "src/interfaces/ecpg/ecpglib/exports.txt",
"LIBECPG");
$self->GenerateDefFile(
- "src\\interfaces\\ecpg\\compatlib\\compatlib.def",
- "src\\interfaces\\ecpg\\compatlib\\exports.txt",
+ "src/interfaces/ecpg/compatlib/compatlib.def",
+ "src/interfaces/ecpg/compatlib/exports.txt",
"LIBECPG_COMPAT");
$self->GenerateDefFile(
- "src\\interfaces\\ecpg\\pgtypeslib\\pgtypeslib.def",
- "src\\interfaces\\ecpg\\pgtypeslib\\exports.txt",
+ "src/interfaces/ecpg/pgtypeslib/pgtypeslib.def",
+ "src/interfaces/ecpg/pgtypeslib/exports.txt",
"LIBPGTYPES");
if (IsNewer(
- 'src\backend\utils\fmgrtab.c', 'src\include\catalog\pg_proc.h'))
+ 'src/backend/utils/fmgrtab.c', 'src/include/catalog/pg_proc.h'))
{
print "Generating fmgrtab.c and fmgroids.h...\n";
- chdir('src\backend\utils');
+ chdir('src/backend/utils');
system(
"perl -I ../catalog Gen_fmgrtab.pl ../../../src/include/catalog/pg_proc.h");
- chdir('..\..\..');
+ chdir('../../..');
}
if (IsNewer(
- 'src\include\utils\fmgroids.h',
- 'src\backend\utils\fmgroids.h'))
+ 'src/include/utils/fmgroids.h',
+ 'src/backend/utils/fmgroids.h'))
{
- copyFile('src\backend\utils\fmgroids.h',
- 'src\include\utils\fmgroids.h');
+ copyFile('src/backend/utils/fmgroids.h',
+ 'src/include/utils/fmgroids.h');
}
- if (IsNewer('src\include\utils\probes.h', 'src\backend\utils\probes.d'))
+ if (IsNewer('src/include/utils/probes.h', 'src/backend/utils/probes.d'))
{
print "Generating probes.h...\n";
system(
-'psed -f src\backend\utils\Gen_dummy_probes.sed src\backend\utils\probes.d > src\include\utils\probes.h'
+'psed -f src/backend/utils/Gen_dummy_probes.sed src/backend/utils/probes.d > src/include/utils/probes.h'
);
}
if ($self->{options}->{python}
&& IsNewer(
- 'src\pl\plpython\spiexceptions.h',
- 'src\include\backend\errcodes.txt'))
+ 'src/pl/plpython/spiexceptions.h',
+ 'src/include/backend/errcodes.txt'))
{
print "Generating spiexceptions.h...\n";
system(
-'perl src\pl\plpython\generate-spiexceptions.pl src\backend\utils\errcodes.txt > src\pl\plpython\spiexceptions.h'
+'perl src/pl/plpython/generate-spiexceptions.pl src/backend/utils/errcodes.txt > src/pl/plpython/spiexceptions.h'
);
}
if (IsNewer(
- 'src\include\utils\errcodes.h',
- 'src\backend\utils\errcodes.txt'))
+ 'src/include/utils/errcodes.h',
+ 'src/backend/utils/errcodes.txt'))
{
print "Generating errcodes.h...\n";
system(
-'perl src\backend\utils\generate-errcodes.pl src\backend\utils\errcodes.txt > src\backend\utils\errcodes.h'
+'perl src/backend/utils/generate-errcodes.pl src/backend/utils/errcodes.txt > src/backend/utils/errcodes.h'
);
- copyFile('src\backend\utils\errcodes.h',
- 'src\include\utils\errcodes.h');
+ copyFile('src/backend/utils/errcodes.h',
+ 'src/include/utils/errcodes.h');
}
if (IsNewer(
- 'src\pl\plpgsql\src\plerrcodes.h',
- 'src\backend\utils\errcodes.txt'))
+ 'src/pl/plpgsql/src/plerrcodes.h',
+ 'src/backend/utils/errcodes.txt'))
{
print "Generating plerrcodes.h...\n";
system(
-'perl src\pl\plpgsql\src\generate-plerrcodes.pl src\backend\utils\errcodes.txt > src\pl\plpgsql\src\plerrcodes.h'
+'perl src/pl/plpgsql/src/generate-plerrcodes.pl src/backend/utils/errcodes.txt > src/pl/plpgsql/src/plerrcodes.h'
);
}
if (IsNewer(
- 'src\backend\utils\sort\qsort_tuple.c',
- 'src\backend\utils\sort\gen_qsort_tuple.pl'))
+ 'src/backend/utils/sort/qsort_tuple.c',
+ 'src/backend/utils/sort/gen_qsort_tuple.pl'))
{
print "Generating qsort_tuple.c...\n";
system(
-'perl src\backend\utils\sort\gen_qsort_tuple.pl > src\backend\utils\sort\qsort_tuple.c'
+'perl src/backend/utils/sort/gen_qsort_tuple.pl > src/backend/utils/sort/qsort_tuple.c'
);
}
if (IsNewer(
- 'src\interfaces\libpq\libpq.rc',
- 'src\interfaces\libpq\libpq.rc.in'))
+ 'src/interfaces/libpq/libpq.rc',
+ 'src/interfaces/libpq/libpq.rc.in'))
{
print "Generating libpq.rc...\n";
my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) =
localtime(time);
my $d = ($year - 100) . "$yday";
- open(I, '<', 'src\interfaces\libpq\libpq.rc.in')
+ open(I, '<', 'src/interfaces/libpq/libpq.rc.in')
|| confess "Could not open libpq.rc.in";
- open(O, '>', 'src\interfaces\libpq\libpq.rc')
+ open(O, '>', 'src/interfaces/libpq/libpq.rc')
|| confess "Could not open libpq.rc";
while (<I>)
{
close(O);
}
- if (IsNewer('src\bin\psql\sql_help.h', 'src\bin\psql\create_help.pl'))
+ if (IsNewer('src/bin/psql/sql_help.h', 'src/bin/psql/create_help.pl'))
{
print "Generating sql_help.h...\n";
- chdir('src\bin\psql');
+ chdir('src/bin/psql');
system("perl create_help.pl ../../../doc/src/sgml/ref sql_help");
- chdir('..\..\..');
+ chdir('../../..');
}
if (IsNewer(
- 'src\interfaces\ecpg\preproc\preproc.y',
- 'src\backend\parser\gram.y'))
+ 'src/interfaces/ecpg/preproc/preproc.y',
+ 'src/backend/parser/gram.y'))
{
print "Generating preproc.y...\n";
- chdir('src\interfaces\ecpg\preproc');
- system('perl parse.pl < ..\..\..\backend\parser\gram.y > preproc.y');
- chdir('..\..\..\..');
+ chdir('src/interfaces/ecpg/preproc');
+ system('perl parse.pl < ../../../backend/parser/gram.y > preproc.y');
+ chdir('../../../..');
}
if (IsNewer(
- 'src\interfaces\ecpg\include\ecpg_config.h',
- 'src\interfaces\ecpg\include\ecpg_config.h.in'))
+ 'src/interfaces/ecpg/include/ecpg_config.h',
+ 'src/interfaces/ecpg/include/ecpg_config.h.in'))
{
print "Generating ecpg_config.h...\n";
- open(O, '>', 'src\interfaces\ecpg\include\ecpg_config.h')
+ open(O, '>', 'src/interfaces/ecpg/include/ecpg_config.h')
|| confess "Could not open ecpg_config.h";
print O <<EOF;
#if (_MSC_VER > 1200)
close(O);
}
- unless (-f "src\\port\\pg_config_paths.h")
+ unless (-f "src/port/pg_config_paths.h")
{
print "Generating pg_config_paths.h...\n";
- open(O, '>', 'src\port\pg_config_paths.h')
+ open(O, '>', 'src/port/pg_config_paths.h')
|| confess "Could not open pg_config_paths.h";
print O <<EOF;
#define PGBINDIR "/bin"
close(O);
}
- my $mf = Project::read_file('src\backend\catalog\Makefile');
+ my $mf = Project::read_file('src/backend/catalog/Makefile');
$mf =~ s{\\\r?\n}{}g;
$mf =~ /^POSTGRES_BKI_SRCS\s*:?=[^,]+,(.*)\)$/gm
|| croak "Could not find POSTGRES_BKI_SRCS in Makefile\n";
"src/include/catalog/$bki"))
{
print "Generating postgres.bki and schemapg.h...\n";
- chdir('src\backend\catalog');
+ chdir('src/backend/catalog');
my $bki_srcs = join(' ../../../src/include/catalog/', @allbki);
system(
"perl genbki.pl -I../../../src/include/catalog --set-version=$self->{majorver} $bki_srcs"
);
- chdir('..\..\..');
+ chdir('../../..');
copyFile(
- 'src\backend\catalog\schemapg.h',
- 'src\include\catalog\schemapg.h');
+ 'src/backend/catalog/schemapg.h',
+ 'src/include/catalog/schemapg.h');
last;
}
}