diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 1998-10-27 21:27:36 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 1998-10-27 21:27:36 +0000 |
commit | 9f39b9a15b36cd5b314e310493aedd756d6af614 (patch) | |
tree | add2f31cc5ec88f64deb006756784075723e7f6e | |
parent | 695453738a3d7a5afa5929bc02f7046b95d91430 (diff) |
Detect lack of permission to install into Perl module library,
and emit informative message instead of aborting the Postgres install.
-rw-r--r-- | src/interfaces/Makefile | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/interfaces/Makefile b/src/interfaces/Makefile index 82e503c1389..65a2f51b6fb 100644 --- a/src/interfaces/Makefile +++ b/src/interfaces/Makefile @@ -7,7 +7,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/interfaces/Makefile,v 1.19 1998/10/18 02:33:56 tgl Exp $ +# $Header: /cvsroot/pgsql/src/interfaces/Makefile,v 1.20 1998/10/27 21:27:36 tgl Exp $ # #------------------------------------------------------------------------- @@ -18,7 +18,9 @@ include $(SRCDIR)/Makefile.global # Note: the klugery for perl5 is to ensure that the perl5 shared lib # gets built with the correct path to the installed location of libpq # during "make install", but is built against the local tree during -# ordinary building and testing. +# ordinary building and testing. During install, we must also guard +# against the likelihood that we don't have permissions to install into +# the Perl module library. .DEFAULT all install clean dep depend distclean: $(MAKE) -C libpq $@ @@ -49,7 +51,14 @@ perl5/Makefile: perl5/Makefile.PL install-perl5: $(MAKE) -C perl5 clean cd perl5 && POSTGRES_HOME="$(POSTGRESDIR)" perl Makefile.PL - $(MAKE) -C perl5 install - rm -f perl5/Makefile + $(MAKE) -C perl5 all + if [ -w `sed -n -e 's/^ *SITELIBEXP *= *//p' perl5/Makefile` ]; then \ + $(MAKE) $(MFLAGS) -C perl5 install; \ + rm -f perl5/Makefile; \ + else \ + echo "Skipping install of Perl module for lack of permissions."; \ + echo "To install it, cd into interfaces/perl5, su to become the"; \ + echo "appropriate user, and do '$(MAKE) install'."; \ + fi .PHONY: install-perl5 |