]> granicus.if.org Git - postgresql/commitdiff
Copy the libpq DLL to the bin directory on Mingw and Cygwin.
authorAndrew Dunstan <andrew@dunslane.net>
Sat, 1 Feb 2014 20:16:40 +0000 (15:16 -0500)
committerAndrew Dunstan <andrew@dunslane.net>
Sat, 1 Feb 2014 20:16:40 +0000 (15:16 -0500)
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.

src/interfaces/libpq/Makefile

index 0f331f9d2e4c84180b3f8bdeff0ae1bb8bbfcfdd..921adf47e82e7e5c01b997d759e0a630650beb75 100644 (file)
@@ -112,9 +112,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'
@@ -122,6 +128,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