Commit 0346442b authored by Andrew Dunstan's avatar Andrew Dunstan

Build perlchunks.h for plperl on MSVC

parent c79640ef
......@@ -3,7 +3,7 @@ package Mkvcbuild;
#
# 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;
......@@ -11,6 +11,8 @@ use strict;
use warnings;
use Project;
use Solution;
use Cwd;
use File::Copy;
use Exporter;
our (@ISA, @EXPORT_OK);
......@@ -103,6 +105,31 @@ sub mkvcbuild
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');
......
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