head	1.31;
access;
symbols
	REL9_0_0:1.31
	REL9_1_ALPHA1:1.31
	REL9_0_RC1:1.31
	REL9_0_BETA4:1.31
	REL9_0_STABLE:1.31.0.6
	REL9_0_BETA3:1.31
	REL9_0_BETA2:1.31
	REL7_4_29:1.10.8.1
	REL8_0_25:1.19
	REL8_1_21:1.20
	REL8_2_17:1.21.2.1
	REL8_3_11:1.23.2.1
	REL8_4_4:1.26.2.2
	REL9_0_BETA1:1.31
	REL9_0_ALPHA5_BRANCH:1.31.0.4
	REL9_0_ALPHA5:1.31
	REL7_4_28:1.10.8.1
	REL8_0_24:1.19
	REL8_1_20:1.20
	REL8_2_16:1.21.2.1
	REL8_3_10:1.23.2.1
	REL8_4_3:1.26.2.2
	REL9_0_ALPHA4:1.31
	REL9_0_ALPHA4_BRANCH:1.31.0.2
	REL8_5_ALPHA3:1.29
	REL8_5_ALPHA3_BRANCH:1.29.0.4
	REL7_4_27:1.10.8.1
	REL8_0_23:1.19
	REL8_1_19:1.20
	REL8_2_15:1.21.2.1
	REL8_3_9:1.23.2.1
	REL8_4_2:1.26.2.2
	REL8_5_ALPHA2:1.29
	REL8_5_ALPHA2_BRANCH:1.29.0.2
	REL7_4_26:1.10.8.1
	REL8_0_22:1.19
	REL8_1_18:1.20
	REL8_2_14:1.21.2.1
	REL8_3_8:1.23.2.1
	REL8_4_1:1.26.2.2
	REL8_5_ALPHA1:1.28
	REL8_5_ALPHA1_BRANCH:1.28.0.2
	REL8_4_STABLE:1.26.0.2
	REL8_4_0:1.26
	REL8_4_RC2:1.26
	REL8_4_RC1:1.26
	REL8_4_BETA2:1.26
	REL8_4_BETA1:1.26
	REL7_4_25:1.10.8.1
	REL8_0_21:1.19
	REL8_1_17:1.20
	REL8_2_13:1.21
	REL8_3_7:1.23
	REL7_4_24:1.10.8.1
	REL8_0_20:1.19
	REL8_1_16:1.20
	REL8_2_12:1.21
	REL8_3_6:1.23
	REL7_4_23:1.10.8.1
	REL8_0_19:1.19
	REL8_1_15:1.20
	REL8_2_11:1.21
	REL8_3_5:1.23
	REL7_4_22:1.10.8.1
	REL8_0_18:1.19
	REL8_1_14:1.20
	REL8_2_10:1.21
	REL8_3_4:1.23
	REL7_4_21:1.10.8.1
	REL8_0_17:1.19
	REL8_1_13:1.20
	REL8_2_9:1.21
	REL8_3_3:1.23
	REL7_4_20:1.10.8.1
	REL8_0_16:1.19
	REL8_1_12:1.20
	REL8_2_8:1.21
	REL8_3_2:1.23
	REL8_2_7:1.21
	REL8_3_1:1.23
	REL8_3_STABLE:1.23.0.2
	REL8_3_0:1.23
	REL8_3_RC2:1.23
	REL7_3_21:1.10
	REL7_4_19:1.10.8.1
	REL8_0_15:1.19
	REL8_1_11:1.20
	REL8_2_6:1.21
	REL8_3_RC1:1.23
	REL8_3_BETA4:1.23
	REL8_3_BETA3:1.23
	REL8_3_BETA2:1.23
	REL8_3_BETA1:1.22
	REL7_3_20:1.10
	REL7_4_18:1.10.8.1
	REL8_0_14:1.19
	REL8_1_10:1.20
	REL8_2_5:1.21
	REL7_3_19:1.10
	REL7_4_17:1.10.8.1
	REL8_0_13:1.19
	REL8_1_9:1.20
	REL8_2_4:1.21
	REL8_0_12:1.19
	REL8_1_8:1.20
	REL8_2_3:1.21
	REL7_3_18:1.10
	REL7_4_16:1.10.8.1
	REL8_0_11:1.19
	REL8_1_7:1.20
	REL8_2_2:1.21
	REL8_0_10:1.19
	REL8_1_6:1.20
	REL8_2_1:1.21
	REL7_4_15:1.10.8.1
	REL7_3_17:1.10
	REL8_2_STABLE:1.21.0.2
	REL8_2_0:1.21
	REL8_2_RC1:1.21
	REL8_2_BETA3:1.21
	REL8_2_BETA2:1.21
	REL8_1_5:1.20
	REL8_0_9:1.19
	REL7_4_14:1.10.8.1
	REL7_3_16:1.10
	REL8_2_BETA1:1.21
	REL7_3_15:1.10
	REL7_4_13:1.10.8.1
	REL8_0_8:1.19
	REL8_1_4:1.20
	REL7_3_14:1.10
	REL7_4_12:1.10.8.1
	REL8_0_7:1.19
	REL8_1_3:1.20
	REL7_3_13:1.10
	REL7_4_11:1.10.8.1
	REL8_0_6:1.19
	REL8_1_2:1.20
	REL7_3_12:1.10
	REL7_4_10:1.10.8.1
	REL8_0_5:1.19
	REL8_1_1:1.20
	REL8_1_STABLE:1.20.0.2
	REL8_1_0:1.20
	REL8_1_0RC1:1.20
	REL8_1_0BETA4:1.20
	REL8_1_0BETA3:1.20
	REL7_3_11:1.10
	REL7_4_9:1.10.8.1
	REL8_0_4:1.19
	REL8_1_0BETA2:1.20
	REL8_1_0BETA1:1.20
	REL7_2_8:1.10
	REL7_3_10:1.10
	REL7_4_8:1.10.8.1
	REL8_0_3:1.19
	REL8_0_2:1.19
	REL7_2_7:1.10
	REL7_3_9:1.10
	REL7_4_7:1.10.8.1
	REL8_0_1:1.19
	REL8_0_STABLE:1.19.0.4
	REL8_0_0:1.19.0.2
	REL8_0_0RC5:1.19
	REL8_0_0RC4:1.19
	REL8_0_0RC3:1.18
	REL8_0_0RC2:1.18
	REL8_0_0RC1:1.18
	REL8_0_0BETA5:1.18
	REL8_0_0BETA4:1.15
	REL7_4_6:1.10.8.1
	REL7_3_8:1.10
	REL7_2_6:1.10
	REL8_0_0BETA3:1.12
	REL8_0_0BETA2:1.12
	REL7_2_5:1.10
	REL7_4_5:1.10.8.1
	REL7_3_7:1.10
	REL7_4_4:1.10.8.1
	REL8_0_0BETA1:1.12
	REL7_4_3:1.10.8.1
	REL7_4_2:1.10.8.1
	REL7_3_6:1.10
	REL7_4_1:1.10.8.1
	REL7_3_5:1.10
	REL7_4:1.10
	REL7_4_RC2:1.10
	REL7_4_STABLE:1.10.0.8
	REL7_4_RC1:1.10
	REL7_4_BETA5:1.10
	REL7_4_BETA4:1.10
	REL7_4_BETA3:1.10
	REL7_4_BETA2:1.10
	WIN32_DEV:1.10.0.6
	REL7_4_BETA1:1.10
	REL7_3_4:1.10
	REL7_3_2:1.10
	REL7_2_4:1.10
	REL7_3_STABLE:1.10.0.4
	REL7_2_3:1.10
	REL7_2_STABLE:1.10.0.2
	REL7_2:1.10
	REL7_2_RC2:1.10
	REL7_2_RC1:1.10
	REL7_2_BETA5:1.10
	REL7_2_BETA4:1.10
	REL7_2_BETA3:1.10
	REL7_2_BETA2:1.10
	REL7_2_BETA1:1.10
	REL7_1_2:1.8
	REL7_1_STABLE:1.8.0.2
	REL7_1_BETA:1.5
	REL7_1_BETA3:1.5
	REL7_1_BETA2:1.5
	REL7_1:1.8;
locks; strict;
comment	@# @;


1.31
date	2010.01.15.09.19.05;	author heikki;	state Exp;
branches;
next	1.30;

1.30
date	2010.01.05.01.06.56;	author tgl;	state Exp;
branches;
next	1.29;

1.29
date	2009.08.26.22.24.43;	author petere;	state Exp;
branches;
next	1.28;

1.28
date	2009.07.20.20.38.55;	author alvherre;	state Exp;
branches;
next	1.27;

1.27
date	2009.06.30.17.38.50;	author tgl;	state Exp;
branches;
next	1.26;

1.26
date	2008.08.29.13.02.32;	author petere;	state Exp;
branches
	1.26.2.1;
next	1.25;

1.25
date	2008.05.14.19.10.29;	author tgl;	state Exp;
branches;
next	1.24;

1.24
date	2008.03.17.19.44.41;	author petere;	state Exp;
branches;
next	1.23;

1.23
date	2007.10.14.17.07.51;	author tgl;	state Exp;
branches
	1.23.2.1;
next	1.22;

1.22
date	2007.09.10.20.37.36;	author teodor;	state Exp;
branches;
next	1.21;

1.21
date	2005.12.09.21.19.35;	author petere;	state Exp;
branches
	1.21.2.1;
next	1.20;

1.20
date	2005.03.25.23.22.54;	author momjian;	state Exp;
branches;
next	1.19;

1.19
date	2005.01.06.21.00.24;	author tgl;	state Exp;
branches;
next	1.18;

1.18
date	2004.11.17.17.16.13;	author tgl;	state Exp;
branches;
next	1.17;

1.17
date	2004.11.09.06.23.50;	author neilc;	state Exp;
branches;
next	1.16;

1.16
date	2004.11.03.07.38.08;	author neilc;	state Exp;
branches;
next	1.15;

1.15
date	2004.10.16.22.52.39;	author tgl;	state Exp;
branches;
next	1.14;

1.14
date	2004.10.07.16.23.28;	author momjian;	state Exp;
branches;
next	1.13;

1.13
date	2004.10.06.08.50.00;	author momjian;	state Exp;
branches;
next	1.12;

1.12
date	2003.11.29.19.52.08;	author pgsql;	state Exp;
branches;
next	1.11;

1.11
date	2003.11.25.19.09.02;	author petere;	state Exp;
branches;
next	1.10;

1.10
date	2001.08.28.14.20.28;	author petere;	state Exp;
branches
	1.10.8.1;
next	1.9;

1.9
date	2001.08.24.14.07.49;	author petere;	state Exp;
branches;
next	1.8;

