Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9f39b9a

Browse files
committed
Detect lack of permission to install into Perl module library,
and emit informative message instead of aborting the Postgres install.
1 parent6954537 commit9f39b9a

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

‎src/interfaces/Makefile

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
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
.DEFAULTallinstallcleandepdependdistclean:
2426
$(MAKE) -C libpq$@
@@ -49,7 +51,14 @@ perl5/Makefile: perl5/Makefile.PL
4951
install-perl5:
5052
$(MAKE) -C perl5 clean
5153
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
5463

5564
.PHONY: install-perl5

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp