From 5523beb949241d9ed498aa51eb6c91f7100e7e46 Mon Sep 17 00:00:00 2001
From: Bruce Momjian <bruce@momjian.us>
Date: Mon, 6 Apr 1998 01:16:55 +0000
Subject: [PATCH] Re-introduce $DISTDIR.

---
 src/bin/cleardbdir/Makefile          |  4 ++--
 src/bin/createdb/Makefile            |  4 ++--
 src/bin/createuser/Makefile          |  4 ++--
 src/bin/destroydb/Makefile           |  4 ++--
 src/bin/destroyuser/Makefile         |  4 ++--
 src/bin/initdb/Makefile              |  4 ++--
 src/bin/initlocation/Makefile        |  4 ++--
 src/bin/ipcclean/Makefile            |  4 ++--
 src/bin/pg_dump/Makefile.in          |  6 +++---
 src/bin/pg_id/Makefile               |  4 ++--
 src/bin/pg_passwd/Makefile           |  2 +-
 src/bin/pg_version/Makefile.in       |  4 ++--
 src/bin/pgtclsh/Makefile             |  6 +++---
 src/bin/psql/Makefile.in             |  4 ++--
 src/interfaces/ecpg/include/Makefile | 12 ++++++------
 src/interfaces/ecpg/lib/Makefile.in  |  8 ++++----
 src/interfaces/ecpg/preproc/Makefile |  6 +++---
 src/interfaces/libpgtcl/Makefile.in  |  8 ++++----
 src/interfaces/libpq++/Makefile      | 12 ++++++------
 src/interfaces/libpq/Makefile.in     | 10 +++++-----
 src/pl/tcl/Makefile                  |  4 ++--
 21 files changed, 59 insertions(+), 59 deletions(-)

diff --git a/src/bin/cleardbdir/Makefile b/src/bin/cleardbdir/Makefile
index 1d38b127a0c..12e2d1e10b6 100644
--- a/src/bin/cleardbdir/Makefile
+++ b/src/bin/cleardbdir/Makefile
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/bin/cleardbdir/Attic/Makefile,v 1.6 1998/04/06 00:27:55 momjian Exp $
+#    $Header: /cvsroot/pgsql/src/bin/cleardbdir/Attic/Makefile,v 1.7 1998/04/06 01:14:10 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -20,7 +20,7 @@ cleardbdir:
 	cp cleardbdir.sh cleardbdir
 
 install: cleardbdir
-	$(INSTALL) $(INSTL_EXE_OPTS) $< $(BINDIR)/$<
+	$(INSTALL) $(INSTL_EXE_OPTS) $< $(DESTDIR)$(BINDIR)/$<
 
 clean: 
 	rm -f cleardbdir
diff --git a/src/bin/createdb/Makefile b/src/bin/createdb/Makefile
index 7e789dd9c49..97e71ea6531 100644
--- a/src/bin/createdb/Makefile
+++ b/src/bin/createdb/Makefile
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/bin/createdb/Attic/Makefile,v 1.6 1998/04/06 00:28:04 momjian Exp $
+#    $Header: /cvsroot/pgsql/src/bin/createdb/Attic/Makefile,v 1.7 1998/04/06 01:14:13 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -20,7 +20,7 @@ createdb: createdb.sh
 	cp createdb.sh createdb
 
 install: createdb
-	$(INSTALL) $(INSTL_EXE_OPTS) $< $(BINDIR)/$<
+	$(INSTALL) $(INSTL_EXE_OPTS) $< $(DESTDIR)$(BINDIR)/$<
 
 clean:
 	rm -f createdb
diff --git a/src/bin/createuser/Makefile b/src/bin/createuser/Makefile
index d63b0b2ee7f..f03c925d157 100644
--- a/src/bin/createuser/Makefile
+++ b/src/bin/createuser/Makefile
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/bin/createuser/Attic/Makefile,v 1.6 1998/04/06 00:28:16 momjian Exp $
+#    $Header: /cvsroot/pgsql/src/bin/createuser/Attic/Makefile,v 1.7 1998/04/06 01:14:18 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -24,7 +24,7 @@ createuser: createuser.sh
 	sed $(SEDSCRIPT) <createuser.sh >createuser
 
 install: createuser
