Skip to content

Commit 59d64e7

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 798243a commit 59d64e7

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
@@ -112,16 +112,25 @@ install: all installdirs install-lib
112112
$(INSTALL_DATA) $(srcdir)/libpq-int.h '$(DESTDIR)$(includedir_internal)'
113113
$(INSTALL_DATA) $(srcdir)/pqexpbuffer.h '$(DESTDIR)$(includedir_internal)'
114114
$(INSTALL_DATA) $(srcdir)/pg_service.conf.sample '$(DESTDIR)$(datadir)/pg_service.conf.sample'
115+
ifneq (,$findstring($(PORTNAME), win32 cygwin))
116+
$(INSTALL_DATA) $(shlib) '$(DESTDIR)$(bindir)/$(shlib)'
117+
endif
115118

116119
installdirs: installdirs-lib
117120
$(MKDIR_P) '$(DESTDIR)$(includedir)' '$(DESTDIR)$(includedir_internal)'
121+
ifneq (,$findstring($(PORTNAME), win32 cygwin))
122+
$(MKDIR_P) '$(DESTDIR)$(bindir)'
123+
endif
118124

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

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