aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>1999-03-07 23:05:57 +0000
committerTom Lane <tgl@sss.pgh.pa.us>1999-03-07 23:05:57 +0000
commita431aaec44020ea1359a5aa035cdbf189baecd90 (patch)
tree326a1fae50d4aafb1a235876925633d42066d491
parent86c2eadb185b1a0edcf6419957df0b0816e3c21a (diff)
downloadpostgresql-a431aaec44020ea1359a5aa035cdbf189baecd90.tar.gz
postgresql-a431aaec44020ea1359a5aa035cdbf189baecd90.zip
Export include/utils/mcxt.h so that external stuff can include
palloc.h again. Move exporting of backend header files out of libpq's Makefile (whatever was it doing there in the first place?) and into backend/Makefile.
-rw-r--r--src/backend/Makefile86
-rw-r--r--src/interfaces/libpq/Makefile.in64
2 files changed, 78 insertions, 72 deletions
diff --git a/src/backend/Makefile b/src/backend/Makefile
index 4b84b789a06..50da88e3002 100644
--- a/src/backend/Makefile
+++ b/src/backend/Makefile
@@ -34,7 +34,7 @@
#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.37 1999/02/23 07:24:02 thomas Exp $
+# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.38 1999/03/07 23:05:56 tgl Exp $
#
#-------------------------------------------------------------------------
@@ -143,8 +143,10 @@ endif
# Installation.
#
# Install the backend program (postgres) to the binary directory and
-# make a link as "postmaster". Install the bki files templates and sample
-# files to the library directory.
+# make a link as "postmaster". Install the bki files, templates, and sample
+# files to the library directory. Install exported headers to the include
+# directory (these headers are the minimal ones needed to build loadable
+# backend extensions).
#
# (History: Before Release 2, make install generated a bki.source file
# and then used build parameters to convert it to a bki file, then installed
@@ -154,23 +156,29 @@ endif
# and (2) the parameters of a database system should be set at initdb time,
# not at postgres build time.
-install: $(LIBDIR) $(BINDIR) $(HEADERDIR) postgres $(POSTGRES_IMP) fmgr.h \
- global1.bki.source local1_template1.bki.source \
- global1.description local1_template1.description \
- libpq/pg_hba.conf.sample optimizer/geqo/pg_geqo.sample
+.PHONY: install install-bin install-lib install-headers
+
+install: $(LIBDIR) $(BINDIR) $(HEADERDIR) postgres $(POSTGRES_IMP) \
+ install-bin install-lib install-headers
+
+install-bin: $(BINDIR) postgres$(X) $(POSTGRES_IMP)
$(INSTALL) $(INSTL_EXE_OPTS) postgres$(X) $(BINDIR)/postgres$(X)
+ @rm -f $(BINDIR)/postmaster
+ ln -s postgres$(X) $(BINDIR)/postmaster
ifeq ($(MAKE_EXPORTS), true)
$(INSTALL) $(INSTLOPTS) $(POSTGRES_IMP) $(LIBDIR)/$(POSTGRES_IMP)
endif
- @rm -f $(BINDIR)/postmaster
- ln -s postgres$(X) $(BINDIR)/postmaster
ifeq ($(PORTNAME), win)
ifeq ($(MAKE_DLL), true)
# $(INSTALL) $(INSTLOPTS) postgres.dll $(BINDIR)/postgres.dll
$(INSTALL) $(INSTLOPTS) libpostgres.a $(LIBDIR)/libpostgres.a
endif
endif
- $(INSTALL) $(INSTLOPTS) fmgr.h $(HEADERDIR)/fmgr.h
+
+install-lib: $(LIBDIR) \
+ global1.bki.source local1_template1.bki.source \
+ global1.description local1_template1.description \
+ libpq/pg_hba.conf.sample optimizer/geqo/pg_geqo.sample
$(INSTALL) $(INSTLOPTS) global1.bki.source \
$(LIBDIR)/global1.bki.source
$(INSTALL) $(INSTLOPTS) global1.description \
@@ -184,8 +192,62 @@ endif
$(INSTALL) $(INSTLOPTS) optimizer/geqo/pg_geqo.sample \
$(LIBDIR)/pg_geqo.sample
-#$(BINDIR) $(LIBDIR) $(HEADERDIR):
-# mkdir $@
+install-headers: fmgr.h $(SRCDIR)/include/config.h
+ @if [ ! -d $(HEADERDIR) ]; then mkdir $(HEADERDIR); fi
+ @if [ ! -d $(HEADERDIR)/port ]; then mkdir $(HEADERDIR)/port; fi
+ @if [ ! -d $(HEADERDIR)/port/$(PORTNAME) ]; \
+ then mkdir $(HEADERDIR)/port/$(PORTNAME); fi
+ @if [ ! -d $(HEADERDIR)/lib ]; \
+ then mkdir $(HEADERDIR)/lib; fi
+ @if [ ! -d $(HEADERDIR)/libpq ]; \
+ then mkdir $(HEADERDIR)/libpq; fi
+ @if [ ! -d $(HEADERDIR)/utils ]; \
+ then mkdir $(HEADERDIR)/utils; fi
+ @if [ ! -d $(HEADERDIR)/access ]; \
+ then mkdir $(HEADERDIR)/access; fi
+ @if [ ! -d $(HEADERDIR)/executor ]; \
+ then mkdir $(HEADERDIR)/executor; fi
+ @if [ ! -d $(HEADERDIR)/commands ]; \
+ then mkdir $(HEADERDIR)/commands; fi
+ $(INSTALL) $(INSTLOPTS) fmgr.h \
+ $(HEADERDIR)/fmgr.h
+ $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/os.h \
+ $(HEADERDIR)/os.h
+ $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/config.h \
+ $(HEADERDIR)/config.h
+ $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/c.h \
+ $(HEADERDIR)/c.h
+ $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/postgres.h \
+ $(HEADERDIR)/postgres.h
+ $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/postgres_ext.h \
+ $(HEADERDIR)/postgres_ext.h
+ $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/libpq/pqcomm.h \
+ $(HEADERDIR)/libpq/pqcomm.h
+ $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/libpq/libpq-fs.h \
+ $(HEADERDIR)/libpq/libpq-fs.h
+ $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/lib/dllist.h \
+ $(HEADERDIR)/lib/dllist.h
+ $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/utils/geo_decls.h \
+ $(HEADERDIR)/utils/geo_decls.h
+ $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/utils/elog.h \
+ $(HEADERDIR)/utils/elog.h
+ $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/utils/palloc.h \
+ $(HEADERDIR)/utils/palloc.h
+ $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/utils/mcxt.h \
+ $(HEADERDIR)/utils/mcxt.h
+ $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/access/attnum.h \
+ $(HEADERDIR)/access/attnum.h
+ $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/executor/spi.h \
+ $(HEADERDIR)/executor/spi.h
+ $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/commands/trigger.h \
+ $(HEADERDIR)/commands/trigger.h
+ifeq ($(PORTNAME), hpux)
+# is this still necessary?
+ $(INSTALL) $(INSTLOPTS) $(SRCDIR)/backend/port/hpux/fixade.h \
+ $(HEADERDIR)/port/hpux/fixade.h
+endif
+
+
$(BINDIR):
mkdir $@
$(LIBDIR):
diff --git a/src/interfaces/libpq/Makefile.in b/src/interfaces/libpq/Makefile.in
index 76437d5f598..8b07a9396a7 100644
--- a/src/interfaces/libpq/Makefile.in
+++ b/src/interfaces/libpq/Makefile.in
@@ -6,7 +6,7 @@
# Copyright (c) 1994, Regents of the University of California
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.44 1999/02/07 22:10:46 tgl Exp $
+# $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.45 1999/03/07 23:05:57 tgl Exp $
#
#-------------------------------------------------------------------------
@@ -72,70 +72,14 @@ $(SRCDIR)/backend/fmgr.h:
$(MAKE) -C $(SRCDIR)/backend fmgr.h
-.PHONY: install beforeinstall-headers install-headers
+.PHONY: install install-headers
install: install-headers install-lib $(install-shlib-dep)
-# Many of the headers we install below have nothing to do with libpq,
-# so should be installed by someone else.
-#
-install-headers: beforeinstall-headers $(SRCDIR)/include/c.h \
- $(SRCDIR)/include/postgres.h $(SRCDIR)/include/postgres_ext.h \
- $(SRCDIR)/include/config.h $(SRCDIR)/include/libpq/pqcomm.h \
- $(SRCDIR)/include/libpq/libpq-fs.h $(SRCDIR)/include/lib/dllist.h \
- $(SRCDIR)/include/utils/geo_decls.h libpq-fe.h libpq-int.h
- $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/os.h \
- $(HEADERDIR)/os.h
- $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/config.h \
- $(HEADERDIR)/config.h
- $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/c.h \
- $(HEADERDIR)/c.h
- $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/postgres.h \
- $(HEADERDIR)/postgres.h
- $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/postgres_ext.h \
- $(HEADERDIR)/postgres_ext.h
- $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/libpq/pqcomm.h \
- $(HEADERDIR)/libpq/pqcomm.h
- $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/libpq/libpq-fs.h \
- $(HEADERDIR)/libpq/libpq-fs.h
- $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/lib/dllist.h \
- $(HEADERDIR)/lib/dllist.h
- $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/utils/geo_decls.h \
- $(HEADERDIR)/utils/geo_decls.h
- $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/utils/elog.h \
- $(HEADERDIR)/utils/elog.h
- $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/utils/palloc.h \
- $(HEADERDIR)/utils/palloc.h
- $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/access/attnum.h \
- $(HEADERDIR)/access/attnum.h
- $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/executor/spi.h \
- $(HEADERDIR)/executor/spi.h
- $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/commands/trigger.h \
- $(HEADERDIR)/commands/trigger.h
+install-headers: libpq-fe.h libpq-int.h
+ @if [ ! -d $(HEADERDIR) ]; then mkdir $(HEADERDIR); fi
$(INSTALL) $(INSTLOPTS) libpq-fe.h $(HEADERDIR)/libpq-fe.h
$(INSTALL) $(INSTLOPTS) libpq-int.h $(HEADERDIR)/libpq-int.h
-ifeq ($(PORTNAME), hpux)
- $(INSTALL) $(INSTLOPTS) $(SRCDIR)/backend/port/hpux/fixade.h \
- $(HEADERDIR)/port/hpux/fixade.h
-endif
-
-beforeinstall-headers:
- @if [ ! -d $(HEADERDIR) ]; then mkdir $(HEADERDIR); fi
- @if [ ! -d $(HEADERDIR)/port ]; then mkdir $(HEADERDIR)/port; fi
- @if [ ! -d $(HEADERDIR)/port/$(PORTNAME) ]; \
- then mkdir $(HEADERDIR)/port/$(PORTNAME); fi
- @if [ ! -d $(HEADERDIR)/lib ]; \
- then mkdir $(HEADERDIR)/lib; fi
- @if [ ! -d $(HEADERDIR)/libpq ]; \
- then mkdir $(HEADERDIR)/libpq; fi
- @if [ ! -d $(HEADERDIR)/utils ]; \
- then mkdir $(HEADERDIR)/utils; fi
- @if [ ! -d $(HEADERDIR)/access ]; \
- then mkdir $(HEADERDIR)/access; fi
- @if [ ! -d $(HEADERDIR)/executor ]; \
- then mkdir $(HEADERDIR)/executor; fi
- @if [ ! -d $(HEADERDIR)/commands ]; \
- then mkdir $(HEADERDIR)/commands; fi
.PHONY: clean