@@ -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#
88use Carp;
99use Win32;
@@ -87,24 +87,31 @@ sub mkvcbuild
8787
8888if ($solution -> {options }-> {perl })
8989 {
90+ my $plperlsrc =" src\\ pl\\ plperl\\ " ;
9091my $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+ }
108115if ( 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' ))