aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2011-09-04 20:07:34 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2011-09-04 20:07:34 -0400
commit6a24742c1a1bd04c02da24c4739811b068a84367 (patch)
tree4daa089145fd84a84a20f9f54c7b63971a51e831
parent4c2777d0b733220d9029f78817af8ce671e4a5ad (diff)
downloadpostgresql-6a24742c1a1bd04c02da24c4739811b068a84367.tar.gz
postgresql-6a24742c1a1bd04c02da24c4739811b068a84367.zip
Guard against using plperl's Makefile without specifying --with-perl.
The $(PERL) macro will be set by configure if it finds perl at all, but $(perl_privlibexp) isn't configured unless you said --with-perl. This results in confusing error messages if someone cd's into src/pl/plperl and tries to build there despite the configure omission, as reported by Tomas Vondra in bug #6198. Add simple checks to provide a more useful report, while not disabling other use of the makefile such as "make clean". Back-patch to 9.0, which is as far as the patch applies easily.
-rw-r--r--src/pl/plperl/GNUmakefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pl/plperl/GNUmakefile b/src/pl/plperl/GNUmakefile
index 79a8d5d3fad..aa44827bfa7 100644
--- a/src/pl/plperl/GNUmakefile
+++ b/src/pl/plperl/GNUmakefile
@@ -60,17 +60,21 @@ include $(top_srcdir)/src/Makefile.shlib
plperl.o: perlchunks.h plperl_opmask.h
plperl_opmask.h: plperl_opmask.pl
+ @if [ x"$(perl_privlibexp)" = x"" ]; then echo "configure switch --with-perl was not specified."; exit 1; fi
$(PERL) $< $@
perlchunks.h: $(PERLCHUNKS)
+ @if [ x"$(perl_privlibexp)" = x"" ]; then echo "configure switch --with-perl was not specified."; exit 1; fi
$(PERL) $(srcdir)/text2macro.pl --strip='^(\#.*|\s*)$$' $^ > $@
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 $< >$@