diff options
author | Bruce Momjian <bruce@momjian.us> | 2001-05-25 14:29:39 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2001-05-25 14:29:39 +0000 |
commit | eeca4bdb3152a847214fb65321b846bc37a67393 (patch) | |
tree | 6cb4aed221f60a45d452aee252e33425ffd856b6 /src/interfaces/python | |
parent | 74068dfed65c3a681cb2724ad320d007d3dbb662 (diff) | |
download | postgresql-eeca4bdb3152a847214fb65321b846bc37a67393.tar.gz postgresql-eeca4bdb3152a847214fb65321b846bc37a67393.zip |
The attached patch changes src/interfaces/python/GNUmakefile to use the
value of DESTDIR like the rest (or at least most) of the PostgreSQL
makefiles. I found this problem when trying to package a pre-built
Cygwin PostgreSQL distribution, but this problem is platform independent.
The problem manifests itself when one tries to install into a stagging
area (e.g., to build a tarball) instead of a real install. In this case,
pg.py and _pgmodule$(SO) still end up being installed in the configured
prefix directory ignoring the value of DESTDIR.
Unfortunately, this patch does not handle the case where PostgreSQL
and Python are configured with different prefixes. Since the Python
Makefile is automatically generated and does not use DESTDIR, I believe
that this issue will be difficult to correct. If anyone has ideas on
how to fix this issue, then I'm quite willing to rework the patch to
take the suggestion into account.
Jason Tishler
Diffstat (limited to 'src/interfaces/python')
-rw-r--r-- | src/interfaces/python/GNUmakefile | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/interfaces/python/GNUmakefile b/src/interfaces/python/GNUmakefile index e60e5e91565..7aa1cb07451 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"; \ |