-	$(INSTALL) $(INSTL_EXE_OPTS) $< $(BINDIR)/$<
+	$(INSTALL) $(INSTL_EXE_OPTS) $< $(DESTDIR)$(BINDIR)/$<
 
 clean:
 	rm -f createuser
diff --git a/src/bin/destroydb/Makefile b/src/bin/destroydb/Makefile
index fd59639d092..903118db588 100644
--- a/src/bin/destroydb/Makefile
+++ b/src/bin/destroydb/Makefile
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/bin/destroydb/Attic/Makefile,v 1.6 1998/04/06 00:28:25 momjian Exp $
+#    $Header: /cvsroot/pgsql/src/bin/destroydb/Attic/Makefile,v 1.7 1998/04/06 01:14:26 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -20,7 +20,7 @@ destroydb: destroydb.sh
 	cp destroydb.sh destroydb
 
 install: destroydb
-	$(INSTALL) $(INSTL_EXE_OPTS) $< $(BINDIR)/$<
+	$(INSTALL) $(INSTL_EXE_OPTS) $< $(DESTDIR)$(BINDIR)/$<
 
 clean:
 	rm -f destroydb
diff --git a/src/bin/destroyuser/Makefile b/src/bin/destroyuser/Makefile
index 72a9c5572f9..8311cf50b20 100644
--- a/src/bin/destroyuser/Makefile
+++ b/src/bin/destroyuser/Makefile
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/bin/destroyuser/Attic/Makefile,v 1.6 1998/04/06 00:28:37 momjian Exp $
+#    $Header: /cvsroot/pgsql/src/bin/destroyuser/Attic/Makefile,v 1.7 1998/04/06 01:14:36 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -24,7 +24,7 @@ destroyuser: destroyuser.sh
 	sed $(SEDSCRIPT) <destroyuser.sh >destroyuser
 
 install: destroyuser
-	$(INSTALL) $(INSTL_EXE_OPTS) $< $(BINDIR)/$<
+	$(INSTALL) $(INSTL_EXE_OPTS) $< $(DESTDIR)$(BINDIR)/$<
 
 clean:
 	rm -f destroyuser
diff --git a/src/bin/initdb/Makefile b/src/bin/initdb/Makefile
index 67cd26bec1c..9ce4daa5272 100644
--- a/src/bin/initdb/Makefile
+++ b/src/bin/initdb/Makefile
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/bin/initdb/Makefile,v 1.6 1998/04/06 00:28:46 momjian Exp $
+#    $Header: /cvsroot/pgsql/src/bin/initdb/Makefile,v 1.7 1998/04/06 01:14:46 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -17,7 +17,7 @@ include ../../Makefile.global
 all: initdb
 
 install: initdb
-	$(INSTALL) $(INSTL_EXE_OPTS) $< $(BINDIR)/$<
+	$(INSTALL) $(INSTL_EXE_OPTS) $< $(DESTDIR)$(BINDIR)/$<
 
 clean:
 	rm -f initdb
diff --git a/src/bin/initlocation/Makefile b/src/bin/initlocation/Makefile
index 905a402c1a6..bc346b6d286 100644
--- a/src/bin/initlocation/Makefile
+++ b/src/bin/initlocation/Makefile
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/bin/initlocation/Attic/Makefile,v 1.3 1998/04/06 00:29:00 momjian Exp $
+#    $Header: /cvsroot/pgsql/src/bin/initlocation/Attic/Makefile,v 1.4 1998/04/06 01:15:01 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -24,7 +24,7 @@ initlocation: initlocation.sh
 	cp -p initlocation.sh initlocation
 
 install: initlocation
-	$(INSTALL) $(INSTL_EXE_OPTS) $< $(BINDIR)/$<
+	$(INSTALL) $(INSTL_EXE_OPTS) $< $(DESTDIR)$(BINDIR)/$<
 
 clean:
 	rm -f initlocation
diff --git a/src/bin/ipcclean/Makefile b/src/bin/ipcclean/Makefile
index 0286c0c1f32..86b842c689f 100644
--- a/src/bin/ipcclean/Makefile
+++ b/src/bin/ipcclean/Makefile
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/bin/ipcclean/Attic/Makefile,v 1.5 1998/04/06 00:29:03 momjian Exp $
+#    $Header: /cvsroot/pgsql/src/bin/ipcclean/Attic/Makefile,v 1.6 1998/04/06 01:15:09 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -23,7 +23,7 @@ ipcclean:
 	sed $(SEDSCRIPT) <ipcclean.sh >ipcclean
 
 install: ipcclean