1.8
date	2001.03.01.16.17.53;	author petere;	state Exp;
branches;
next	1.7;

1.7
date	2001.02.20.20.37.13;	author tgl;	state Exp;
branches;
next	1.6;

1.6
date	2001.02.10.02.31.28;	author tgl;	state Exp;
branches;
next	1.5;

1.5
date	2000.10.20.21.04.03;	author petere;	state Exp;
branches;
next	1.4;

1.4
date	2000.09.17.13.02.44;	author petere;	state Exp;
branches;
next	1.3;

1.3
date	2000.08.31.16.11.27;	author petere;	state Exp;
branches;
next	1.2;

1.2
date	2000.07.19.16.29.58;	author petere;	state Exp;
branches;
next	1.1;

1.1
date	2000.07.06.21.33.44;	author petere;	state Exp;
branches;
next	;

1.10.8.1
date	2003.11.25.19.10.15;	author petere;	state Exp;
branches;
next	;

1.21.2.1
date	2009.07.20.20.39.22;	author alvherre;	state Exp;
branches;
next	;

1.23.2.1
date	2009.07.20.20.38.58;	author alvherre;	state Exp;
branches;
next	;

1.26.2.1
date	2009.07.01.23.09.40;	author tgl;	state Exp;
branches;
next	1.26.2.2;

1.26.2.2
date	2009.07.20.20.48.58;	author alvherre;	state Exp;
branches;
next	;


desc
@@


1.31
log
@Introduce Streaming Replication.

This includes two new kinds of postmaster processes, walsenders and
walreceiver. Walreceiver is responsible for connecting to the primary server
and streaming WAL to disk, while walsender runs in the primary server and
streams WAL from disk to the client.

Documentation still needs work, but the basics are there. We will probably
pull the replication section to a new chapter later on, as well as the
sections describing file-based replication. But let's do that as a separate
patch, so that it's easier to see what has been added/changed. This patch
also adds a new section to the chapter about FE/BE protocol, documenting the
protocol used by walsender/walreceivxer.

Bump catalog version because of two new functions,
pg_last_xlog_receive_location() and pg_last_xlog_replay_location(), for
monitoring the progress of replication.

Fujii Masao, with additional hacking by me
@
text
@#-------------------------------------------------------------------------
#
# Makefile for src/include
#
# 'make install' installs whole contents of src/include.
#
# $PostgreSQL: pgsql/src/include/Makefile,v 1.30 2010/01/05 01:06:56 tgl Exp $
#
#-------------------------------------------------------------------------

subdir = src/include
top_builddir = ../..
include $(top_builddir)/src/Makefile.global


all: pg_config.h pg_config_os.h


# Subdirectories containing headers for server-side dev
SUBDIRS = access bootstrap catalog commands executor foreign lib libpq mb \
	nodes optimizer parser postmaster regex replication rewrite storage \
	tcop snowball snowball/libstemmer tsearch tsearch/dicts utils \
	port port/win32 port/win32_msvc port/win32_msvc/sys \
	port/win32/arpa port/win32/netinet port/win32/sys \
	portability

# Install all headers
install: all installdirs
# These headers are needed by the public headers of the interfaces.
	$(INSTALL_DATA) $(srcdir)/postgres_ext.h   '$(DESTDIR)$(includedir)'
	$(INSTALL_DATA) $(srcdir)/libpq/libpq-fs.h '$(DESTDIR)$(includedir)/libpq'
	$(INSTALL_DATA) pg_config.h    '$(DESTDIR)$(includedir)'
	$(INSTALL_DATA) pg_config_os.h '$(DESTDIR)$(includedir)'
	$(INSTALL_DATA) $(srcdir)/pg_config_manual.h '$(DESTDIR)$(includedir)'
# These headers are needed by the not-so-public headers of the interfaces.
	$(INSTALL_DATA) $(srcdir)/c.h            '$(DESTDIR)$(includedir_internal)'
	$(INSTALL_DATA) $(srcdir)/port.h         '$(DESTDIR)$(includedir_internal)'
	$(INSTALL_DATA) $(srcdir)/postgres_fe.h  '$(DESTDIR)$(includedir_internal)'
	$(INSTALL_DATA) $(srcdir)/libpq/pqcomm.h '$(DESTDIR)$(includedir_internal)/libpq'
# These headers are needed for server-side development
	$(INSTALL_DATA) pg_config.h    '$(DESTDIR)$(includedir_server)'
	$(INSTALL_DATA) pg_config_os.h '$(DESTDIR)$(includedir_server)'
	$(INSTALL_DATA) utils/fmgroids.h '$(DESTDIR)$(includedir_server)/utils'
