File tree 2 files changed +8
-2
lines changed
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 52
52
# where to find psql for running the tests
53
53
PSQLDIR = $(bindir )
54
54
55
+ # where to find xsubpp for building XS.
56
+ XSUBPPDIR = $(shell $(PERL ) -e 'use List::Util qw(first) ; print first { -r "$$_/ExtUtils/xsubpp" } @INC')
57
+
55
58
include $(top_srcdir ) /src/Makefile.shlib
56
59
57
60
@@ -64,7 +67,7 @@ plperl_opmask.h: plperl_opmask.pl
64
67
65
68
66
69
SPI.c : SPI.xs
67
- $(PERL ) $(perl_privlibexp ) /ExtUtils/xsubpp -typemap $(perl_privlibexp ) /ExtUtils/typemap $< > $@
70
+ $(PERL ) $(XSUBPPDIR ) /ExtUtils/xsubpp -typemap $(perl_privlibexp ) /ExtUtils/typemap $< > $@
68
71
69
72
# When doing a VPATH build, copy over the .sql and .out files so that the
70
73
# test script can find them. See comments in src/test/regress/GNUmakefile.
Original file line number Diff line number Diff line change 5
5
use Project;
6
6
use Solution;
7
7
use Cwd;
8
+ use Config;
9
+ use List::Util qw( first) ;
8
10
9
11
chdir (' ..\..\..' ) if (-d ' ..\msvc' && -d ' ..\..\..\src' );
10
12
die ' Must run from root or msvc directory' unless (-d ' src\tools\msvc' && -d ' src' );
52
54
$plperl -> AddIncludeDir($solution -> {options }-> {perl } . ' /lib/CORE' );
53
55
$plperl -> AddDefine(' PLPERL_HAVE_UID_GID' );
54
56
if (Solution::IsNewer(' src\pl\plperl\SPI.c' ,' src\pl\plperl\SPI.xs' )) {
57
+ my $xsubppdir = first { -e " $_ \\ ExtUtils\\ xsubpp" } @INC ;
55
58
print ' Building src\pl\plperl\SPI.c...' . " \n " ;
56
- system ($solution -> {options }-> {perl } . ' /bin/perl ' . $solution -> { options } -> { perl } . ' /lib/ ExtUtils/xsubpp -typemap ' . $solution -> {options }-> {perl } . ' /lib/ExtUtils/typemap src\pl\plperl\SPI.xs >src\pl\plperl\SPI.c' );
59
+ system ($solution -> {options }-> {perl } . ' /bin/perl ' . " $xsubppdir / ExtUtils/xsubpp -typemap " . $solution -> {options }-> {perl } . ' /lib/ExtUtils/typemap src\pl\plperl\SPI.xs >src\pl\plperl\SPI.c' );
57
60
if ((!(-f ' src\pl\plperl\SPI.c' )) || -z ' src\pl\plperl\SPI.c' ) {
58
61
unlink (' src\pl\plperl\SPI.c' ); # if zero size
59
62
die ' Failed to create SPI.c' . " \n " ;
You can’t perform that action at this time.
0 commit comments