7
7
#
8
8
#
9
9
# 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 $
11
11
#
12
12
# -------------------------------------------------------------------------
13
13
@@ -18,7 +18,9 @@ include $(SRCDIR)/Makefile.global
18
18
# Note: the klugery for perl5 is to ensure that the perl5 shared lib
19
19
# gets built with the correct path to the installed location of libpq
20
20
# 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.
22
24
23
25
.DEFAULT all install clean dep depend distclean :
24
26
$(MAKE ) -C libpq $@
@@ -49,7 +51,14 @@ perl5/Makefile: perl5/Makefile.PL
49
51
install-perl5 :
50
52
$(MAKE ) -C perl5 clean
51
53
cd 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
54
63
55
64
.PHONY : install-perl5
0 commit comments