summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2009-06-23 03:46:00 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2009-06-23 03:46:00 +0000
commit8d355d7bbfea045415afe66a30e321d4621cc1b9 (patch)
tree294bc866913ee84655c0d6a44a7d7287c10f47a1 /src
parentbc00ceb159624ab1e4125995a64b318e6c2b1157 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.global.in10
-rw-r--r--src/bin/psql/Makefile7
2 files changed, 8 insertions, 9 deletions
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