File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
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
plperl.o : perlchunks.h plperl_opmask.h
@@ -68,11 +71,11 @@ all: all-lib
68
71
69
72
SPI.c : SPI.xs
70
73
@if [ x" $( perl_privlibexp) " = x" " ]; then echo " configure switch --with-perl was not specified." ; exit 1; fi
71
- $(PERL ) $(perl_privlibexp ) /ExtUtils/xsubpp -typemap $(perl_privlibexp ) /ExtUtils/typemap $< > $@
74
+ $(PERL ) $(XSUBPPDIR ) /ExtUtils/xsubpp -typemap $(perl_privlibexp ) /ExtUtils/typemap $< > $@
72
75
73
76
Util.c : Util.xs
74
77
@if [ x" $( perl_privlibexp) " = x" " ]; then echo " configure switch --with-perl was not specified." ; exit 1; fi
75
- $(PERL ) $(perl_privlibexp ) /ExtUtils/xsubpp -typemap $(perl_privlibexp ) /ExtUtils/typemap $< > $@
78
+ $(PERL ) $(XSUBPPDIR ) /ExtUtils/xsubpp -typemap $(perl_privlibexp ) /ExtUtils/typemap $< > $@
76
79
77
80
install : all installdirs install-lib
78
81
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 );
@@ -101,11 +103,11 @@ sub mkvcbuild
101
103
(my $xsc = $xs ) =~ s /\. xs/ .c/ ;
102
104
if (Solution::IsNewer(" $plperlsrc$xsc " ," $plperlsrc$xs " ))
103
105
{
104
- print " Building $plperlsrc$xsc ...\n " ;
106
+ my $xsubppdir = first { -e " $_ \\ ExtUtils\\ xsubpp" } @INC ;
107
+ print " Building $plperlsrc$xsc ...\n " ;
105
108
system ( $solution -> {options }-> {perl }
106
109
. ' /bin/perl '
107
- . $solution -> {options }-> {perl }
108
- . ' /lib/ExtUtils/xsubpp -typemap '
110
+ . " $xsubppdir /ExtUtils/xsubpp -typemap "
109
111
. $solution -> {options }-> {perl }
110
112
. ' /lib/ExtUtils/typemap '
111
113
. " $plperlsrc$xs "
You can’t perform that action at this time.
0 commit comments