#
# Package that generates build files for msvc build
#
-# $PostgreSQL: pgsql/src/tools/msvc/Mkvcbuild.pm,v 1.44 2009/11/12 00:13:00 tgl Exp $
+# $PostgreSQL: pgsql/src/tools/msvc/Mkvcbuild.pm,v 1.45 2010/01/09 14:45:47 adunstan Exp $
#
use Carp;
use Win32;
use warnings;
use Project;
use Solution;
+use Cwd;
+use File::Copy;
use Exporter;
our (@ISA, @EXPORT_OK);
die 'Failed to create SPI.c' . "\n";
}
}
+ 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_ok.pl'))
+ {
+ print 'Building src\pl\plperl\perlchunks.h ...' . "\n";
+ my $basedir = getcwd;
+ chdir 'src\pl\plperl';
+ system( $solution->{options}->{perl}
+ . '/bin/perl '
+ . 'text2macro.pl '
+ . '--strip="^(\#.*|\s*)$$" '
+ . 'plc_perlboot.pl plc_safe_bad.pl plc_safe_ok.pl '
+ . '>perlchunks.htmp');
+ chdir $basedir;
+ if ((!(-f 'src\pl\plperl\perlchunks.htmp')) || -z 'src\pl\plperl\perlchunks.htmp')
+ {
+ unlink('src\pl\plperl\perlchunks.htmp'); # if zero size
+ die 'Failed to create perlchunks.h' . "\n";
+ }
+ else
+ {
+ move('src\pl\plperl\perlchunks.htmp','src\pl\plperl\perlchunks.h');
+ }
+
+ }
$plperl->AddReference($postgres);
my @perl_libs = grep {/perl\d+.lib$/ }
glob($solution->{options}->{perl} . '\lib\CORE\perl*.lib');