Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit ba00ab0

Browse files
committed
Use the preferred version of xsubpp, not necessarily the one that came with the
distro version of perl. David Wheeler and Alex Hunsaker. Backpatch to 9.1 where it applies cleanly. A simple workaround is available for earlier branches, and further effort doesn't seem warranted.
1 parent 5966bce commit ba00ab0

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/pl/plperl/GNUmakefile

+5-2
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ endif
5555
# where to find psql for running the tests
5656
PSQLDIR = $(bindir)
5757

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+
5861
include $(top_srcdir)/src/Makefile.shlib
5962

6063
plperl.o: perlchunks.h plperl_opmask.h plperl_helpers.h
@@ -71,11 +74,11 @@ all: all-lib
7174

7275
SPI.c: SPI.xs
7376
@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 $< >$@
7578

7679
Util.c: Util.xs
7780
@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 $< >$@
7982

8083

8184
install: all install-lib install-data

src/tools/msvc/Mkvcbuild.pm

+4-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ use Project;
1313
use Solution;
1414
use Cwd;
1515
use File::Copy;
16+
use Config;
17+
use List::Util qw(first);
1618

1719
use Exporter;
1820
our (@ISA, @EXPORT_OK);
@@ -106,11 +108,12 @@ sub mkvcbuild
106108
(my $xsc = $xs) =~ s/\.xs/.c/;
107109
if (Solution::IsNewer("$plperlsrc$xsc","$plperlsrc$xs"))
108110
{
111+
my $xsubppdir = first { -e "$_\\ExtUtils\\xsubpp.BAT" } @INC;
109112
print "Building $plperlsrc$xsc...\n";
110113
system( $solution->{options}->{perl}
111114
. '/bin/perl '
112115
. $solution->{options}->{perl}
113-
. '/lib/ExtUtils/xsubpp -typemap '
116+
. "$xsubppdir/ExtUtils/xsubpp -typemap "
114117
. $solution->{options}->{perl}
115118
. '/lib/ExtUtils/typemap '
116119
. "$plperlsrc$xs "

0 commit comments

Comments
 (0)