-	$(INSTALL) $(INSTL_EXE_OPTS) $< $(BINDIR)/$<
+	$(INSTALL) $(INSTL_EXE_OPTS) $< $(DESTDIR)$(BINDIR)/$<
 
 clean:
 	rm -f ipcclean
diff --git a/src/bin/pg_dump/Makefile.in b/src/bin/pg_dump/Makefile.in
index 7543d338b75..efdbf6399c0 100644
--- a/src/bin/pg_dump/Makefile.in
+++ b/src/bin/pg_dump/Makefile.in
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/Makefile.in,v 1.7 1998/04/06 00:29:08 momjian Exp $
+#    $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/Makefile.in,v 1.8 1998/04/06 01:15:16 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -39,8 +39,8 @@ submake:
 	$(MAKE) -C $(LIBPQDIR) libpq.a
 
 install: pg_dump
-	$(INSTALL) $(INSTL_EXE_OPTS) pg_dump $(BINDIR)/pg_dump
-	$(INSTALL) $(INSTL_EXE_OPTS) pg_dumpall $(BINDIR)/pg_dumpall
+	$(INSTALL) $(INSTL_EXE_OPTS) pg_dump $(DESTDIR)$(BINDIR)/pg_dump
+	$(INSTALL) $(INSTL_EXE_OPTS) pg_dumpall $(DESTDIR)$(BINDIR)/pg_dumpall
 
 depend dep:
 	$(CC) -MM $(CFLAGS) *.c >depend
diff --git a/src/bin/pg_id/Makefile b/src/bin/pg_id/Makefile
index 075ced9a36a..69496059434 100644
--- a/src/bin/pg_id/Makefile
+++ b/src/bin/pg_id/Makefile
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/bin/pg_id/Attic/Makefile,v 1.9 1998/04/06 00:29:14 momjian Exp $
+#    $Header: /cvsroot/pgsql/src/bin/pg_id/Attic/Makefile,v 1.10 1998/04/06 01:15:24 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -33,7 +33,7 @@ $(LIBPQDIR)/libpq.a:
 	$(MAKE) -C $(LIBPQDIR) libpq.a
 
 install: pg_id
-	$(INSTALL) $(INSTL_EXE_OPTS) pg_id $(BINDIR)/pg_id
+	$(INSTALL) $(INSTL_EXE_OPTS) pg_id $(DESTDIR)$(BINDIR)/pg_id
 
 depend dep:
 	$(CC) -MM $(CFLAGS) *.c >depend
diff --git a/src/bin/pg_passwd/Makefile b/src/bin/pg_passwd/Makefile
index 408640fea52..1ef0960d66f 100644
--- a/src/bin/pg_passwd/Makefile
+++ b/src/bin/pg_passwd/Makefile
@@ -15,7 +15,7 @@ pg_passwd: $(OBJS)
 	$(CC) -o pg_passwd $(OBJS) $(LDFLAGS)
 
 install: pg_passwd
-	$(INSTALL) $(INSTL_EXE_OPTS) pg_passwd $(BINDIR)/pg_passwd
+	$(INSTALL) $(INSTL_EXE_OPTS) pg_passwd $(DESTDIR)$(BINDIR)/pg_passwd
 
 .PHONY: submake
 submake:
diff --git a/src/bin/pg_version/Makefile.in b/src/bin/pg_version/Makefile.in
index 8a10428ee3f..819dfbccf71 100644
--- a/src/bin/pg_version/Makefile.in
+++ b/src/bin/pg_version/Makefile.in
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/bin/pg_version/Attic/Makefile.in,v 1.3 1998/04/06 00:29:36 momjian Exp $
+#    $Header: /cvsroot/pgsql/src/bin/pg_version/Attic/Makefile.in,v 1.4 1998/04/06 01:15:44 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -28,7 +28,7 @@ submake:
 	$(MAKE) -C ../../utils version.o
 
 install: pg_version
-	$(INSTALL) $(INSTL_EXE_OPTS) pg_version $(BINDIR)/pg_version
+	$(INSTALL) $(INSTL_EXE_OPTS) pg_version $(DESTDIR)$(BINDIR)/pg_version
 
 depend dep:
 	$(CC) -MM $(CFLAGS) *.c >depend
diff --git a/src/bin/pgtclsh/Makefile b/src/bin/pgtclsh/Makefile
index 1df38a830d3..3aee0223cc7 100644
--- a/src/bin/pgtclsh/Makefile
+++ b/src/bin/pgtclsh/Makefile
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.15 1998/04/06 00:29:46 momjian Exp $
+#    $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.16 1998/04/06 01:15:51 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -37,8 +37,8 @@ pgtksh: pgtkAppInit.o
 	  $(X11_LIBS) -lm $(LDFLAGS)
 
 install: pgtclsh pgtksh
-	$(INSTALL) $(INSTL_EXE_OPTS) pgtclsh $(BINDIR)/pgtclsh
-	$(INSTALL) $(INSTL_EXE_OPTS) pgtksh $(BINDIR)/pgtksh
+	$(INSTALL) $(INSTL_EXE_OPTS) pgtclsh $(DESTDIR)$(BINDIR)/pgtclsh
+	$(INSTALL) $(INSTL_EXE_OPTS) pgtksh $(DESTDIR)$(BINDIR)/pgtksh
 
 clean:
 	rm -f pgtclAppInit.o pgtkAppInit.o pgtclsh pgtksh
diff --git a/src/bin/psql/Makefile.in b/src/bin/psql/Makefile.in
index 3a27c45a2ca..e01674491e3 100644
--- a/src/bin/psql/Makefile.in
+++ b/src/bin/psql/Makefile.in
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/bin/psql/Attic/Makefile.in,v 1.9 1998/04/06 00:29:56 momjian Exp $
+#    $Header: /cvsroot/pgsql/src/bin/psql/Attic/Makefile.in,v 1.10 1998/04/06 01:15:55 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -39,7 +39,7 @@ submake:
 	$(MAKE) -C $(LIBPQDIR) libpq.a
 
 install: psql
-	$(INSTALL) $(INSTL_EXE_OPTS) psql $(BINDIR)/psql
+	$(INSTALL) $(INSTL_EXE_OPTS) psql $(DESTDIR)$(BINDIR)/psql
 
 depend dep:
 	$(CC) -MM $(CFLAGS) *.c >depend
diff --git a/src/interfaces/ecpg/include/Makefile b/src/interfaces/ecpg/include/Makefile
index bfb6840b68c..caa13a8d916 100644
--- a/src/interfaces/ecpg/include/Makefile
+++ b/src/interfaces/ecpg/include/Makefile
@@ -6,13 +6,13 @@ all clean::
 	@echo Nothing to be done.
 
 install::
-	$(INSTALL) $(INSTLOPTS) ecpglib.h $(HEADERDIR)	
-	$(INSTALL) $(INSTLOPTS) ecpgtype.h $(HEADERDIR)	
-	$(INSTALL) $(INSTLOPTS) sqlca.h $(HEADERDIR)	
+	$(INSTALL) $(INSTLOPTS) ecpglib.h $(DESTDIR)$(HEADERDIR)	
+	$(INSTALL) $(INSTLOPTS) ecpgtype.h $(DESTDIR)$(HEADERDIR)	
+	$(INSTALL) $(INSTLOPTS) sqlca.h $(DESTDIR)$(HEADERDIR)	
 
 uninstall::
-	rm -f $(HEADERDIR)/ecpglib.h
-	rm -f $(HEADERDIR)/ecpgtype.h
-	rm -f $(HEADERDIR)/sqlca.h
+	rm -f $(DESTDIR)$(HEADERDIR)/ecpglib.h
+	rm -f $(DESTDIR)$(HEADERDIR)/ecpgtype.h
+	rm -f $(DESTDIR)$(HEADERDIR)/sqlca.h
 
 dep depend:
diff --git a/src/interfaces/ecpg/lib/Makefile.in b/src/interfaces/ecpg/lib/Makefile.in
index 31a81f088de..0326f992ed1 100644
--- a/src/interfaces/ecpg/lib/Makefile.in
+++ b/src/interfaces/ecpg/lib/Makefile.in
@@ -56,14 +56,14 @@ clean:
 dep depend:
 
 install: libecpg.a $(shlib) $(install-shlib-dep)
