34
34
#
35
35
#
36
36
# IDENTIFICATION
37
- # $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.16 1996/11/18 02:23:41 bryanh Exp $
37
+ # $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.17 1996/11/23 09:51:57 bryanh Exp $
38
38
#
39
39
# -------------------------------------------------------------------------
40
40
@@ -53,7 +53,13 @@ ifdef TIOGA
53
53
OBJS += tioga/SUBSYS.o
54
54
endif
55
55
56
- all : postgres global1.bki.source local1_template1.bki.source
56
+ ifeq ($(MAKE_EXPORTS ) , true)
57
+ EXP = postgres$(EXPSUFF )
58
+ else
59
+ EXP =
60
+ endif
61
+
62
+ all : postgres $(EXP ) global1.bki.source local1_template1.bki.source
57
63
58
64
postgres : postgres_group1 postgres_group2 postgres_group3 postgres_group4
59
65
$(CC ) $(LDFLAGS ) -o postgres $(OBJS ) $(LDADD )
@@ -89,6 +95,11 @@ global1.bki.source local1_template1.bki.source:
89
95
$(MAKE ) -C catalog $@
90
96
cp catalog/$@ .
91
97
98
+ # The postgres.o target is needed by the rule in Makefile.global that
99
+ # creates the exports file when MAKE_EXPORTS = true.
100
+ postgres.o : $(OBJS )
101
+ $(CC ) $(LDFLAGS ) -r -o postgres.o $(OBJS ) $(LDADD )
102
+
92
103
93
104
# ###########################################################################
94
105
# The following targets are specified in make commands that appear in the
@@ -168,25 +179,25 @@ endif
168
179
# and (2) the parameters of a database system should be set at initdb time,
169
180
# not at postgres build time.
170
181
171
- D_LIBDIR = $(DESTDIR )$(LIBDIR )
172
- D_BINDIR = $(DESTDIR )$(BINDIR )
173
-
174
- install : $(D_LIBDIR ) $(D_BINDIR ) $(HEADERDIR ) postgres fmgr.h\
182
+ install : $(LIBDIR ) $(BINDIR ) $(HEADERDIR ) postgres $(EXP ) fmgr.h\
175
183
global1.bki.source local1_template1.bki.source \
176
- libpq/pg_hba.conf.sample
184
+ libpq/pg_hba.conf.sample
177
185
178
- $(INSTALL) $(INSTL_EXE_OPTS) postgres $(D_BINDIR)/postgres
179
- @rm -f $(D_BINDIR)/postmaster
180
- cd $(D_BINDIR); ln -s postgres postmaster
186
+ $(INSTALL) $(INSTL_EXE_OPTS) postgres $(BINDIR)/postgres
187
+ ifeq ($(MAKE_EXPORTS ) , true)
188
+ $(INSTALL) $(INSTLOPTS) postgres$(EXPSUFF) $(LIBDIR)/postgres$(EXPSUFF)
189
+ endif
190
+ @rm -f $(BINDIR)/postmaster
191
+ cd $(BINDIR); ln -s postgres postmaster
181
192
$(INSTALL) $(INSTLOPTS) fmgr.h $(HEADERDIR)/fmgr.h
182
193
$(INSTALL) $(INSTLOPTS) global1.bki.source \
183
- $(D_LIBDIR )/global1.bki.source
194
+ $(LIBDIR )/global1.bki.source
184
195
$(INSTALL) $(INSTLOPTS) local1_template1.bki.source \
185
- $(D_LIBDIR )/local1_template1.bki.source
196
+ $(LIBDIR )/local1_template1.bki.source
186
197
$(INSTALL) $(INSTLOPTS) libpq/pg_hba.conf.sample \
187
- $(D_LIBDIR )/pg_hba.conf.sample
198
+ $(LIBDIR )/pg_hba.conf.sample
188
199
189
- $(D_BINDIR ) $(D_LIBDIR ) $(HEADERDIR ) :
200
+ $(BINDIR ) $(LIBDIR ) $(HEADERDIR ) :
190
201
mkdir $@
191
202
192
203
# ############################################################################
0 commit comments