Commit c8792c86 authored by Magnus Hagander's avatar Magnus Hagander

Build DEF file for libecpg instead of generating a default one.

parent 6ddbc116
...@@ -3,7 +3,7 @@ package Mkvcbuild; ...@@ -3,7 +3,7 @@ package Mkvcbuild;
# #
# Package that generates build files for msvc build # Package that generates build files for msvc build
# #
# $PostgreSQL: pgsql/src/tools/msvc/Mkvcbuild.pm,v 1.18 2007/09/29 07:15:33 mha Exp $ # $PostgreSQL: pgsql/src/tools/msvc/Mkvcbuild.pm,v 1.19 2007/10/03 12:11:00 mha Exp $
# #
use Carp; use Carp;
use Win32; use Win32;
...@@ -144,6 +144,7 @@ sub mkvcbuild ...@@ -144,6 +144,7 @@ sub mkvcbuild
$libecpg->AddIncludeDir('src\interfaces\ecpg\include'); $libecpg->AddIncludeDir('src\interfaces\ecpg\include');
$libecpg->AddIncludeDir('src\interfaces\libpq'); $libecpg->AddIncludeDir('src\interfaces\libpq');
$libecpg->AddIncludeDir('src\port'); $libecpg->AddIncludeDir('src\port');
$libecpg->UseDef('src\interfaces\ecpg\ecpglib\ecpglib.def');
$libecpg->AddLibrary('wsock32.lib'); $libecpg->AddLibrary('wsock32.lib');
$libecpg->AddReference($libpq,$pgtypes,$libpgport); $libecpg->AddReference($libpq,$pgtypes,$libpgport);
......
...@@ -3,7 +3,7 @@ package Solution; ...@@ -3,7 +3,7 @@ package Solution;
# #
# Package that encapsulates a Visual C++ solution file generation # Package that encapsulates a Visual C++ solution file generation
# #
# $PostgreSQL: pgsql/src/tools/msvc/Solution.pm,v 1.32 2007/09/03 02:51:47 tgl Exp $ # $PostgreSQL: pgsql/src/tools/msvc/Solution.pm,v 1.33 2007/10/03 12:11:00 mha Exp $
# #
use Carp; use Carp;
use strict; use strict;
...@@ -139,21 +139,8 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY ...@@ -139,21 +139,8 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY
close(I); close(I);
} }
if (IsNewer("src\\interfaces\\libpq\\libpqdll.def","src\\interfaces\\libpq\\exports.txt")) $self->GenerateDefFile("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","LIBECPG");
print "Generating libpqdll.def...\n";
open(I,"src\\interfaces\\libpq\\exports.txt") || confess("Could not open exports.txt\n");
open(O,">src\\interfaces\\libpq\\libpqdll.def") || confess("Could not open libpqdll.def\n");
print O "LIBRARY LIBPQ\nEXPORTS\n";
while (<I>)
{
next if (/^#/);
my ($f, $o) = split;
print O " $f @ $o\n";
}
close(O);
close(I);
}
if (IsNewer("src\\backend\\utils\\fmgrtab.c","src\\include\\catalog\\pg_proc.h")) if (IsNewer("src\\backend\\utils\\fmgrtab.c","src\\include\\catalog\\pg_proc.h"))
{ {
...@@ -304,6 +291,28 @@ EOF ...@@ -304,6 +291,28 @@ EOF
close(O); close(O);
} }
sub GenerateDefFile
{
my ($self, $deffile, $txtfile, $libname) = @_;
if (IsNewer($deffile,$txtfile))
{
print "Generating $deffile...\n";
open(I,$txtfile) || confess("Could not open $txtfile\n");
open(O,">$deffile") || confess("Could not open $deffile\n");
print O "LIBRARY $libname\nEXPORTS\n";
while (<I>)
{
next if (/^#/);
next if (/^\s*$/);
my ($f, $o) = split;
print O " $f @ $o\n";
}
close(O);
close(I);
}
}
sub AddProject sub AddProject
{ {
my ($self, $name, $type, $folder, $initialdir) = @_; my ($self, $name, $type, $folder, $initialdir) = @_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment