From 8d355d7bbfea045415afe66a30e321d4621cc1b9 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 23 Jun 2009 03:46:00 +0000 Subject: Fix the makefiles to fail cleanly if Perl is needed but not present. This used to work as intended, but got broken some time ago (a quoted empty string is not an empty string), and got broken some more by the changes to generate ecpg's preproc.y automatically. Given all the unprotected uses of $(PERL) elsewhere, it seems best to make use of the $(missing) script rather than trying to ensure each such use is protected individually. Also fix various bits of documentation that omitted to mention Perl as a requirement for building from a CVS pull. Per a complaint from Robert Haas. --- src/Makefile.global.in | 10 +++++++--- src/bin/psql/Makefile | 7 +------ 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/Makefile.global.in b/src/Makefile.global.in index 1facf7c315e..763bdc004a0 100644 --- a/src/Makefile.global.in +++ b/src/Makefile.global.in @@ -1,5 +1,5 @@ # -*-makefile-*- -# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.253 2009/02/19 10:32:30 petere Exp $ +# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.254 2009/06/23 03:46:00 tgl Exp $ #------------------------------------------------------------------------------ # All PostgreSQL makefiles include this file and use the variables it sets, @@ -248,8 +248,12 @@ X = @EXEEXT@ # Perl -# quoted for pathname with spaces -PERL = "@PERL@" +ifneq (@PERL@,) + # quoted to protect pathname with spaces + PERL = "@PERL@" +else + PERL = $(missing) perl +endif perl_archlibexp = @perl_archlibexp@ perl_privlibexp = @perl_privlibexp@ perl_useshrplib = @perl_useshrplib@ diff --git a/src/bin/psql/Makefile b/src/bin/psql/Makefile index d8a1f60c47c..01049d8af24 100644 --- a/src/bin/psql/Makefile +++ b/src/bin/psql/Makefile @@ -5,7 +5,7 @@ # Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group # Portions Copyright (c) 1994, Regents of the University of California # -# $PostgreSQL: pgsql/src/bin/psql/Makefile,v 1.62 2009/03/07 00:13:58 alvherre Exp $ +# $PostgreSQL: pgsql/src/bin/psql/Makefile,v 1.63 2009/06/23 03:46:00 tgl Exp $ # #------------------------------------------------------------------------- @@ -40,13 +40,8 @@ dumputils.c keywords.c: % : $(top_srcdir)/src/bin/pg_dump/% kwlookup.c: % : $(top_srcdir)/src/backend/parser/% rm -f $@ && $(LN_S) $< . -ifdef PERL $(srcdir)/sql_help.h: create_help.pl $(wildcard $(REFDOCDIR)/*.sgml) $(PERL) $< $(REFDOCDIR) $@ -else -$(srcdir)/sql_help.h: - @echo "*** Perl is needed to build psql help." -endif $(srcdir)/psqlscan.c: psqlscan.l ifdef FLEX -- cgit v1.2.3