3434#
3535#
3636# IDENTIFICATION
37- # $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.37 1999/02/23 07:24:02 thomas Exp $
37+ # $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.38 1999/03/07 23:05:56 tgl Exp $
3838#
3939# -------------------------------------------------------------------------
4040
@@ -143,8 +143,10 @@ endif
143143# Installation.
144144#
145145# Install the backend program (postgres) to the binary directory and
146- # make a link as "postmaster". Install the bki files templates and sample
147- # files to the library directory.
146+ # make a link as "postmaster". Install the bki files, templates, and sample
147+ # files to the library directory. Install exported headers to the include
148+ # directory (these headers are the minimal ones needed to build loadable
149+ # backend extensions).
148150#
149151# (History: Before Release 2, make install generated a bki.source file
150152# and then used build parameters to convert it to a bki file, then installed
@@ -154,23 +156,29 @@ endif
154156# and (2) the parameters of a database system should be set at initdb time,
155157# not at postgres build time.
156158
157- install : $(LIBDIR ) $(BINDIR ) $(HEADERDIR ) postgres $(POSTGRES_IMP ) fmgr.h \
158- global1.bki.source local1_template1.bki.source \
159- global1.description local1_template1.description \
160- libpq/pg_hba.conf.sample optimizer/geqo/pg_geqo.sample
159+ .PHONY : install install-bin install-lib install-headers
160+
161+ install : $(LIBDIR ) $(BINDIR ) $(HEADERDIR ) postgres $(POSTGRES_IMP ) \
162+ install-bin install-lib install-headers
163+
164+ install-bin : $(BINDIR ) postgres$(X ) $(POSTGRES_IMP )
161165 $(INSTALL ) $(INSTL_EXE_OPTS ) postgres$(X ) $(BINDIR ) /postgres$(X )
166+ @rm -f $(BINDIR ) /postmaster
167+ ln -s postgres$(X ) $(BINDIR ) /postmaster
162168ifeq ($(MAKE_EXPORTS ) , true)
163169 $(INSTALL) $(INSTLOPTS) $(POSTGRES_IMP) $(LIBDIR)/$(POSTGRES_IMP)
164170endif
165- @rm -f $(BINDIR)/postmaster
166- ln -s postgres$(X) $(BINDIR)/postmaster
167171ifeq ($(PORTNAME ) , win)
168172ifeq ($(MAKE_DLL ) , true)
169173# $(INSTALL) $(INSTLOPTS) postgres.dll $(BINDIR)/postgres.dll
170174 $(INSTALL) $(INSTLOPTS) libpostgres.a $(LIBDIR)/libpostgres.a
171175endif
172176endif
173- $(INSTALL) $(INSTLOPTS) fmgr.h $(HEADERDIR)/fmgr.h
177+
178+ install-lib : $(LIBDIR ) \
179+ global1.bki.source local1_template1.bki.source \
180+ global1.description local1_template1.description \
181+ libpq/pg_hba.conf.sample optimizer/geqo/pg_geqo.sample
174182 $(INSTALL) $(INSTLOPTS) global1.bki.source \
175183 $(LIBDIR)/global1.bki.source
176184 $(INSTALL) $(INSTLOPTS) global1.description \
@@ -184,8 +192,62 @@ endif
184192 $(INSTALL) $(INSTLOPTS) optimizer/geqo/pg_geqo.sample \
185193 $(LIBDIR)/pg_geqo.sample
186194
187- # $(BINDIR) $(LIBDIR) $(HEADERDIR):
188- # mkdir $@
195+ install-headers : fmgr.h $(SRCDIR ) /include/config.h
196+ @if [ ! -d $( HEADERDIR) ]; then mkdir $(HEADERDIR ) ; fi
197+ @if [ ! -d $( HEADERDIR) /port ]; then mkdir $(HEADERDIR ) /port; fi
198+ @if [ ! -d $( HEADERDIR) /port/$( PORTNAME) ]; \
199+ then mkdir $(HEADERDIR ) /port/$(PORTNAME ) ; fi
200+ @if [ ! -d $( HEADERDIR) /lib ]; \
201+ then mkdir $(HEADERDIR ) /lib; fi
202+ @if [ ! -d $( HEADERDIR) /libpq ]; \
203+ then mkdir $(HEADERDIR ) /libpq; fi
204+ @if [ ! -d $( HEADERDIR) /utils ]; \
205+ then mkdir $(HEADERDIR ) /utils; fi
206+ @if [ ! -d $( HEADERDIR) /access ]; \
207+ then mkdir $(HEADERDIR ) /access; fi
208+ @if [ ! -d $( HEADERDIR) /executor ]; \
209+ then mkdir $(HEADERDIR ) /executor; fi
210+ @if [ ! -d $( HEADERDIR) /commands ]; \
211+ then mkdir $(HEADERDIR ) /commands; fi
212+ $(INSTALL ) $(INSTLOPTS ) fmgr.h \
213+ $(HEADERDIR)/fmgr.h
214+ $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/os.h \
215+ $(HEADERDIR)/os.h
216+ $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/config.h \
217+ $(HEADERDIR)/config.h
218+ $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/c.h \
219+ $(HEADERDIR)/c.h
220+ $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/postgres.h \
221+ $(HEADERDIR)/postgres.h
222+ $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/postgres_ext.h \
223+ $(HEADERDIR)/postgres_ext.h
224+ $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/libpq/pqcomm.h \
225+ $(HEADERDIR)/libpq/pqcomm.h
226+ $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/libpq/libpq-fs.h \
227+ $(HEADERDIR)/libpq/libpq-fs.h
228+ $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/lib/dllist.h \
229+ $(HEADERDIR)/lib/dllist.h
230+ $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/utils/geo_decls.h \
231+ $(HEADERDIR)/utils/geo_decls.h
232+ $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/utils/elog.h \
233+ $(HEADERDIR)/utils/elog.h
234+ $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/utils/palloc.h \
235+ $(HEADERDIR)/utils/palloc.h
236+ $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/utils/mcxt.h \
237+ $(HEADERDIR)/utils/mcxt.h
238+ $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/access/attnum.h \
239+ $(HEADERDIR)/access/attnum.h
240+ $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/executor/spi.h \
241+ $(HEADERDIR)/executor/spi.h
242+ $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/commands/trigger.h \
243+ $(HEADERDIR)/commands/trigger.h
244+ ifeq ($(PORTNAME ) , hpux)
245+ # is this still necessary?
246+ $(INSTALL) $(INSTLOPTS) $(SRCDIR)/backend/port/hpux/fixade.h \
247+ $(HEADERDIR)/port/hpux/fixade.h
248+ endif
249+
250+
189251$(BINDIR ) :
190252 mkdir $@
191253$(LIBDIR ) :
0 commit comments