Commit a9b02ec6 authored by Bruce Momjian's avatar Bruce Momjian

In libpq/Makefile, merge PERM_PGPORT and OPT_PGPORT into a single

Makefile variable PGPORT, for clarity.
parent 5f4b3d75
...@@ -24,27 +24,27 @@ ifneq ($(PORTNAME), win32) ...@@ -24,27 +24,27 @@ ifneq ($(PORTNAME), win32)
override CFLAGS += $(PTHREAD_CFLAGS) override CFLAGS += $(PTHREAD_CFLAGS)
endif endif
# Need to recompile any libpgport object files because we need these # Need to recompile any external C files because we need
# object files to use the same compile flags as libpq; some # all object files to use the same compile flags as libpq; some
# platforms require special flags for all libpq object files. # platforms require special flags.
LIBS := $(LIBS:-lpgport=) LIBS := $(LIBS:-lpgport=)
# external object files that are always used by libpq # libpgport C files that are always used by libpq
BACKEND_LIBPQ = md5 ip PGPORT = inet_net_ntop noblock pgstrcasecmp thread
UTILS_MB = encnames wchar
PERM_PGPORT = inet_net_ntop noblock pgstrcasecmp thread
ifeq ($(PORTNAME), win32) ifeq ($(PORTNAME), win32)
PERM_PGPORT += pgsleep PGPORT += pgsleep
endif endif
# libpgport C files are used by libpq if identified by configure
PGPORT += $(basename $(filter $(addsuffix .o, crypt getaddrinfo inet_aton open snprintf strerror strlcpy win32error), $(LIBOBJS)))
# other external C files
# pgport object files are used by libpq if identified by configure BACKEND_LIBPQ = md5 ip
OPT_PGPORT = $(basename $(filter $(addsuffix .o, crypt getaddrinfo inet_aton open snprintf strerror strlcpy win32error), $(LIBOBJS))) UTILS_MB = encnames wchar
OBJS= fe-auth.o fe-connect.o fe-exec.o fe-misc.o fe-print.o fe-lobj.o \ OBJS= fe-auth.o fe-connect.o fe-exec.o fe-misc.o fe-print.o fe-lobj.o \
fe-protocol2.o fe-protocol3.o pqexpbuffer.o pqsignal.o fe-secure.o \ fe-protocol2.o fe-protocol3.o pqexpbuffer.o pqsignal.o fe-secure.o \
libpq-events.o \ libpq-events.o \
$(addsuffix .o, $(PERM_PGPORT) $(OPT_PGPORT) $(BACKEND_LIBPQ) $(UTILS_MB)) $(addsuffix .o, $(PGPORT) $(BACKEND_LIBPQ) $(UTILS_MB))
ifeq ($(PORTNAME), cygwin) ifeq ($(PORTNAME), cygwin)
override shlib = cyg$(NAME)$(DLSUFFIX) override shlib = cyg$(NAME)$(DLSUFFIX)
...@@ -88,7 +88,7 @@ backend_src = $(top_srcdir)/src/backend ...@@ -88,7 +88,7 @@ backend_src = $(top_srcdir)/src/backend
# necessarily use the same object files as the backend uses. Instead, # necessarily use the same object files as the backend uses. Instead,
# we symlink the source files in here and build our own object files. # we symlink the source files in here and build our own object files.
$(addsuffix .c, $(PERM_PGPORT) $(OPT_PGPORT)): % : $(top_srcdir)/src/port/% $(addsuffix .c, $(PGPORT)): % : $(top_srcdir)/src/port/%
rm -f $@ && $(LN_S) $< . rm -f $@ && $(LN_S) $< .
$(addsuffix .c, $(BACKEND_LIBPQ)): % : $(backend_src)/libpq/% $(addsuffix .c, $(BACKEND_LIBPQ)): % : $(backend_src)/libpq/%
...@@ -131,7 +131,7 @@ uninstall: uninstall-lib ...@@ -131,7 +131,7 @@ uninstall: uninstall-lib
rm -f '$(DESTDIR)$(datadir)/pg_service.conf.sample' rm -f '$(DESTDIR)$(datadir)/pg_service.conf.sample'
clean distclean: clean-lib clean distclean: clean-lib
rm -f $(OBJS) pg_config_paths.h pthread.h libpq.rc $(addsuffix .c, $(BACKEND_LIBPQ) $(UTILS_MB) $(PERM_PGPORT) $(OPT_PGPORT)) rm -f $(OBJS) pg_config_paths.h pthread.h libpq.rc $(addsuffix .c, $(PGPORT) $(BACKEND_LIBPQ) $(UTILS_MB))
# Might be left over from a Win32 client-only build # Might be left over from a Win32 client-only build
rm -f pg_config_paths.h rm -f pg_config_paths.h
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment