aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2017-08-10 23:33:47 -0400
committerPeter Eisentraut <peter_e@gmx.net>2017-09-27 11:51:21 -0400
commit639928c988c1c2f52bbe7ca89e8c7c78a041b3e2 (patch)
treea319bacfd48d8914052a18c78eb3191af5e55693 /src
parent684cf76b83e9dc8aed12aeb9131d2208f61bd31f (diff)
downloadpostgresql-639928c988c1c2f52bbe7ca89e8c7c78a041b3e2.tar.gz
postgresql-639928c988c1c2f52bbe7ca89e8c7c78a041b3e2.zip
Improve vpath support in plperl build
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>
Diffstat (limited to 'src')
-rw-r--r--src/pl/plperl/GNUmakefile8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/pl/plperl/GNUmakefile b/src/pl/plperl/GNUmakefile
index 191f74067a6..66a2c3d4c9c 100644
--- a/src/pl/plperl/GNUmakefile
+++ b/src/pl/plperl/GNUmakefile
@@ -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