aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2014-02-01 15:16:52 -0500
committerAndrew Dunstan <andrew@dunslane.net>2014-02-01 15:16:52 -0500
commitae3c98b9b10659e9d9c1dfb375624b0e6a299b30 (patch)
tree68339f8c2829ce0a7b07458c3c321b225c44d167 /src
parent458b20f2da8482bbe8a53604365f38b7e8a606e9 (diff)
downloadpostgresql-ae3c98b9b10659e9d9c1dfb375624b0e6a299b30.tar.gz
postgresql-ae3c98b9b10659e9d9c1dfb375624b0e6a299b30.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.
Diffstat (limited to 'src')
-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 6c9f6920918..230e825c471 100644
--- a/src/interfaces/libpq/Makefile
+++ b/src/interfaces/libpq/Makefile
@@ -111,9 +111,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
$(mkinstalldirs) '$(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'
@@ -121,6 +127,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) pg_config_paths.h crypt.c getaddrinfo.c inet_aton.c noblock.c open.c pgstrcasecmp.c snprintf.c strerror.c strlcpy.c thread.c md5.c ip.c encnames.c wchar.c win32error.c pgsleep.c pthread.h libpq.rc