Skip to content

Commit ae3c98b

Browse files
committed
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.
1 parent 458b20f commit ae3c98b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/interfaces/libpq/Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,16 +111,25 @@ install: all installdirs install-lib
111111
$(INSTALL_DATA) $(srcdir)/libpq-int.h '$(DESTDIR)$(includedir_internal)'
112112
$(INSTALL_DATA) $(srcdir)/pqexpbuffer.h '$(DESTDIR)$(includedir_internal)'
113113
$(INSTALL_DATA) $(srcdir)/pg_service.conf.sample '$(DESTDIR)$(datadir)/pg_service.conf.sample'
114+
ifneq (,$findstring($(PORTNAME), win32 cygwin))
115+
$(INSTALL_DATA) $(shlib) '$(DESTDIR)$(bindir)/$(shlib)'
116+
endif
114117

115118
installdirs: installdirs-lib
116119
$(mkinstalldirs) '$(DESTDIR)$(includedir)' '$(DESTDIR)$(includedir_internal)'
120+
ifneq (,$findstring($(PORTNAME), win32 cygwin))
121+
$(MKDIR_P) '$(DESTDIR)$(bindir)'
122+
endif
117123

118124
uninstall: uninstall-lib
119125
rm -f '$(DESTDIR)$(includedir)/libpq-fe.h'
120126
rm -f '$(DESTDIR)$(includedir)/libpq-events.h'
121127
rm -f '$(DESTDIR)$(includedir_internal)/libpq-int.h'
122128
rm -f '$(DESTDIR)$(includedir_internal)/pqexpbuffer.h'
123129
rm -f '$(DESTDIR)$(datadir)/pg_service.conf.sample'
130+
ifneq (,$findstring($(PORTNAME), win32 cygwin))
131+
rm -f '$(DESTDIR)$(bindir)/$(shlib)'
132+
endif
124133

125134
clean distclean: clean-lib
126135
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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy