diff options
| author | Andrew Dunstan <andrew@dunslane.net> | 2011-11-28 07:45:48 -0500 |
|---|---|---|
| committer | Andrew Dunstan <andrew@dunslane.net> | 2011-11-28 07:45:48 -0500 |
| commit | 31e9743f1ab9dfc9c3c515b61f27030c93c776be (patch) | |
| tree | 2eae7d835261a65d6c61653021b90a106834e2e6 /src/tools | |
| parent | 9b60e40cad723cf904ebd5d4afa5ecd40431534a (diff) | |
Backpatch "Use the preferred version of xsubpp."
As requested this is backpatched all the way to release 8.2.
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/msvc/Mkvcbuild.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm index 870bfeef070..92a838d76a8 100644 --- a/src/tools/msvc/Mkvcbuild.pm +++ b/src/tools/msvc/Mkvcbuild.pm @@ -12,6 +12,8 @@ use warnings; use Project; use Solution; use Cwd; +use Config; +use List::Util qw(first); use Exporter; our (@ISA, @EXPORT_OK); @@ -91,11 +93,11 @@ sub mkvcbuild $plperl->AddDefine('PLPERL_HAVE_UID_GID'); if (Solution::IsNewer('src\pl\plperl\SPI.c','src\pl\plperl\SPI.xs')) { + my $xsubppdir = first { -e "$_\\ExtUtils\\xsubpp" } @INC; print 'Building src\pl\plperl\SPI.c...' . "\n"; system( $solution->{options}->{perl} . '/bin/perl ' - . $solution->{options}->{perl} - . '/lib/ExtUtils/xsubpp -typemap ' + . "$xsubppdir/ExtUtils/xsubpp -typemap " . $solution->{options}->{perl} . '/lib/ExtUtils/typemap src\pl\plperl\SPI.xs >src\pl\plperl\SPI.c'); if ((!(-f 'src\pl\plperl\SPI.c')) || -z 'src\pl\plperl\SPI.c') |
