postgres.git / summary / log / commit / refs

commit    ed7eff89fd64021a2b4150c7d2caca488274c80b
Author:   Tom Lane <tgl@sss.pgh.pa.us>
Date:     Mon Sep 05 00:07:42 2011 +0000
First released in: 9.2.0, 9.0.5, 9.1.0

    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.


src/pl/plperl/GNUmakefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pl/plperl/GNUmakefile b/src/pl/plperl/GNUmakefile index d53811263a4..694a9b2189c 100644 --- a/src/pl/plperl/GNUmakefile +++ b/src/pl/plperl/GNUmakefile @@ -57,17 +57,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) +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 $< >$@ install: all installdirs install-lib [parent: 0962182f01c1]