-	$(INSTALL) $(INSTLOPTS) libecpg.a $(LIBDIR)
+	$(INSTALL) $(INSTLOPTS) libecpg.a $(DESTDIR)$(LIBDIR)
 
 install-shlib:
-	$(INSTALL) $(INSTLOPTS) $(shlib) $(LIBDIR)
-	ln -sf $(shlib) $(LIBDIR)/libecpg.so
+	$(INSTALL) $(INSTLOPTS) $(shlib) $(DESTDIR)$(LIBDIR)
+	ln -sf $(shlib) $(DESTDIR)$(LIBDIR)/libecpg.so
 
 uninstall::
-	rm -f $(LIBDIR)/libecpg.a $(LIBDIR)/$(shlib)
+	rm -f $(DESTDIR)$(LIBDIR)/libecpg.a $(DESTDIR)$(LIBDIR)/$(shlib)
 
 # Rules that do something
 libecpg.a : libecpg.a(ecpglib.o) libecpg.a(typename.o)
diff --git a/src/interfaces/ecpg/preproc/Makefile b/src/interfaces/ecpg/preproc/Makefile
index af684bd3d57..89fa3373c47 100644
--- a/src/interfaces/ecpg/preproc/Makefile
+++ b/src/interfaces/ecpg/preproc/Makefile
@@ -7,7 +7,7 @@ PATCHLEVEL=0
 
 CFLAGS+=-I../include -DMAJOR_VERSION=$(MAJOR_VERSION) \
 	-DMINOR_VERSION=$(MINOR_VERSION) -DPATCHLEVEL=$(PATCHLEVEL) \
-	-DINCLUDE_PATH=\"$(HEADERDIR)\"
+	-DINCLUDE_PATH=\"$(DESTDIR)$(HEADERDIR)\"
 
 all:: ecpg
 
@@ -15,10 +15,10 @@ clean:
 	rm -f *.o core a.out ecpg y.tab.h y.tab.c pgc.c *~
 
 install: all
-	$(INSTALL) $(INSTL_EXE_OPTS) ecpg $(BINDIR)
+	$(INSTALL) $(INSTL_EXE_OPTS) ecpg $(DESTDIR)$(BINDIR)
 
 uninstall:
-	rm -f $(BINDIR)/ecpg
+	rm -f $(DESTDIR)$(BINDIR)/ecpg
 
 dep depend:
 	$(CC) -MM $(CFLAGS) *.c > depend
diff --git a/src/interfaces/libpgtcl/Makefile.in b/src/interfaces/libpgtcl/Makefile.in
index e8bff5a1315..560ca79da5c 100644
--- a/src/interfaces/libpgtcl/Makefile.in
+++ b/src/interfaces/libpgtcl/Makefile.in
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile.in,v 1.8 1998/04/06 00:30:46 momjian Exp $
+#    $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile.in,v 1.9 1998/04/06 01:16:38 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -94,12 +94,12 @@ beforeinstall-headers:
 	@if [ ! -d $(HEADERDIR) ]; then mkdir $(HEADERDIR); fi
 
 install-libpgtcl: libpgtcl.a
-	$(INSTALL) $(INSTL_LIB_OPTS) libpgtcl.a $(LIBDIR)/libpgtcl.a
+	$(INSTALL) $(INSTL_LIB_OPTS) libpgtcl.a $(DESTDIR)$(LIBDIR)/libpgtcl.a
 
 install-shlib: $(shlib)
 	$(INSTALL) $(INSTL_LIB_OPTS) $(shlib) \
-		$(LIBDIR)/$(shlib)
-	ln -sf $(shlib) $(LIBDIR)/libpgtcl.so
+		$(DESTDIR)$(LIBDIR)/$(shlib)
+	ln -sf $(shlib) $(DESTDIR)$(LIBDIR)/libpgtcl.so
 
 .PHONY: clean
 clean: 
