Skip to content

Commit 3d3616c

Browse files
committed
Build plperl's new Util.xs
1 parent 62b5c03 commit 3d3616c

File tree

1 file changed

+23
-16
lines changed

1 file changed

+23
-16
lines changed

src/tools/msvc/Mkvcbuild.pm

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package Mkvcbuild;
33
#
44
# Package that generates build files for msvc build
55
#
6-
# $PostgreSQL: pgsql/src/tools/msvc/Mkvcbuild.pm,v 1.48 2010/01/17 13:21:50 mha Exp $
6+
# $PostgreSQL: pgsql/src/tools/msvc/Mkvcbuild.pm,v 1.49 2010/01/20 04:14:06 adunstan Exp $
77
#
88
use Carp;
99
use Win32;
@@ -87,24 +87,31 @@ sub mkvcbuild
8787

8888
if ($solution->{options}->{perl})
8989
{
90+
my $plperlsrc = "src\\pl\\plperl\\";
9091
my $plperl = $solution->AddProject('plperl','dll','PLs','src\pl\plperl');
9192
$plperl->AddIncludeDir($solution->{options}->{perl} . '/lib/CORE');
9293
$plperl->AddDefine('PLPERL_HAVE_UID_GID');
93-
if (Solution::IsNewer('src\pl\plperl\SPI.c','src\pl\plperl\SPI.xs'))
94-
{
95-
print 'Building src\pl\plperl\SPI.c...' . "\n";
96-
system( $solution->{options}->{perl}
97-
. '/bin/perl '
98-
. $solution->{options}->{perl}
99-
. '/lib/ExtUtils/xsubpp -typemap '
100-
. $solution->{options}->{perl}
101-
. '/lib/ExtUtils/typemap src\pl\plperl\SPI.xs >src\pl\plperl\SPI.c');
102-
if ((!(-f 'src\pl\plperl\SPI.c')) || -z 'src\pl\plperl\SPI.c')
103-
{
104-
unlink('src\pl\plperl\SPI.c'); # if zero size
105-
die 'Failed to create SPI.c' . "\n";
106-
}
107-
}
94+
foreach my $xs ('SPI.xs', 'Util.xs')
95+
{
96+
(my $xsc = $xs) =~ s/\.xs/.c/;
97+
if (Solution::IsNewer("$plperlsrc$xsc","$plperlsrc$xs"))
98+
{
99+
print "Building $plperlsrc$xsc...\n";
100+
system( $solution->{options}->{perl}
101+
. '/bin/perl '
102+
. $solution->{options}->{perl}
103+
. '/lib/ExtUtils/xsubpp -typemap '
104+
. $solution->{options}->{perl}
105+
. '/lib/ExtUtils/typemap '
106+
. "$plperlsrc$xs "
107+
. ">plperlsrc$xsc");
108+
if ((!(-f "$plperlsrc$xsc")) || -z "$plperlsrc$xsc")
109+
{
110+
unlink("$plperlsrc$xsc"); # if zero size
111+
die "Failed to create $xsc.\n";
112+
}
113+
}
114+
}
108115
if ( Solution::IsNewer('src\pl\plperl\perlchunks.h','src\pl\plperl\plc_perlboot.pl')
109116
||Solution::IsNewer('src\pl\plperl\perlchunks.h','src\pl\plperl\plc_safe_bad.pl')
110117
||Solution::IsNewer('src\pl\plperl\perlchunks.h','src\pl\plperl\plc_safe_ok.pl'))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy