@@ -24,27 +24,27 @@ ifneq ($(PORTNAME), win32)
24
24
override CFLAGS +=$(PTHREAD_CFLAGS )
25
25
endif
26
26
27
- # Need to recompile anylibpgport object files because we need these
28
- # object files to use the same compile flags as libpq; some
29
- # platforms require special flags for all libpq object files .
27
+ # Need to recompile anyexternal C files because we need
28
+ # all object files to use the same compile flags as libpq; some
29
+ # platforms require special flags.
30
30
LIBS :=$(LIBS:-lpgport= )
31
31
32
- # external object files that are always used by libpq
33
- BACKEND_LIBPQ = md5 ip
34
- UTILS_MB = encnames wchar
35
- PERM_PGPORT = inet_net_ntop noblock pgstrcasecmp thread
32
+ # libpgport C files that are always used by libpq
33
+ PGPORT = inet_net_ntop noblock pgstrcasecmp thread
36
34
ifeq ($(PORTNAME ) , win32)
37
- PERM_PGPORT += pgsleep
35
+ PGPORT += pgsleep
38
36
endif
37
+ # libpgport C files are used by libpq if identified by configure
38
+ PGPORT +=$(basename $(filter $(addsuffix .o, crypt getaddrinfo inet_aton open snprintf strerror strlcpy win32error) ,$(LIBOBJS ) ) )
39
39
40
-
41
- # pgport object files are used by libpq if identified by configure
42
- OPT_PGPORT =$( basename $( filter $( addsuffix .o, crypt getaddrinfo inet_aton open snprintf strerror strlcpy win32error) , $( LIBOBJS ) ) )
40
+ # other external C files
41
+ BACKEND_LIBPQ = md5 ip
42
+ UTILS_MB =encnames wchar
43
43
44
44
OBJS =fe-auth.o fe-connect.o fe-exec.o fe-misc.o fe-print.o fe-lobj.o\
45
45
fe-protocol2.o fe-protocol3.o pqexpbuffer.o pqsignal.o fe-secure.o\
46
46
libpq-events.o\
47
- $(addsuffix .o,$(PERM_PGPORT ) $( OPT_PGPORT )$(BACKEND_LIBPQ ) $(UTILS_MB ) )
47
+ $(addsuffix .o,$(PGPORT ) $(BACKEND_LIBPQ ) $(UTILS_MB ) )
48
48
49
49
ifeq ($(PORTNAME ) , cygwin)
50
50
override shlib = cyg$(NAME )$(DLSUFFIX )
@@ -88,7 +88,7 @@ backend_src = $(top_srcdir)/src/backend
88
88
# necessarily use the same object files as the backend uses. Instead,
89
89
# we symlink the source files in here and build our own object files.
90
90
91
- $(addsuffix .c,$(PERM_PGPORT ) $( OPT_PGPORT ) ) :% :$(top_srcdir ) /src/port/%
91
+ $(addsuffix .c,$(PGPORT ) ) :% :$(top_srcdir ) /src/port/%
92
92
rm -f$@ && $(LN_S ) $< .
93
93
94
94
$(addsuffix .c,$(BACKEND_LIBPQ ) ) :% :$(backend_src ) /libpq/%
@@ -131,7 +131,7 @@ uninstall: uninstall-lib
131
131
rm -f' $(DESTDIR)$(datadir)/pg_service.conf.sample'
132
132
133
133
clean distclean : clean-lib
134
- rm -f$(OBJS ) pg_config_paths.h pthread.h libpq.rc$(addsuffix .c,$(BACKEND_LIBPQ ) $(UTILS_MB ) $(PERM_PGPORT ) $( OPT_PGPORT ) )
134
+ rm -f$(OBJS ) pg_config_paths.h pthread.h libpq.rc$(addsuffix .c,$(PGPORT ) $(BACKEND_LIBPQ ) $(UTILS_MB ) )
135
135
# Might be left over from a Win32 client-only build
136
136
rm -f pg_config_paths.h
137
137