Commit 3d3616cc authored by Andrew Dunstan's avatar Andrew Dunstan

Build plperl's new Util.xs

parent 62b5c031
...@@ -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.48 2010/01/17 13:21:50 mha Exp $ # $PostgreSQL: pgsql/src/tools/msvc/Mkvcbuild.pm,v 1.49 2010/01/20 04:14:06 adunstan Exp $
# #
use Carp; use Carp;
use Win32; use Win32;
...@@ -87,24 +87,31 @@ sub mkvcbuild ...@@ -87,24 +87,31 @@ sub mkvcbuild
if ($solution->{options}->{perl}) if ($solution->{options}->{perl})
{ {
my $plperlsrc = "src\\pl\\plperl\\";
my $plperl = $solution->AddProject('plperl','dll','PLs','src\pl\plperl'); my $plperl = $solution->AddProject('plperl','dll','PLs','src\pl\plperl');
$plperl->AddIncludeDir($solution->{options}->{perl} . '/lib/CORE'); $plperl->AddIncludeDir($solution->{options}->{perl} . '/lib/CORE');
$plperl->AddDefine('PLPERL_HAVE_UID_GID'); $plperl->AddDefine('PLPERL_HAVE_UID_GID');
if (Solution::IsNewer('src\pl\plperl\SPI.c','src\pl\plperl\SPI.xs')) foreach my $xs ('SPI.xs', 'Util.xs')
{ {
print 'Building src\pl\plperl\SPI.c...' . "\n"; (my $xsc = $xs) =~ s/\.xs/.c/;
system( $solution->{options}->{perl} if (Solution::IsNewer("$plperlsrc$xsc","$plperlsrc$xs"))
. '/bin/perl ' {
. $solution->{options}->{perl} print "Building $plperlsrc$xsc...\n";
. '/lib/ExtUtils/xsubpp -typemap ' system( $solution->{options}->{perl}
. $solution->{options}->{perl} . '/bin/perl '
. '/lib/ExtUtils/typemap src\pl\plperl\SPI.xs >src\pl\plperl\SPI.c'); . $solution->{options}->{perl}
if ((!(-f 'src\pl\plperl\SPI.c')) || -z 'src\pl\plperl\SPI.c') . '/lib/ExtUtils/xsubpp -typemap '
{ . $solution->{options}->{perl}
unlink('src\pl\plperl\SPI.c'); # if zero size . '/lib/ExtUtils/typemap '
die 'Failed to create SPI.c' . "\n"; . "$plperlsrc$xs "
} . ">plperlsrc$xsc");
} if ((!(-f "$plperlsrc$xsc")) || -z "$plperlsrc$xsc")
{
unlink("$plperlsrc$xsc"); # if zero size
die "Failed to create $xsc.\n";
}
}
}
if ( Solution::IsNewer('src\pl\plperl\perlchunks.h','src\pl\plperl\plc_perlboot.pl') if ( Solution::IsNewer('src\pl\plperl\perlchunks.h','src\pl\plperl\plc_perlboot.pl')
||Solution::IsNewer('src\pl\plperl\perlchunks.h','src\pl\plperl\plc_safe_bad.pl') ||Solution::IsNewer('src\pl\plperl\perlchunks.h','src\pl\plperl\plc_safe_bad.pl')
||Solution::IsNewer('src\pl\plperl\perlchunks.h','src\pl\plperl\plc_safe_ok.pl')) ||Solution::IsNewer('src\pl\plperl\perlchunks.h','src\pl\plperl\plc_safe_ok.pl'))
......
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