Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit ff68e90

Browse files
committed
Restore linking libpq into pg_ctl on Mingw builds.
Commit 1ae8536 missed this. Per Andrew Dunstan.
1 parent 6deb52b commit ff68e90

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/bin/pg_ctl/Makefile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,20 @@ subdir = src/bin/pg_ctl
1616
top_builddir = ../../..
1717
include $(top_builddir)/src/Makefile.global
1818

19+
# On Windows, we need to link with libpq, just for use of pqexpbuffer;
20+
# but let's not pull that in on platforms where we don't need it.
21+
ifeq ($(PORTNAME), win32)
22+
override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
23+
SUBMAKE_LIBPQ := submake-libpq
24+
LIBPQ_PGPORT := $(libpq_pgport)
25+
endif
26+
1927
OBJS= pg_ctl.o $(WIN32RES)
2028

2129
all: pg_ctl
2230

23-
pg_ctl: $(OBJS) | submake-libpgport
24-
$(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
31+
pg_ctl: $(OBJS) | submake-libpgport $(SUBMAKE_LIBPQ)
32+
$(CC) $(CFLAGS) $(OBJS) $(LIBPQ_PGPORT) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
2533

2634
install: all installdirs
2735
$(INSTALL_PROGRAM) pg_ctl$(X) '$(DESTDIR)$(bindir)/pg_ctl$(X)'

0 commit comments

Comments
 (0)