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/backend | |
| parent | e930a9a97b46113a8932feb8555a3df362056080 (diff) | |
| download | postgresql-335248c9b7cf590f03c67aa0cadfcf95627fedd5.tar.gz | |
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/backend')
| -rw-r--r-- | src/backend/Makefile | 32 | ||||
| -rw-r--r-- | src/backend/catalog/Makefile | 14 |
2 files changed, 23 insertions, 23 deletions
diff --git a/src/backend/Makefile b/src/backend/Makefile index c584d9ba29..f6965ef563 100644 --- a/src/backend/Makefile +++ b/src/backend/Makefile @@ -4,7 +4,7 @@ # # Copyright (c) 1994, Regents of the University of California # -# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.64 2000/08/31 16:09:23 petere Exp $ +# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.65 2000/09/17 13:02:30 petere Exp $ # #------------------------------------------------------------------------- @@ -119,23 +119,23 @@ distprep: install: all installdirs install-bin ifeq ($(PORTNAME), win) ifeq ($(MAKE_DLL), true) - $(INSTALL_DATA) libpostgres.a $(libdir)/libpostgres.a + $(INSTALL_DATA) libpostgres.a $(DESTDIR)$(libdir)/libpostgres.a endif endif $(MAKE) -C catalog install-bki - $(INSTALL_DATA) libpq/pg_hba.conf.sample $(datadir)/pg_hba.conf.sample - $(INSTALL_DATA) libpq/pg_ident.conf.sample $(datadir)/pg_ident.conf.sample - $(INSTALL_DATA) utils/misc/postgresql.conf.sample $(datadir)/postgresql.conf.sample + $(INSTALL_DATA) libpq/pg_hba.conf.sample $(DESTDIR)$(datadir)/pg_hba.conf.sample + $(INSTALL_DATA) libpq/pg_ident.conf.sample $(DESTDIR)$(datadir)/pg_ident.conf.sample + $(INSTALL_DATA) utils/misc/postgresql.conf.sample $(DESTDIR)$(datadir)/postgresql.conf.sample installdirs: - $(mkinstalldirs) $(bindir) $(libdir) $(datadir) + $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) $(DESTDIR)$(datadir) install-bin: postgres $(POSTGRES_IMP) installdirs - $(INSTALL_PROGRAM) postgres$(X) $(bindir)/postgres$(X) - @rm -f $(bindir)/postmaster - ln -s postgres$(X) $(bindir)/postmaster + $(INSTALL_PROGRAM) postgres$(X) $(DESTDIR)$(bindir)/postgres$(X) + @rm -f $(DESTDIR)$(bindir)/postmaster + ln -s postgres$(X) $(DESTDIR)$(bindir)/postmaster ifeq ($(MAKE_EXPORTS), true) - $(INSTALL_DATA) $(POSTGRES_IMP) $(libdir)/$(POSTGRES_IMP) + $(INSTALL_DATA) $(POSTGRES_IMP) $(DESTDIR)$(libdir)/$(POSTGRES_IMP) endif .PHONY: install-bin @@ -143,19 +143,19 @@ endif ########################################################################## uninstall: - rm -f $(bindir)/postgres$(X) $(bindir)/postmaster + rm -f $(DESTDIR)$(bindir)/postgres$(X) $(DESTDIR)$(bindir)/postmaster ifeq ($(MAKE_EXPORTS), true) - rm -f $(libdir)/$(POSTGRES_IMP) + rm -f $(DESTDIR)$(libdir)/$(POSTGRES_IMP) endif ifeq ($(PORTNAME), win) ifeq ($(MAKE_DLL), true) - rm -f $(libdir)/libpostgres.a + rm -f $(DESTDIR)$(libdir)/libpostgres.a endif endif $(MAKE) -C catalog uninstall-bki - rm -f $(datadir)/pg_hba.conf.sample \ - $(datadir)/pg_ident.conf.sample \ - $(datadir)/postgresql.conf.sample + rm -f $(DESTDIR)$(datadir)/pg_hba.conf.sample \ + $(DESTDIR)$(datadir)/pg_ident.conf.sample \ + $(DESTDIR)$(datadir)/postgresql.conf.sample ########################################################################## diff --git a/src/backend/catalog/Makefile b/src/backend/catalog/Makefile index 696853f06c..4a1aa665a8 100644 --- a/src/backend/catalog/Makefile +++ b/src/backend/catalog/Makefile @@ -2,7 +2,7 @@ # # Makefile for catalog # -# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.24 2000/08/31 16:09:49 petere Exp $ +# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.25 2000/09/17 13:02:30 petere Exp $ # #------------------------------------------------------------------------- @@ -43,17 +43,17 @@ template1.bki template1.description: genbki.sh $(TEMPLATE1_BKI_SRCS) .PHONY: install-bki install-bki: $(BKIFILES) installdirs - $(INSTALL_DATA) global.bki $(datadir)/global.bki - $(INSTALL_DATA) global.description $(datadir)/global.description - $(INSTALL_DATA) template1.bki $(datadir)/template1.bki - $(INSTALL_DATA) template1.description $(datadir)/template1.description + $(INSTALL_DATA) global.bki $(DESTDIR)$(datadir)/global.bki + $(INSTALL_DATA) global.description $(DESTDIR)$(datadir)/global.description + $(INSTALL_DATA) template1.bki $(DESTDIR)$(datadir)/template1.bki + $(INSTALL_DATA) template1.description $(DESTDIR)$(datadir)/template1.description installdirs: - $(mkinstalldirs) $(datadir) + $(mkinstalldirs) $(DESTDIR)$(datadir) .PHONY: uninstall-bki uninstall-bki: - rm -f $(addprefix $(datadir)/, $(BKIFILES)) + rm -f $(addprefix $(DESTDIR)$(datadir)/, $(BKIFILES)) clean: |
