File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -16,12 +16,20 @@ subdir = src/bin/pg_ctl
1616top_builddir = ../../..
1717include $(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+
1927OBJS = pg_ctl.o $(WIN32RES )
2028
2129all : 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
2634install : all installdirs
2735 $(INSTALL_PROGRAM ) pg_ctl$(X ) ' $(DESTDIR)$(bindir)/pg_ctl$(X)'
You can’t perform that action at this time.
0 commit comments