aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2014-02-01 15:16:29 -0500
committerAndrew Dunstan <andrew@dunslane.net>2014-02-01 15:16:29 -0500
commitdfb4a1a21cb71f22ca49c4870cc7cfdc2d55f17b (patch)
tree2f10a4d3dcd3d13f2d49e8ff9b884a3e0475953f
parent8e6bfc9ebfd0e2cbc9a03b6bcbac0e878e94e880 (diff)
downloadpostgresql-dfb4a1a21cb71f22ca49c4870cc7cfdc2d55f17b.tar.gz
postgresql-dfb4a1a21cb71f22ca49c4870cc7cfdc2d55f17b.zip
Copy the libpq DLL to the bin directory on Mingw and Cygwin.
This has long been done by the MSVC build system, and has caused confusion in the past when programs like psql have failed to start because they can't find the DLL. If it's in the same directory as it now will be they will find it. Backpatch to all live branches.
-rw-r--r--src/interfaces/libpq/Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/interfaces/libpq/Makefile b/src/interfaces/libpq/Makefile
index c0c0eb41ff9..5640d8b1a9d 100644
--- a/src/interfaces/libpq/Makefile
+++ b/src/interfaces/libpq/Makefile
@@ -120,9 +120,15 @@ install: all installdirs install-lib
$(INSTALL_DATA) $(srcdir)/libpq-int.h '$(DESTDIR)$(includedir_internal)'
$(INSTALL_DATA) $(srcdir)/pqexpbuffer.h '$(DESTDIR)$(includedir_internal)'
$(INSTALL_DATA) $(srcdir)/pg_service.conf.sample '$(DESTDIR)$(datadir)/pg_service.conf.sample'
+ifneq (,$findstring($(PORTNAME), win32 cygwin))
+ $(INSTALL_DATA) $(shlib) '$(DESTDIR)$(bindir)/$(shlib)'
+endif
installdirs: installdirs-lib
$(MKDIR_P) '$(DESTDIR)$(includedir)' '$(DESTDIR)$(includedir_internal)'
+ifneq (,$findstring($(PORTNAME), win32 cygwin))
+ $(MKDIR_P) '$(DESTDIR)$(bindir)'
+endif
uninstall: uninstall-lib
rm -f '$(DESTDIR)$(includedir)/libpq-fe.h'
@@ -130,6 +136,9 @@ uninstall: uninstall-lib
rm -f '$(DESTDIR)$(includedir_internal)/libpq-int.h'
rm -f '$(DESTDIR)$(includedir_internal)/pqexpbuffer.h'
rm -f '$(DESTDIR)$(datadir)/pg_service.conf.sample'
+ifneq (,$findstring($(PORTNAME), win32 cygwin))
+ rm -f '$(DESTDIR)$(bindir)/$(shlib)'
+endif
clean distclean: clean-lib
rm -f $(OBJS) pthread.h libpq.rc