mirror of
https://github.com/postgres/postgres.git
synced 2025-04-22 23:02:54 +03:00
Build plperl's new Util.xs
This commit is contained in:
parent
62b5c031f6
commit
3d3616cc2f
@ -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,22 +87,29 @@ 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/;
|
||||||
|
if (Solution::IsNewer("$plperlsrc$xsc","$plperlsrc$xs"))
|
||||||
|
{
|
||||||
|
print "Building $plperlsrc$xsc...\n";
|
||||||
system( $solution->{options}->{perl}
|
system( $solution->{options}->{perl}
|
||||||
. '/bin/perl '
|
. '/bin/perl '
|
||||||
. $solution->{options}->{perl}
|
. $solution->{options}->{perl}
|
||||||
. '/lib/ExtUtils/xsubpp -typemap '
|
. '/lib/ExtUtils/xsubpp -typemap '
|
||||||
. $solution->{options}->{perl}
|
. $solution->{options}->{perl}
|
||||||
. '/lib/ExtUtils/typemap src\pl\plperl\SPI.xs >src\pl\plperl\SPI.c');
|
. '/lib/ExtUtils/typemap '
|
||||||
if ((!(-f 'src\pl\plperl\SPI.c')) || -z 'src\pl\plperl\SPI.c')
|
. "$plperlsrc$xs "
|
||||||
|
. ">plperlsrc$xsc");
|
||||||
|
if ((!(-f "$plperlsrc$xsc")) || -z "$plperlsrc$xsc")
|
||||||
{
|
{
|
||||||
unlink('src\pl\plperl\SPI.c'); # if zero size
|
unlink("$plperlsrc$xsc"); # if zero size
|
||||||
die 'Failed to create SPI.c' . "\n";
|
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')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user