File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 55
55
# where to find psql for running the tests
56
56
PSQLDIR = $(bindir )
57
57
58
+ # where to find xsubpp for building XS.
59
+ XSUBPPDIR = $(shell $(PERL ) -e 'use List::Util qw(first) ; print first { -r "$$_/ExtUtils/xsubpp" } @INC')
60
+
58
61
include $(top_srcdir ) /src/Makefile.shlib
59
62
60
63
plperl.o : perlchunks.h plperl_opmask.h plperl_helpers.h
@@ -71,11 +74,11 @@ all: all-lib
71
74
72
75
SPI.c : SPI.xs
73
76
@if [ x" $( perl_privlibexp) " = x" " ]; then echo " configure switch --with-perl was not specified." ; exit 1; fi
74
- $(PERL ) $(perl_privlibexp ) /ExtUtils/xsubpp -typemap $(perl_privlibexp ) /ExtUtils/typemap $< > $@
77
+ $(PERL ) $(XSUBPPDIR ) /ExtUtils/xsubpp -typemap $(perl_privlibexp ) /ExtUtils/typemap $< > $@
75
78
76
79
Util.c : Util.xs
77
80
@if [ x" $( perl_privlibexp) " = x" " ]; then echo " configure switch --with-perl was not specified." ; exit 1; fi
78
- $(PERL ) $(perl_privlibexp ) /ExtUtils/xsubpp -typemap $(perl_privlibexp ) /ExtUtils/typemap $< > $@
81
+ $(PERL ) $(XSUBPPDIR ) /ExtUtils/xsubpp -typemap $(perl_privlibexp ) /ExtUtils/typemap $< > $@
79
82
80
83
81
84
install : all install-lib install-data
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ use Project;
13
13
use Solution;
14
14
use Cwd;
15
15
use File::Copy;
16
+ use Config;
17
+ use List::Util qw( first) ;
16
18
17
19
use Exporter;
18
20
our (@ISA , @EXPORT_OK );
@@ -106,11 +108,12 @@ sub mkvcbuild
106
108
(my $xsc = $xs ) =~ s /\. xs/ .c/ ;
107
109
if (Solution::IsNewer(" $plperlsrc$xsc " ," $plperlsrc$xs " ))
108
110
{
111
+ my $xsubppdir = first { -e " $_ \\ ExtUtils\\ xsubpp.BAT" } @INC ;
109
112
print " Building $plperlsrc$xsc ...\n " ;
110
113
system ( $solution -> {options }-> {perl }
111
114
. ' /bin/perl '
112
115
. $solution -> {options }-> {perl }
113
- . ' /lib/ ExtUtils/xsubpp -typemap '
116
+ . " $xsubppdir / ExtUtils/xsubpp -typemap "
114
117
. $solution -> {options }-> {perl }
115
118
. ' /lib/ExtUtils/typemap '
116
119
. " $plperlsrc$xs "
You can’t perform that action at this time.
0 commit comments