diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2011-09-04 20:07:38 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2011-09-04 20:07:38 -0400 |
commit | eed7dcfceedeb314d17695f014754ac0f3e8f892 (patch) | |
tree | 0a3ea6b6213fd98a4f7bcb12b89edc75acb31a0f | |
parent | 1ae019f04b95771293f9a649c298aaeb0d3155a2 (diff) | |
download | postgresql-eed7dcfceedeb314d17695f014754ac0f3e8f892.tar.gz |
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/GNUmakefile | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pl/plperl/GNUmakefile b/src/pl/plperl/GNUmakefile index 79a8d5d3fa..aa44827bfa 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 $< >$@ |