diff --git a/src/interfaces/python/GNUmakefile b/src/interfaces/python/GNUmakefile
index e60e5e91565653462e67240c49b44708d3eedf76..7aa1cb07451f1e8ee624d4e0b36ac61f4a2973ee 100644
--- a/src/interfaces/python/GNUmakefile
+++ b/src/interfaces/python/GNUmakefile
@@ -4,7 +4,7 @@
 #
 # Written by Peter Eisentraut  <peter_e@gmx.net>
 #
-# $Header: /cvsroot/pgsql/src/interfaces/python/Attic/GNUmakefile,v 1.7 2001/05/12 17:49:32 petere Exp $
+# $Header: /cvsroot/pgsql/src/interfaces/python/Attic/GNUmakefile,v 1.8 2001/05/25 14:29:39 momjian Exp $
 #
 #-------------------------------------------------------------------
 
@@ -32,10 +32,10 @@ Setup.in: Setup.in.raw
 	    -e 's%@INCLUDES@%$(filter -I%, $(CPPFLAGS))%g' \
 	    $< > $@
 
-install: all
+install: all installdirs
 	@echo "Installing Python module"
-	@if ( $(INSTALL_DATA) pg.py $(python_moduledir) && \
-	    $(MAKE) -f Makefile install ); then : ; else \
+	@if ( $(INSTALL_DATA) pg.py $(DESTDIR)$(python_moduledir) && \
+	    $(MAKE) -f Makefile prefix=$(DESTDIR)$(prefix) install ); then :; else \
 		echo "*****" ;\
 		echo "* Skipping the installation of the Python interface module for lack"; \
 		echo "* of permissions. To install it, change to the directory"; \
@@ -44,6 +44,9 @@ install: all
 		echo "*****"; \
 	fi
 
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(python_moduledir)
+
 uninstall:
 	@echo "*****"; \
 	 echo "* Unfortunately, the Python interface module cannot be uninstalled"; \