diff --git a/src/interfaces/libpq++/Makefile b/src/interfaces/libpq++/Makefile
index a56f2b6249c..9b9081e3f1e 100644
--- a/src/interfaces/libpq++/Makefile
+++ b/src/interfaces/libpq++/Makefile
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile,v 1.12 1998/04/06 00:31:13 momjian Exp $
+#    $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile,v 1.13 1998/04/06 01:16:47 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -99,15 +99,15 @@ beforeinstall-headers:
 	@if [ ! -d $(LIBPGXXHEADERDIR) ]; then mkdir $(LIBPGXXHEADERDIR); fi
 
 beforeinstall-lib:
-	@if [ ! -d $(LIBDIR) ] ; then mkdir $(LIBDIR); fi
+	@if [ ! -d $(DESTDIR)/$(LIBDIR) ] ; then mkdir $(DESTDIR)/$(LIBDIR); fi
 
 install-$(LIBNAME): $(LIBNAME).a beforeinstall-lib
-	$(INSTALL) $(INSTL_LIB_OPTS) $(LIBNAME).a $(LIBDIR)/$(LIBNAME).a
+	$(INSTALL) $(INSTL_LIB_OPTS) $(LIBNAME).a $(DESTDIR)$(LIBDIR)/$(LIBNAME).a
 
 install-shlib: $(SHLIBNAME) beforeinstall-lib
-	$(INSTALL) $(INSTL_SHLIB_OPTS) $(SHLIB) $(LIBDIR)/$(SHLIB)
-	rm -f $(LIBDIR)/libpq++.so
-	ln -sf $(SHLIB) $(LIBDIR)/libpq++.so
+	$(INSTALL) $(INSTL_SHLIB_OPTS) $(SHLIB) $(DESTDIR)/$(LIBDIR)/$(SHLIB)
+	rm -f $(DESTDIR)/$(LIBDIR)/libpq++.so
+	ln -sf $(SHLIB) $(DESTDIR)/$(LIBDIR)/libpq++.so
 
 
 doc:
diff --git a/src/interfaces/libpq/Makefile.in b/src/interfaces/libpq/Makefile.in
index ad966e89444..2598ee5cd27 100644
--- a/src/interfaces/libpq/Makefile.in
+++ b/src/interfaces/libpq/Makefile.in
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.11 1998/04/06 00:30:58 momjian Exp $
+#    $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.12 1998/04/06 01:16:43 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -170,12 +170,12 @@ beforeinstall-headers:
 		then mkdir $(HEADERDIR)/commands; fi
 
 install-libpq: libpq.a
-	$(INSTALL) $(INSTL_LIB_OPTS) libpq.a $(LIBDIR)/libpq.a
+	$(INSTALL) $(INSTL_LIB_OPTS) libpq.a $(DESTDIR)$(LIBDIR)/libpq.a
 
 install-shlib: $(shlib)
-	$(INSTALL) $(INSTL_LIB_OPTS) $(shlib) $(LIBDIR)/$(shlib)
-	rm -f $(LIBDIR)/libpq.so
-	ln -s $(shlib) $(LIBDIR)/libpq.so
+	$(INSTALL) $(INSTL_LIB_OPTS) $(shlib) $(DESTDIR)$(LIBDIR)/$(shlib)
+	rm -f $(DESTDIR)$(LIBDIR)/libpq.so
+	ln -s $(shlib) $(DESTDIR)$(LIBDIR)/libpq.so
 
 depend dep:
 	$(CC) -MM $(CFLAGS) *.c >depend
diff --git a/src/pl/tcl/Makefile b/src/pl/tcl/Makefile
index c5d9376a61e..45075147638 100644
--- a/src/pl/tcl/Makefile
+++ b/src/pl/tcl/Makefile
@@ -4,7 +4,7 @@
 #    Makefile for the pltcl shared object
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.3 1998/04/06 00:31:59 momjian Exp $
+#    $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.4 1998/04/06 01:16:55 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -87,6 +87,6 @@ clean:
 	rm -f Makefile.tcldefs
 
 install: all
-	$(INSTALL) $(INSTL_LIB_OPTS) $(DLOBJS) $(LIBDIR)/$(DLOBJS)
+	$(INSTALL) $(INSTL_LIB_OPTS) $(DLOBJS) $(DESTDIR)$(LIBDIR)/$(DLOBJS)
 
 dep depend:
-- 
GitLab