# We don't use INSTALL_DATA for performance reasons --- there are a lot of files
	cp $(srcdir)/*.h '$(DESTDIR)$(includedir_server)'/ || exit; \
	chmod $(INSTALL_DATA_MODE) '$(DESTDIR)$(includedir_server)'/*.h  || exit; \
	for dir in $(SUBDIRS); do \
	  cp $(srcdir)/$$dir/*.h '$(DESTDIR)$(includedir_server)'/$$dir/ || exit; \
	  chmod $(INSTALL_DATA_MODE) '$(DESTDIR)$(includedir_server)'/$$dir/*.h  || exit; \
	done

installdirs:
	$(MKDIR_P) '$(DESTDIR)$(includedir)/libpq' '$(DESTDIR)$(includedir_internal)/libpq'
	$(MKDIR_P) $(addprefix '$(DESTDIR)$(includedir_server)'/, $(SUBDIRS))


uninstall:
	rm -f $(addprefix '$(DESTDIR)$(includedir)'/, pg_config.h pg_config_os.h pg_config_manual.h postgres_ext.h libpq/libpq-fs.h)
	rm -f $(addprefix '$(DESTDIR)$(includedir_internal)'/, c.h port.h postgres_fe.h libpq/pqcomm.h)
# heuristic...
	rm -rf $(addprefix '$(DESTDIR)$(includedir_server)'/, $(SUBDIRS) *.h)


clean:
	rm -f utils/fmgroids.h parser/gram.h utils/probes.h catalog/schemapg.h

distclean maintainer-clean: clean
	rm -f pg_config.h dynloader.h pg_config_os.h stamp-h
@


1.30
log
@Get rid of the need for manual maintenance of the initial contents of
pg_attribute, by having genbki.pl derive the information from the various
catalog header files.  This greatly simplifies modification of the
"bootstrapped" catalogs.

This patch finally kills genbki.sh and Gen_fmgrtab.sh; we now rely entirely on
Perl scripts for those build steps.  To avoid creating a Perl build dependency
where there was not one before, the output files generated by these scripts
are now treated as distprep targets, ie, they will be built and shipped in
tarballs.  But you will need a reasonably modern Perl (probably at least
5.6) if you want to build from a CVS pull.

The changes to the MSVC build process are untested, and may well break ---
we'll soon find out from the buildfarm.

John Naylor, based on ideas from Robert Haas and others
@
text
@d7 1
a7 1
# $PostgreSQL: pgsql/src/include/Makefile,v 1.29 2009/08/26 22:24:43 petere Exp $
d21 2
a22 2
	nodes optimizer parser postmaster regex rewrite storage tcop \
	snowball snowball/libstemmer tsearch tsearch/dicts utils \
@


1.29
log
@Update of install-sh, mkinstalldirs, and associated configury

Update install-sh to that from Autoconf 2.63, plus our Darwin-specific
changes (which I simplified a bit).  install-sh is now able to install
multiple files in one run, so we could simplify our makefiles sometime.

install-sh also now has a -d option to create directories, so we don't need
mkinstalldirs anymore.

Use AC_PROG_MKDIR_P in configure.in, so we can use mkdir -p when available
instead of install-sh -d.  For consistency with the rest of the world,
the corresponding make variable has been renamed from $(mkinstalldirs) to
$(MKDIR_P).
@
text
@d7 1
a7 1
# $PostgreSQL: pgsql/src/include/Makefile,v 1.28 2009/07/20 20:38:55 alvherre Exp $
d65 1
a65 1
	rm -f utils/fmgroids.h parser/gram.h utils/probes.h
@


1.28
log
@Install src/include/utils/fmgroids.h on VPATH builds too.

The original coding was not dealing specially with this file being a symlink,
with the end result that it was not installed in VPATH builds.  Oddly enough,
the clean target does know about it ...
@
text
@d7 1
a7 1
# $PostgreSQL: pgsql/src/include/Makefile,v 1.27 2009/06/30 17:38:50 tgl Exp $
d53 2
a54 2
	$(mkinstalldirs) '$(DESTDIR)$(includedir)/libpq' '$(DESTDIR)$(includedir_internal)/libpq'
	$(mkinstalldirs) $(addprefix '$(DESTDIR)$(includedir_server)'/, $(SUBDIRS))
@


1.27
log
@Add missed src/include/foreign subdirectory to the set installed into
INSTALLDIR/include/server/.  Itagaki Takahiro
@
text
@d7 1
a7 1
# $PostgreSQL: pgsql/src/include/Makefile,v 1.26 2008/08/29 13:02:32 petere Exp $
d43 1
@


1.26
log
@Remove all traces that suggest that a non-Bison yacc might be supported, and
change build system to use only Bison.  Simplify build rules, make file names
uniform.  Don't build the token table header file where it is not needed.
@
text
@d7 1
a7 1
# $PostgreSQL: pgsql/src/include/Makefile,v 1.25 2008/05/14 19:10:29 tgl Exp $
d20 1
a20 1
SUBDIRS = access bootstrap catalog commands executor lib libpq mb \
@


1.26.2.1
log
@Add missed src/include/foreign subdirectory to the set installed into
INSTALLDIR/include/server/.  Itagaki Takahiro
@
text
@d7 1
a7 1
# $PostgreSQL: pgsql/src/include/Makefile,v 1.27 2009/06/30 17:38:50 tgl Exp $
d20 1
a20 1
SUBDIRS = access bootstrap catalog commands executor foreign lib libpq mb \
@


1.26.2.2
log
@Install src/include/utils/fmgroids.h on VPATH builds too.

The original coding was not dealing specially with this file being a symlink,
with the end result that it was not installed in VPATH builds.  Oddly enough,
the clean target does know about it ...
@
text
@d7 1
a7 1
# $PostgreSQL: pgsql/src/include/Makefile,v 1.26.2.1 2009-07-01 23:09:40 tgl Exp $
a42 1
	$(INSTALL_DATA) utils/fmgroids.h '$(DESTDIR)$(includedir_server)/utils'
@


1.25
log
@Move the "instr_time" typedef and associated macros into a new header
file portability/instr_time.h, and add a couple more macros to eliminate
some abstraction leakage we formerly had.  Also update psql to use this
header instead of its own copy of nearly the same code.

This commit in itself is just code cleanup and shouldn't change anything.
It lays some groundwork for the upcoming function-stats patch, though.
@
text
@d7 1
a7 1
# $PostgreSQL: pgsql/src/include/Makefile,v 1.24 2008/03/17 19:44:41 petere Exp $
d64 1
a64 1
	rm -f utils/fmgroids.h parser/parse.h utils/probes.h
@


1.24
log
@Enable probes to work with Mac OS X Leopard and other OSes that will
support DTrace in the future.

Switch from using DTRACE_PROBEn macros to the dynamically generated macros.
Use "dtrace -h" to create a header file that contains the dynamically
generated macros to be used in the source code instead of the DTRACE_PROBEn
macros.  A dummy header file is generated for builds without DTrace support.

Author: Robert Lor <Robert.Lor@@sun.com>
@
text
@d7 1
a7 1
# $PostgreSQL: pgsql/src/include/Makefile,v 1.23 2007/10/14 17:07:51 tgl Exp $
d24 2
a25 1
	port/win32/arpa port/win32/netinet port/win32/sys
@


1.23
log
@make install is supposed to install everything under src/include/,
but it was missing a bunch of recently-added subdirectories.
@
text
@d7 1
a7 1
# $PostgreSQL: pgsql/src/include/Makefile,v 1.22 2007/09/10 20:37:36 teodor Exp $
d63 1
a63 1
	rm -f utils/fmgroids.h parser/parse.h
@


1.23.2.1
log
@Install src/include/utils/fmgroids.h on VPATH builds too.

The original coding was not dealing specially with this file being a symlink,
with the end result that it was not installed in VPATH builds.  Oddly enough,
the clean target does know about it ...
@
text
@d7 1
a7 1
# $PostgreSQL: pgsql/src/include/Makefile,v 1.23 2007-10-14 17:07:51 tgl Exp $
a41 1
	$(INSTALL_DATA) utils/fmgroids.h '$(DESTDIR)$(includedir_server)/utils'
@


1.22
log
@Heikki Linnakangas <heikki@@enterprisedb.com>:

Add tsearch subdirectory is added to Makefile to allow
compile  custom tsearch dictionary as an external module.
@
text
@d7 1
a7 1
# $PostgreSQL: pgsql/src/include/Makefile,v 1.21 2005/12/09 21:19:35 petere Exp $
d21 4
a24 2
	nodes optimizer parser regex rewrite storage tcop tsearch utils \
	port port/win32 port/win32/arpa port/win32/netinet port/win32/sys
@


1.21
log
@Allow installation into directories containing spaces in the name.
@
text
@d7 1
a7 1
# $PostgreSQL: pgsql/src/include/Makefile,v 1.20 2005/03/25 23:22:54 momjian Exp $
d21 1
a21 1
	nodes optimizer parser regex rewrite storage tcop utils \
@


1.21.2.1
log
@Install src/include/utils/fmgroids.h on VPATH builds too.

The original coding was not dealing specially with this file being a symlink,
with the end result that it was not installed in VPATH builds.  Oddly enough,
the clean target does know about it ...
@
text
@a39 1
	$(INSTALL_DATA) utils/fmgroids.h '$(DESTDIR)$(includedir_server)/utils'
@


1.20
log
@Use 'cp' and 'chmod' in place of 'install' to install header files.
This reduces header file install from 8 seconds to 0.40 seconds.
@
text
@d7 1
a7 1
# $PostgreSQL: pgsql/src/include/Makefile,v 1.19 2005/01/06 21:00:24 tgl Exp $
d27 5
a31 5
	$(INSTALL_DATA) $(srcdir)/postgres_ext.h   $(DESTDIR)$(includedir)
	$(INSTALL_DATA) $(srcdir)/libpq/libpq-fs.h $(DESTDIR)$(includedir)/libpq
	$(INSTALL_DATA) pg_config.h    $(DESTDIR)$(includedir)
	$(INSTALL_DATA) pg_config_os.h $(DESTDIR)$(includedir)
	$(INSTALL_DATA) $(srcdir)/pg_config_manual.h $(DESTDIR)$(includedir)
d33 4
a36 4
	$(INSTALL_DATA) $(srcdir)/c.h            $(DESTDIR)$(includedir_internal)
	$(INSTALL_DATA) $(srcdir)/port.h         $(DESTDIR)$(includedir_internal)
	$(INSTALL_DATA) $(srcdir)/postgres_fe.h  $(DESTDIR)$(includedir_internal)
	$(INSTALL_DATA) $(srcdir)/libpq/pqcomm.h $(DESTDIR)$(includedir_internal)/libpq
d38 2
a39 2
	$(INSTALL_DATA) pg_config.h    $(DESTDIR)$(includedir_server)
	$(INSTALL_DATA) pg_config_os.h $(DESTDIR)$(includedir_server)
d41 2
a42 2
	cp $(srcdir)/*.h $(DESTDIR)$(includedir_server)/ || exit; \
	chmod $(INSTALL_DATA_MODE) $(DESTDIR)$(includedir_server)/*.h  || exit; \
d44 2
a45 2
	  cp $(srcdir)/$$dir/*.h $(DESTDIR)$(includedir_server)/$$dir/ || exit; \
	  chmod $(INSTALL_DATA_MODE) $(DESTDIR)$(includedir_server)/$$dir/*.h  || exit; \
d49 2
a50 2
	$(mkinstalldirs) $(DESTDIR)$(includedir)/libpq $(DESTDIR)$(includedir_internal)/libpq
	$(mkinstalldirs) $(addprefix $(DESTDIR)$(includedir_server)/, $(SUBDIRS))
d54 2
a55 2
	rm -f $(addprefix $(DESTDIR)$(includedir)/, pg_config.h pg_config_os.h postgres_ext.h libpq/libpq-fs.h)
	rm -f $(addprefix $(DESTDIR)$(includedir_internal)/, c.h postgres_fe.h libpq/pqcomm.h)
d57 1
a57 1
	rm -rf $(addprefix $(DESTDIR)$(includedir_server)/, $(SUBDIRS) *.h)
@


1.19
log
@Don't list port twice in SUBDIRS.  Caught by Honda Shigehiro.
@
text
@d7 1
a7 1
# $PostgreSQL: pgsql/src/include/Makefile,v 1.18 2004/11/17 17:16:13 tgl Exp $
d40 3
a42 3
	for file in $(srcdir)/*.h; do \
	  $(INSTALL_DATA) $$file $(DESTDIR)$(includedir_server)/`basename $$file` || exit; \
	done
d44 2
a45 3
	  for file in $(srcdir)/$$dir/*.h; do \
	    $(INSTALL_DATA) $$file $(DESTDIR)$(includedir_server)/$$dir/`basename $$file` || exit; \
	  done \
@


1.18
log
@Install include/port header files, and fix PGXS build to use them.
Fabien COELHO
@
text
@d7 1
a7 1
# $PostgreSQL: pgsql/src/include/Makefile,v 1.17 2004/11/09 06:23:50 neilc Exp $
d21 1
a21 1
	nodes optimizer parser port regex rewrite storage tcop utils \
@


1.17
log
@Delete the `remove-old-headers' target, as it is no longer useful. Patch
from Alvaro Herrera.
@
text
@d7 1
a7 1
# $PostgreSQL: pgsql/src/include/Makefile,v 1.16 2004/11/03 07:38:08 neilc Exp $
d21 2
a22 1
	nodes optimizer parser port regex rewrite storage tcop utils
@


1.16
log
@Don't create $DESTDIR/include/internal/lib, as it is no longer used.
@
text
@d7 1
a7 1
# $PostgreSQL: pgsql/src/include/Makefile,v 1.15 2004/10/16 22:52:39 tgl Exp $
d24 1
a24 1
install: all installdirs remove-old-headers
a52 18
# Pre-7.1 Postgres installed some headers that are no longer installed by
# default.  If we see these headers in the target directory, zap them to
# avoid cross-version compile problems.  However, don't zap them if they
# match current sources (that means the user did install-all-headers).

remove-old-headers:
	for file in fmgr.h postgres.h access/attnum.h commands/trigger.h \
		executor/spi.h utils/elog.h utils/geo_decls.h utils/mcxt.h \
		utils/palloc.h; do \
		if cmp -s $(srcdir)/$$file $(DESTDIR)$(includedir)/$$file 2>/dev/null; \
		then \
			: ; \
		else \
			rm -f $(DESTDIR)$(includedir)/$$file; \
		fi ; \
	done


@


1.15
log
@Remove dllist.c from libpq.  It's overkill for what libpq needs; we can
just stick a list-link into struct PGnotify instead.  Result is a smaller
faster and more robust library (mainly because we reduce the number of
malloc's and free's involved in notify processing), plus less pollution
of application link-symbol namespace.
@
text
@d7 1
a7 1
# $PostgreSQL: pgsql/src/include/Makefile,v 1.14 2004/10/07 16:23:28 momjian Exp $
d49 1
a49 1
	$(mkinstalldirs) $(DESTDIR)$(includedir)/libpq $(DESTDIR)$(includedir_internal)/libpq $(DESTDIR)$(includedir_internal)/lib
@


1.14
log
@Prevent install error message when doing cmp on empty tree.
@
text
@d7 1
a7 1
# $PostgreSQL: pgsql-server/src/include/Makefile,v 1.13 2004/10/06 08:50:00 momjian Exp $
a35 1
	$(INSTALL_DATA) $(srcdir)/lib/dllist.h   $(DESTDIR)$(includedir_internal)/lib
d73 1
a73 1
	rm -f $(addprefix $(DESTDIR)$(includedir_internal)/, c.h postgres_fe.h lib/dllist.h libpq/pqcomm.h)
@


1.13
log
@please find attached an alternate submission which addresses open item
"make pgxs install by default". It is up to the committers to chose.

(1) there is only one "install" target. no more "install-all-headers".
    it simplifies/changes several makefiles.

(2) the documentation reflects the change.

(3) a minor fix on pgxs to use a nicer patch without a double slash.

Fabien Coelho
@
text
@d7 1
a7 1
# $PostgreSQL: pgsql-server/src/include/Makefile,v 1.12 2003/11/29 19:52:08 pgsql Exp $
d63 1
a63 1
		if cmp -s $(srcdir)/$$file $(DESTDIR)$(includedir)/$$file; \
@


1.12
log
@
$Header: -> $PostgreSQL Changes ...
@
text
@d5 1
a5 3
# 'make install' installs only those headers needed for client-side
# programming.  'make install-all-headers' installs the whole contents
# of src/include.
d7 1
a7 1
# $PostgreSQL: /cvsroot/pgsql-server/src/include/Makefile,v 1.11 2003/11/25 19:09:02 petere Exp $
d19 3
a21 1
# Install only selected headers
d23 1
d37 1
a37 12

installdirs:
	$(mkinstalldirs) $(DESTDIR)$(includedir)/libpq $(DESTDIR)$(includedir_internal)/libpq $(DESTDIR)$(includedir_internal)/lib


# Install all headers

# Subdirectories containing headers that install-all-headers should install
SUBDIRS = access bootstrap catalog commands executor lib libpq mb \
	nodes optimizer parser port regex rewrite storage tcop utils

install-all-headers: all install-all-dirs
d49 2
a50 1
install-all-dirs:
@


1.11
log
@Install all the headers files that the ones that are already installed
depend on.
@
text
@d9 1
a9 1
# $Header: /cvsroot/pgsql-server/src/include/Makefile,v 1.10 2001/08/28 14:20:28 petere Exp $
@


1.10
log
@Include directory rearrangement

Client headers are no longer in a subdirectory, since they have been made
namespace-clean.

Internal libpq headers are in a private subdirectory.

Server headers are in a private subdirectory.  pg_config has a new option
to point there.
@
text
@d9 1
a9 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/include/Makefile,v 1.9 2001/08/24 14:07:49 petere Exp $
d29 1
d32 1
@


1.10.8.1
log
@Install all the headers files that the ones that are already installed
depend on.
@
text
@d9 1
a9 1
# $Header: /cvsroot/pgsql-server/src/include/Makefile,v 1.11 2003/11/25 19:09:02 petere Exp $
a28 1
	$(INSTALL_DATA) $(srcdir)/pg_config_manual.h $(DESTDIR)$(includedir)
a30 1
	$(INSTALL_DATA) $(srcdir)/port.h         $(DESTDIR)$(includedir_internal)
@


1.9
log
@Rename config.h to pg_config.h and os.h to pg_config_os.h, fix a number of
places that were including the wrong files.
@
text
@d9 1
a9 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/include/Makefile,v 1.8 2001/03/01 16:17:53 petere Exp $
a16 3
# Headers needed by clients
srcdir_headers := c.h postgres_ext.h postgres_fe.h \
	libpq/pqcomm.h libpq/libpq-fs.h lib/dllist.h
d18 1
a18 10
builddir_headers := pg_config_os.h pg_config.h

HEADERS = $(srcdir_headers) $(builddir_headers)

# Subdirectories containing headers that install-all-headers should install
SUBDIRS = access bootstrap catalog commands executor lib libpq mb \
	nodes optimizer parser port regex rewrite storage tcop utils


all: $(HEADERS)
d24 10
a33 6
	for file in $(srcdir_headers); do \
	  $(INSTALL_DATA) $(srcdir)/$$file $(DESTDIR)$(includedir)/$$file || exit; \
	done
	for file in $(builddir_headers); do \
	  $(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/$$file || exit; \
	done
a34 1
# Automatically pick out the needed subdirectories for the include tree.
d36 1
a36 1
	$(mkinstalldirs) $(addprefix $(DESTDIR)$(includedir)/, $(sort $(dir $(HEADERS))))
d41 4
d46 2
d49 1
a49 1
	  $(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/`basename $$file` || exit; \
d53 1
a53 1
	    $(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/$$dir/`basename $$file` || exit; \
a55 3
	for file in $(builddir_headers); do \
	  $(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/$$file || exit; \
	done
d58 1
a58 1
	$(mkinstalldirs) $(addprefix $(DESTDIR)$(includedir)/, $(SUBDIRS))
a78 2
# This isn't a complete uninstall, but rm'ing everything under
# $(DESTDIR)$(includedir) is probably too drastic...
d80 5
a84 1
	rm -rf $(addprefix $(DESTDIR)$(includedir)/, $(HEADERS) $(SUBDIRS))
@


1.8
log
@Add missing semicolon required by QNX shell.
from "Tegge, Bernd" <tegge@@repas-aeg.de>
@
text
@d9 1
a9 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/include/Makefile,v 1.7 2001/02/20 20:37:13 tgl Exp $
d21 1
a21 1
builddir_headers := os.h config.h
d94 1
a94 1
	rm -f config.h dynloader.h os.h stamp-h
@


1.7
log
@Clean out any old versions of no-longer-installed header files that may
be lurking in the install target directory.  But don't zap up-to-date
headers (so install-all-headers before regular install will work).
Per suggestion from Larry Rosenman.
@
text
@d9 1
a9 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/include/Makefile,v 1.6 2001/02/10 02:31:28 tgl Exp $
d81 1
a81 1
		fi \
@


1.6
log
@Restructure the key include files per recent pghackers discussion: there
are now separate files "postgres.h" and "postgres_fe.h", which are meant
to be the primary include files for backend .c files and frontend .c files
respectively.  By default, only include files meant for frontend use are
installed into the installation include directory.  There is a new make
target 'make install-all-headers' that adds the whole content of the
src/include tree to the installed fileset, for use by people who want to
develop server-side code without keeping the complete source tree on hand.
Cleaned up a whole lot of crufty and inconsistent header inclusions.
@
text
@d9 1
a9 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/include/Makefile,v 1.5 2000/10/20 21:04:03 petere Exp $
d35 1
a35 1
install: all installdirs
d65 18
@


1.5
log
@Add support for VPATH builds, that is, building somewhere else than in the
source directory.  This involves mostly makefiles using $(srcdir) when they
might have used ".".  (Regression tests don't work with this, yet.)

Sort out usage of CPPFLAGS, CFLAGS (and CXXFLAGS).  Add "override" keyword
in most places, to preserve necessary flags even when the user overrode the
flags.
@
text
@d5 3
a7 2
# Install exported headers to the include directory (these headers are
# the minimal ones needed to build loadable backend extensions).
d9 1
a9 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/include/Makefile,v 1.4 2000/09/17 13:02:44 petere Exp $
d17 3
d21 1
a21 4
srcdir_headers := c.h postgres.h postgres_ext.h fmgr.h \
	libpq/pqcomm.h libpq/libpq-fs.h lib/dllist.h \
	utils/geo_decls.h utils/elog.h utils/palloc.h \
	access/attnum.h executor/spi.h commands/trigger.h
d23 1
a23 1
builddir_headers := os.h config.h utils/fmgroids.h
d25 3
a27 1
HEADERS = $(srcdir_headers) $(builddir_headers)
d33 1
a33 10
# These rules are necessary in case someone installs the include tree
# before building the backend tree. Very messy.
utils/fmgroids.h: $(top_builddir)/src/backend/utils/fmgroids.h
	cd utils && rm -f fmgroids.h && $(LN_S) ../$(top_builddir)/src/backend/utils/fmgroids.h .

# This file is built in the backend tree, but we need to keep track of
# the dependencies here.
$(top_builddir)/src/backend/utils/fmgroids.h: $(top_srcdir)/src/backend/utils/Gen_fmgrtab.sh catalog/pg_proc.h
	$(MAKE) -C $(dir $@@) fmgroids.h

d43 1
a43 2
# Automatically pick out the needed subdirectories for the include
# tree.
d47 22
d70 1
a70 1
	rm -f $(addprefix $(DESTDIR)$(includedir)/, $(HEADERS))
@


1.4
log
@Support for DESTDIR make variable. This is used as in `make install
DESTDIR=/else/where' and prepends the value of DESTDIR to the full
installation paths (e.g., /else/where/usr/local/pgsql/bin). This allows
users to install the package into a location different from the one that
was configured and hard-coded into various scripts, e.g., for creating
binary packages.

DESTDIR is in many cases preferrable over `make install
prefix=/else/where' because

a) `prefix' affects the path that is hard-coded into the files, which can
lead to a `make install prefix=xxx' (as done by the regression test
driver) corrupting the files in the source tree with wrong paths.

b) it doesn't work at all if a directory was overridden to not depend on
`prefix', e.g., --sysconfdir=/etc.

(Updating the regression test driver to use DESTDIR is a separate
undertaking.)

See also autoconf@@gnu.org, From: Akim Demaille <akim@@epita.fr>, Date: 08
Sep 2000 12:48:59 +0200, Message-ID:
<mv4em2vb1lw.fsf@@nostromo.lrde.epita.fr>, Subject: Re: HTML format
documentation.
@
text
@d8 1
a8 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/include/Makefile,v 1.3 2000/08/31 16:11:27 petere Exp $
d17 1
a17 1
HEADERS := os.h config.h c.h postgres.h postgres_ext.h fmgr.h \
d19 1
a19 1
	utils/geo_decls.h utils/elog.h utils/fmgroids.h utils/palloc.h \
d22 4
d42 5
a46 2
	for i in $(HEADERS); do \
	  $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir)/$$i || exit; \
@


1.3
log
@Fix relative path references so that make knowns which dependencies refer
to one another. Sort out builddir vs srcdir variable namings. Remove some
now obsoleted make variables.
@
text
@d8 1
a8 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/include/Makefile,v 1.2 2000/07/19 16:29:58 petere Exp $
d38 2
a39 3
	@@for i in $(HEADERS); do \
	  echo "$(INSTALL_DATA) $(srcdir)/$$i $(includedir)/$$i"; \
	  $(INSTALL_DATA) $(srcdir)/$$i $(includedir)/$$i; \
d45 1
a45 1
	$(mkinstalldirs) $(addprefix $(includedir)/, $(sort $(dir $(HEADERS))))
d48 1
a48 1
	rm -f $(addprefix $(includedir)/, $(HEADERS))
@


1.2
log
@Add distprep target to take some of the job of the release_prep script.
The latter updated accordingly. Also add `dist' and `distcheck' targets
to play with, but caveat packager.

Updated backend/bootstrap and backend/parser makefile to make them
marginally builddir aware and fix the usual set of things.

Add rule to automatically remake config.h dependent on config.h.in and
config.status. (Adopted from Autoconf manual and about every other
package.) On a good day we should now have a complete and accurate set
of dependencies throughout everything.
@
text
@d8 1
a8 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/include/Makefile,v 1.1 2000/07/06 21:33:44 petere Exp $
d14 1
a14 1
include ../Makefile.global
@


1.1
log
@Backend makefile cleanup. make maintainer-clean is now completely
functional.

Handle include file installation in src/include/Makefile

genbki.sh improvements: Don't substitute anything by config.status,
instead pass in AWK and CPP through environment. Change calling
convention to support named output files, so we get to see error
messages on stderr.

Rename bootstrap template files and install them into PREFIX/share.
Update initdb to that effect and other readability improvements
in initdb.
@
text
@d8 1
a8 1
# $Header$
d55 1
a55 1
	rm -f config.h dynloader.h os.h
@
