summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2000-04-23 04:26:32 +0000
committerTom Lane2000-04-23 04:26:32 +0000
commitcfc0e015a171c313a3319a9b6caf50878c81b3d6 (patch)
treeadb76324e8ba1a091e6945b7da3082bddb876386
parent2ee858b5f06082e5f4157f86ebba97eb8f28a502 (diff)
Our test to see if we had permission to install into Perl5 install area
always failed if Perl makefile's INSTALLSITELIB variable was specified in terms of another variable. Fix by adding an echo-installdir target to the Perl makefile, which the upper-level Makefile can invoke.
-rw-r--r--src/interfaces/Makefile4
-rw-r--r--src/interfaces/perl5/Makefile.PL14
2 files changed, 13 insertions, 5 deletions
diff --git a/src/interfaces/Makefile b/src/interfaces/Makefile
index b6a0af02d86..e2fa6d6e3a8 100644
--- a/src/interfaces/Makefile
+++ b/src/interfaces/Makefile
@@ -7,7 +7,7 @@
#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/interfaces/Makefile,v 1.35 2000/04/20 17:21:46 momjian Exp $
+# $Header: /cvsroot/pgsql/src/interfaces/Makefile,v 1.36 2000/04/23 04:26:31 tgl Exp $
#
#-------------------------------------------------------------------------
@@ -53,7 +53,7 @@ install-perl5: perl5/Makefile
$(MAKE) -C perl5 clean
cd perl5 && POSTGRES_HOME="$(POSTGRESDIR)" $(PERL) Makefile.PL POLLUTE=1
$(MAKE) -C perl5 all
- -@if [ -w `sed -n -e 's/^ *INSTALLSITELIB *= *//p' perl5/Makefile` ]; then \
+ -@if [ -w `$(MAKE) --quiet -C perl5 echo-installdir` ]; then \
$(MAKE) $(MFLAGS) -C perl5 install; \
rm -f perl5/Makefile; \
else \
diff --git a/src/interfaces/perl5/Makefile.PL b/src/interfaces/perl5/Makefile.PL
index 147c0bd1e45..d63c7e7ad5f 100644
--- a/src/interfaces/perl5/Makefile.PL
+++ b/src/interfaces/perl5/Makefile.PL
@@ -1,6 +1,6 @@
#-------------------------------------------------------
#
-# $Id: Makefile.PL,v 1.14 1998/10/18 02:36:48 tgl Exp $
+# $Id: Makefile.PL,v 1.15 2000/04/23 04:26:32 tgl Exp $
#
# Copyright (c) 1997, 1998 Edmund Mergl
#
@@ -53,6 +53,14 @@ where Postgres is installed (often /usr/local/pgsql).\n";
WriteMakefile(%opts);
-exit(0);
-# end of Makefile.PL
+sub MY::installbin {
+
+q[
+# Create a target that interfaces/Makefile can use to
+# determine the Perl install directory.
+echo-installdir:
+ @echo $(INSTALLSITELIB)
+];
+
+}