On Thu, Sep 15, 2011 at 15:53, David E. Wheeler <da...@kineticode.com> wrote: > On Sep 15, 2011, at 4:41 PM, Alex Hunsaker wrote: > >> ExtUtils searches @INC, privlibexp maybe we should do that? > > Yes, I just got an email from David Golden to that effect. So perhaps the > attached patch is better?
Close, seems I was wrong about the typemap ExtUtils::ParseXS does not install a new one so we still need to point to the one in privlib. Also xsubpp is not executable so the test should be -r or something. Also don't think we should change the configure switch tests to test XSUBPPDIR. Find those plus some minor typos fixed in the attached.
*** a/src/pl/plperl/GNUmakefile --- b/src/pl/plperl/GNUmakefile *************** *** 55,60 **** endif --- 55,63 ---- # 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 plperl.o: perlchunks.h plperl_opmask.h *************** *** 71,81 **** all: all-lib SPI.c: SPI.xs @if [ x"$(perl_privlibexp)" = x"" ]; then echo "configure switch --with-perl was not specified."; exit 1; fi ! $(PERL) $(perl_privlibexp)/ExtUtils/xsubpp -typemap $(perl_privlibexp)/ExtUtils/typemap $< >$@ Util.c: Util.xs @if [ x"$(perl_privlibexp)" = x"" ]; then echo "configure switch --with-perl was not specified."; exit 1; fi ! $(PERL) $(perl_privlibexp)/ExtUtils/xsubpp -typemap $(perl_privlibexp)/ExtUtils/typemap $< >$@ install: all install-lib install-data --- 74,84 ---- SPI.c: SPI.xs @if [ x"$(perl_privlibexp)" = x"" ]; then echo "configure switch --with-perl was not specified."; exit 1; fi ! $(PERL) $(XSUBPPDIR)/ExtUtils/xsubpp -typemap $(perl_privlibexp)/ExtUtils/typemap $< >$@ Util.c: Util.xs @if [ x"$(perl_privlibexp)" = x"" ]; then echo "configure switch --with-perl was not specified."; exit 1; fi ! $(PERL) $(XSUBPPDIR)/ExtUtils/xsubpp -typemap $(perl_privlibexp)/ExtUtils/typemap $< >$@ install: all install-lib install-data *** a/src/tools/msvc/Mkvcbuild.pm --- b/src/tools/msvc/Mkvcbuild.pm *************** *** 13,18 **** use Project; --- 13,20 ---- use Solution; use Cwd; use File::Copy; + use Config; + use List::Util qw(first); use Exporter; our (@ISA, @EXPORT_OK); *************** *** 106,116 **** sub mkvcbuild (my $xsc = $xs) =~ s/\.xs/.c/; if (Solution::IsNewer("$plperlsrc$xsc","$plperlsrc$xs")) { print "Building $plperlsrc$xsc...\n"; system( $solution->{options}->{perl} . '/bin/perl ' . $solution->{options}->{perl} ! . '/lib/ExtUtils/xsubpp -typemap ' . $solution->{options}->{perl} . '/lib/ExtUtils/typemap ' . "$plperlsrc$xs " --- 108,119 ---- (my $xsc = $xs) =~ s/\.xs/.c/; if (Solution::IsNewer("$plperlsrc$xsc","$plperlsrc$xs")) { + my $xsubppdir = first { -e "$_\\ExtUtils\\xsubpp.BAT" } @INC; print "Building $plperlsrc$xsc...\n"; system( $solution->{options}->{perl} . '/bin/perl ' . $solution->{options}->{perl} ! . "$xsubppdir/ExtUtils/xsubpp -typemap " . $solution->{options}->{perl} . '/lib/ExtUtils/typemap ' . "$plperlsrc$xs "
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers