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

Commit a7f8ae3

Browse files
committed
Put libpgport into OBJS instead of LIBS, so that it gets included
into .def and .exp files automatically on Windows, AIX, and the like. An additional benefit is that changes in libpgport files correctly propagate to force rebuild of the backend executable. This is my reworking of Rocco Altier's idea, and if it breaks anything it's definitely my fault.
1 parent 06e1d62 commit a7f8ae3

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/backend/Makefile

+10-8
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Copyright (c) 1994, Regents of the University of California
66
#
7-
# $PostgreSQL: pgsql/src/backend/Makefile,v 1.108 2005/01/26 21:55:26 tgl Exp $
7+
# $PostgreSQL: pgsql/src/backend/Makefile,v 1.109 2005/07/28 04:31:30 tgl Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -17,19 +17,21 @@ DIRS := access bootstrap catalog parser commands executor lib libpq \
1717
main nodes optimizer port postmaster regex rewrite \
1818
storage tcop utils $(top_builddir)/src/timezone
1919

20-
OBJS := $(DIRS:%=%/SUBSYS.o)
20+
SUBSYSOBJS := $(DIRS:%=%/SUBSYS.o)
21+
22+
OBJS := $(SUBSYSOBJS) $(top_builddir)/src/port/libpgport_srv.a
23+
24+
# We put libpgport into OBJS, so remove it from LIBS
25+
LIBS := $(patsubst -lpgport, , $(LIBS))
2126

2227
ifeq ($(PORTNAME), qnx4)
2328
# This file crashes qnx4's wlink and is therefore not in
2429
# bootstrap/SUBSYS.o on that platform. (Wotta hack ... is it still
2530
# necessary?) [ Yes, until the Watcom compiler goes open source it's
2631
# effectively unsupported ]
27-
OBJS+= bootstrap/bootstrap.o
32+
OBJS += bootstrap/bootstrap.o
2833
endif
2934

30-
# Use server version of port library
31-
LIBS := $(patsubst -lpgport,-lpgport_srv, $(LIBS))
32-
3335
##########################################################################
3436

3537
all: submake-libpgport postgres $(POSTGRES_IMP)
@@ -69,7 +71,7 @@ postgres: $(OBJS) $(DLLINIT) postgres.def libpostgres.a $(WIN32RES)
6971
rm -f $@.exp $@.base
7072

7173
postgres.def: $(OBJS)
72-
$(DLLTOOL) --export-all --output-def $@ $^ $(top_builddir)/src/port/libpgport.a
74+
$(DLLTOOL) --export-all --output-def $@ $^
7375

7476
libpostgres.a: postgres.def
7577
$(DLLTOOL) --dllname postgres.exe --def postgres.def --output-lib $@
@@ -98,7 +100,7 @@ endif
98100
endif # aix
99101

100102
# Parallel make trickery
101-
$(OBJS): $(DIRS:%=%-recursive) ;
103+
$(SUBSYSOBJS): $(DIRS:%=%-recursive) ;
102104

103105
.PHONY: $(DIRS:%=%-recursive)
104106
# Update the commonly used headers before building the subdirectories

0 commit comments

Comments
 (0)