Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 6a24742

Browse files
committed
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.
1 parent 4c2777d commit 6a24742

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/pl/plperl/GNUmakefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,21 @@ include $(top_srcdir)/src/Makefile.shlib
6060
plperl.o: perlchunks.h plperl_opmask.h
6161

6262
plperl_opmask.h: plperl_opmask.pl
63+
@if [ x"$(perl_privlibexp)" = x"" ]; then echo "configure switch --with-perl was not specified."; exit 1; fi
6364
$(PERL) $< $@
6465

6566
perlchunks.h: $(PERLCHUNKS)
67+
@if [ x"$(perl_privlibexp)" = x"" ]; then echo "configure switch --with-perl was not specified."; exit 1; fi
6668
$(PERL) $(srcdir)/text2macro.pl --strip='^(\#.*|\s*)$$' $^ > $@
6769

6870
all: all-lib
6971

7072
SPI.c: SPI.xs
73+
@if [ x"$(perl_privlibexp)" = x"" ]; then echo "configure switch --with-perl was not specified."; exit 1; fi
7174
$(PERL) $(perl_privlibexp)/ExtUtils/xsubpp -typemap $(perl_privlibexp)/ExtUtils/typemap $< >$@
7275

7376
Util.c: Util.xs
77+
@if [ x"$(perl_privlibexp)" = x"" ]; then echo "configure switch --with-perl was not specified."; exit 1; fi
7478
$(PERL) $(perl_privlibexp)/ExtUtils/xsubpp -typemap $(perl_privlibexp)/ExtUtils/typemap $< >$@
7579

7680

0 commit comments

Comments
 (0)