77#
88#
99# IDENTIFICATION
10- # $Header: /cvsroot/pgsql/src/interfaces/Makefile,v 1.19 1998/10/18 02:33:56 tgl Exp $
10+ # $Header: /cvsroot/pgsql/src/interfaces/Makefile,v 1.20 1998/10/27 21:27:36 tgl Exp $
1111#
1212# -------------------------------------------------------------------------
1313
@@ -18,7 +18,9 @@ include $(SRCDIR)/Makefile.global
1818# Note: the klugery for perl5 is to ensure that the perl5 shared lib
1919# gets built with the correct path to the installed location of libpq
2020# during "make install", but is built against the local tree during
21- # ordinary building and testing.
21+ # ordinary building and testing. During install, we must also guard
22+ # against the likelihood that we don't have permissions to install into
23+ # the Perl module library.
2224
2325.DEFAULT all install clean dep depend distclean :
2426$(MAKE ) -C libpq$@
@@ -49,7 +51,14 @@ perl5/Makefile: perl5/Makefile.PL
4951install-perl5 :
5052$(MAKE ) -C perl5 clean
5153cd perl5&& POSTGRES_HOME=" $( POSTGRESDIR) " perl Makefile.PL
52- $(MAKE ) -C perl5 install
53- rm -f perl5/Makefile
54+ $(MAKE ) -C perl5 all
55+ if [-w ` sed -n -e' s/^ *SITELIBEXP *= *//p' perl5/Makefile` ]; then \
56+ $(MAKE ) $(MFLAGS ) -C perl5 install; \
57+ rm -f perl5/Makefile; \
58+ else \
59+ echo " Skipping install of Perl module for lack of permissions." ; \
60+ echo " To install it, cd into interfaces/perl5, su to become the" ; \
61+ echo " appropriate user, and do '$( MAKE) install'." ; \
62+ fi
5463
5564.PHONY : install-perl5