postgres.git / summary / log / commit / refs
commit 322fc5cf569da335e46e9b8ff1b0f5c9e1847d94
Author: Andrew Dunstan <andrew@dunslane.net>
Date: Mon Nov 28 12:46:15 2011 +0000
First released in: 8.2.23, 8.3.17, 8.4.10, 9.0.6
Backpatch "Use the preferred version of xsubpp."
As requested this is backpatched all the way to release 8.2.
src/pl/plperl/GNUmakefile | 5 ++++-
src/tools/msvc/Mkvcbuild.pm | 6 ++++--
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/pl/plperl/GNUmakefile b/src/pl/plperl/GNUmakefile
index bbb35aec98d..132863c7033 100644
--- a/src/pl/plperl/GNUmakefile
+++ b/src/pl/plperl/GNUmakefile
@@ -52,6 +52,9 @@ endif
# where to find psql for running the tests
PSQLDIR = $(bindir)
+# where to find xsubpp for building XS.
+XSUBPPDIR = $(shell $(PERL) -e 'use List::Util qw(first); print first { -r "$$_/ExtUtils/xsubpp" } @INC')
+
include $(top_srcdir)/src/Makefile.shlib
@@ -64,7 +67,7 @@ plperl_opmask.h: plperl_opmask.pl
SPI.c: SPI.xs
- $(PERL) $(perl_privlibexp)/ExtUtils/xsubpp -typemap $(perl_privlibexp)/ExtUtils/typemap $< >$@
+ $(PERL) $(XSUBPPDIR)/ExtUtils/xsubpp -typemap $(perl_privlibexp)/ExtUtils/typemap $< >$@
# When doing a VPATH build, copy over the .sql and .out files so that the
# test script can find them. See comments in src/test/regress/GNUmakefile.
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm
index 2f6696eb7ee..d010fb2e079 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')
[parent: fdaff0ba1e7d]