]> granicus.if.org Git - postgresql/commitdiff
Improve vpath support in plperl build
authorPeter Eisentraut <peter_e@gmx.net>
Fri, 11 Aug 2017 03:33:47 +0000 (23:33 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Wed, 27 Sep 2017 15:51:21 +0000 (11:51 -0400)
Run xsubpp with the -output option instead of redirecting stdout.  That
ensures that the #line directives in the output file point to the right
place in a vpath build.  This in turn fixes an error in coverage builds
that it can't find the source files.

Refactor the makefile rules while we're here.

Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
src/pl/plperl/GNUmakefile

index 191f74067a6583b4ab75ccc68312fc873d42dd2f..66a2c3d4c9c69965892625aca1bdbb877db1b3fa 100644 (file)
@@ -81,13 +81,9 @@ perlchunks.h: $(PERLCHUNKS)
 
 all: all-lib
 
-SPI.c: SPI.xs plperl_helpers.h
+%.c: %.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 plperl_helpers.h
-       @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 $< >$@
+       $(PERL) $(XSUBPPDIR)/ExtUtils/xsubpp -typemap $(perl_privlibexp)/ExtUtils/typemap -output $@ $<
 
 
 install: all install-lib install-data