diff options
| author | Peter Eisentraut <peter_e@gmx.net> | 2000-09-17 13:02:52 +0000 |
|---|---|---|
| committer | Peter Eisentraut <peter_e@gmx.net> | 2000-09-17 13:02:52 +0000 |
| commit | 335248c9b7cf590f03c67aa0cadfcf95627fedd5 (patch) | |
| tree | 4bdb05df045f4334c270b5f1cb18b84b3d48b20c /src/Makefile.shlib | |
| parent | e930a9a97b46113a8932feb8555a3df362056080 (diff) | |
Support for DESTDIR make variable. This is used as in `make install
DESTDIR=/else/where' and prepends the value of DESTDIR to the full
installation paths (e.g., /else/where/usr/local/pgsql/bin). This allows
users to install the package into a location different from the one that
was configured and hard-coded into various scripts, e.g., for creating
binary packages.
DESTDIR is in many cases preferrable over `make install
prefix=/else/where' because
a) `prefix' affects the path that is hard-coded into the files, which can
lead to a `make install prefix=xxx' (as done by the regression test
driver) corrupting the files in the source tree with wrong paths.
b) it doesn't work at all if a directory was overridden to not depend on
`prefix', e.g., --sysconfdir=/etc.
(Updating the regression test driver to use DESTDIR is a separate
undertaking.)
See also autoconf@gnu.org, From: Akim Demaille <akim@epita.fr>, Date: 08
Sep 2000 12:48:59 +0200, Message-ID:
<mv4em2vb1lw.fsf@nostromo.lrde.epita.fr>, Subject: Re: HTML format
documentation.
Diffstat (limited to 'src/Makefile.shlib')
| -rw-r--r-- | src/Makefile.shlib | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/Makefile.shlib b/src/Makefile.shlib index 467cfc18d77..b08a59f691a 100644 --- a/src/Makefile.shlib +++ b/src/Makefile.shlib @@ -6,7 +6,7 @@ # Copyright (c) 1998, Regents of the University of California # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.22 2000/07/07 01:23:43 momjian Exp $ +# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.23 2000/09/17 13:02:29 petere Exp $ # #------------------------------------------------------------------------- @@ -274,19 +274,19 @@ endif # shlib install-lib: install-lib-static install-lib-shared install-lib-static: lib$(NAME).a - $(INSTALL_DATA) $< $(libdir)/lib$(NAME).a + $(INSTALL_DATA) $< $(DESTDIR)$(libdir)/lib$(NAME).a ifdef shlib install-lib-shared: $(shlib) - $(INSTALL_SHLIB) $< $(libdir)/$(shlib) + $(INSTALL_SHLIB) $< $(DESTDIR)$(libdir)/$(shlib) ifneq ($(PORTNAME), win) ifneq ($(shlib), lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)) - cd $(libdir) && \ + cd $(DESTDIR)$(libdir) && \ rm -f lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) && \ $(LN_S) $(shlib) lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) endif ifneq ($(shlib), lib$(NAME)$(DLSUFFIX)) - cd $(libdir) && \ + cd $(DESTDIR)$(libdir) && \ rm -f lib$(NAME)$(DLSUFFIX) && \ $(LN_S) $(shlib) lib$(NAME)$(DLSUFFIX) endif @@ -301,11 +301,11 @@ endif # shlib .PHONY: uninstall-lib uninstall-lib: - rm -f $(libdir)/lib$(NAME).a + rm -f $(DESTDIR)$(libdir)/lib$(NAME).a ifdef shlib - rm -f $(libdir)/lib$(NAME)$(DLSUFFIX) \ - $(libdir)/lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) \ - $(libdir)/lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) + rm -f $(DESTDIR)$(libdir)/lib$(NAME)$(DLSUFFIX) \ + $(DESTDIR)$(libdir)/lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) \ + $(DESTDIR)$(libdir)/lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) endif # shlib |
