head	1.71;
access;
symbols
	REL9_0_0:1.71
	REL9_1_ALPHA1:1.71
	REL9_0_RC1:1.71
	REL9_0_BETA4:1.71
	REL9_0_STABLE:1.71.0.2
	REL9_0_BETA3:1.71
	REL9_0_BETA2:1.70
	REL7_4_29:1.40
	REL8_0_25:1.59.4.1
	REL8_1_21:1.60
	REL8_2_17:1.62
	REL8_3_11:1.65
	REL8_4_4:1.67
	REL9_0_BETA1:1.69
	REL9_0_ALPHA5_BRANCH:1.69.0.4
	REL9_0_ALPHA5:1.69
	REL7_4_28:1.40
	REL8_0_24:1.59.4.1
	REL8_1_20:1.60
	REL8_2_16:1.62
	REL8_3_10:1.65
	REL8_4_3:1.67
	REL9_0_ALPHA4:1.69
	REL9_0_ALPHA4_BRANCH:1.69.0.2
	REL8_5_ALPHA3:1.68
	REL8_5_ALPHA3_BRANCH:1.68.0.4
	REL7_4_27:1.40
	REL8_0_23:1.59.4.1
	REL8_1_19:1.60
	REL8_2_15:1.62
	REL8_3_9:1.65
	REL8_4_2:1.67
	REL8_5_ALPHA2:1.68
	REL8_5_ALPHA2_BRANCH:1.68.0.2
	REL7_4_26:1.40
	REL8_0_22:1.59.4.1
	REL8_1_18:1.60
	REL8_2_14:1.62
	REL8_3_8:1.65
	REL8_4_1:1.67
	REL8_5_ALPHA1:1.67
	REL8_5_ALPHA1_BRANCH:1.67.0.4
	REL8_4_STABLE:1.67.0.2
	REL8_4_0:1.67
	REL8_4_RC2:1.67
	REL8_4_RC1:1.67
	REL8_4_BETA2:1.67
	REL8_4_BETA1:1.67
	REL7_4_25:1.40
	REL8_0_21:1.59.4.1
	REL8_1_17:1.60
	REL8_2_13:1.62
	REL8_3_7:1.65
	REL7_4_24:1.40
	REL8_0_20:1.59.4.1
	REL8_1_16:1.60
	REL8_2_12:1.62
	REL8_3_6:1.65
	REL7_4_23:1.40
	REL8_0_19:1.59.4.1
	REL8_1_15:1.60
	REL8_2_11:1.62
	REL8_3_5:1.65
	REL7_4_22:1.40
	REL8_0_18:1.59.4.1
	REL8_1_14:1.60
	REL8_2_10:1.62
	REL8_3_4:1.65
	REL7_4_21:1.40
	REL8_0_17:1.59.4.1
	REL8_1_13:1.60
	REL8_2_9:1.62
	REL8_3_3:1.65
	REL7_4_20:1.40
	REL8_0_16:1.59.4.1
	REL8_1_12:1.60
	REL8_2_8:1.62
	REL8_3_2:1.65
	REL8_2_7:1.62
	REL8_3_1:1.65
	REL8_3_STABLE:1.65.0.2
	REL8_3_0:1.65
	REL8_3_RC2:1.65
	REL7_3_21:1.38
	REL7_4_19:1.40
	REL8_0_15:1.59.4.1
	REL8_1_11:1.60
	REL8_2_6:1.62
	REL8_3_RC1:1.65
	REL8_3_BETA4:1.64
	REL8_3_BETA3:1.64
	REL8_3_BETA2:1.64
	REL8_3_BETA1:1.64
	REL7_3_20:1.38
	REL7_4_18:1.40
	REL8_0_14:1.59.4.1
	REL8_1_10:1.60
	REL8_2_5:1.62
	REL7_3_19:1.38
	REL7_4_17:1.40
	REL8_0_13:1.59.4.1
	REL8_1_9:1.60
	REL8_2_4:1.62
	REL8_0_12:1.59.4.1
	REL8_1_8:1.60
	REL8_2_3:1.62
	REL7_3_18:1.38
	REL7_4_16:1.40
	REL8_0_11:1.59.4.1
	REL8_1_7:1.60
	REL8_2_2:1.62
	REL8_0_10:1.59.4.1
	REL8_1_6:1.60
	REL8_2_1:1.62
	REL7_4_15:1.40
	REL7_3_17:1.38
	REL8_2_STABLE:1.62.0.2
	REL8_2_0:1.62
	REL8_2_RC1:1.62
	REL8_2_BETA3:1.62
	REL8_2_BETA2:1.62
	REL8_1_5:1.60
	REL8_0_9:1.59.4.1
	REL7_4_14:1.40
	REL7_3_16:1.38
	REL8_2_BETA1:1.62
	REL7_3_15:1.38
	REL7_4_13:1.40
	REL8_0_8:1.59.4.1
	REL8_1_4:1.60
	REL7_3_14:1.38
	REL7_4_12:1.40
	REL8_0_7:1.59.4.1
	REL8_1_3:1.60
	REL7_3_13:1.38
	REL7_4_11:1.40
	REL8_0_6:1.59.4.1
	REL8_1_2:1.60
	REL7_3_12:1.38
	REL7_4_10:1.40
	REL8_0_5:1.59.4.1
	REL8_1_1:1.60
	REL8_1_STABLE:1.60.0.2
	REL8_1_0:1.60
	REL8_1_0RC1:1.60
	REL8_1_0BETA4:1.60
	REL8_1_0BETA3:1.60
	REL7_3_11:1.38
	REL7_4_9:1.40
	REL8_0_4:1.59.4.1
	REL8_1_0BETA2:1.60
	REL8_1_0BETA1:1.60
	REL7_2_8:1.32
	REL7_3_10:1.38
	REL7_4_8:1.40
	REL8_0_3:1.59.4.1
	REL8_0_2:1.59.4.1
	REL7_2_7:1.32
	REL7_3_9:1.38
	REL7_4_7:1.40
	REL8_0_1:1.59
	REL8_0_STABLE:1.59.0.4
	REL8_0_0:1.59.0.2
	REL8_0_0RC5:1.59
	REL8_0_0RC4:1.59
	REL8_0_0RC3:1.58
	REL8_0_0RC2:1.58
	REL8_0_0RC1:1.58
	REL8_0_0BETA5:1.58
	REL8_0_0BETA4:1.57
	REL7_4_6:1.40
	REL7_3_8:1.38
	REL7_2_6:1.32
	REL8_0_0BETA3:1.52
	REL8_0_0BETA2:1.52
	REL7_2_5:1.32
	REL7_4_5:1.40
	REL7_3_7:1.38
	REL7_4_4:1.40
	REL8_0_0BETA1:1.52
	REL7_4_3:1.40
	REL7_4_2:1.40
	REL7_3_6:1.38
	REL7_4_1:1.40
	REL7_3_5:1.38
	REL7_4:1.40
	REL7_4_RC2:1.40
	REL7_4_STABLE:1.40.0.4
	REL7_4_RC1:1.40
	REL7_4_BETA5:1.40
	REL7_4_BETA4:1.40
	REL7_4_BETA3:1.40
	REL7_4_BETA2:1.40
	WIN32_DEV:1.40.0.2
	REL7_4_BETA1:1.39
	REL7_3_4:1.38
	REL7_3_2:1.38
	REL7_2_4:1.32
	REL7_3_STABLE:1.38.0.2
	REL7_2_3:1.32
	REL7_2_STABLE:1.32.0.2
	REL7_2:1.32
	REL7_2_RC2:1.32
	REL7_2_RC1:1.32
	REL7_2_BETA5:1.31
	REL7_2_BETA4:1.31
	REL7_2_BETA3:1.31
	REL7_2_BETA2:1.31
	REL7_2_BETA1:1.31
	REL7_1_2:1.31
	REL7_1_STABLE:1.31.0.2
	REL7_1_BETA:1.27
	REL7_1_BETA3:1.27
	REL7_1_BETA2:1.27
	REL7_1:1.31
	REL2_0B:1.11.0.2
	REL2_0:1.11
	Release_2_0_0:1.5
	Release_1_0_3:1.5.0.2
	Release_2_0:1.5
	Release_1_0_2:1.5
	PG95-1_01:1.1.1.1
	PG95_DIST:1.1.1;
locks; strict;
comment	@# @;


1.71
date	2010.07.05.18.54.38;	author tgl;	state Exp;
branches;
next	1.70;

1.70
date	2010.05.12.11.33.09;	author momjian;	state Exp;
branches;
next	1.69;

1.69
date	2010.01.02.16.57.58;	author momjian;	state Exp;
branches;
next	1.68;

1.68
date	2009.08.26.22.24.43;	author petere;	state Exp;
branches;
next	1.67;

1.67
date	2009.03.07.00.13.58;	author alvherre;	state Exp;
branches;
next	1.66;

1.66
date	2009.01.01.17.23.54;	author momjian;	state Exp;
branches;
next	1.65;

1.65
date	2008.01.01.19.45.55;	author momjian;	state Exp;
branches;
next	1.64;

1.64
date	2007.09.27.19.53.43;	author tgl;	state Exp;
branches;
next	1.63;

1.63
date	2007.01.05.22.19.48;	author momjian;	state Exp;
branches;
next	1.62;

1.62
date	2006.03.05.15.58.50;	author momjian;	state Exp;
branches;
next	1.61;

1.61
date	2005.12.09.21.19.35;	author petere;	state Exp;
branches;
next	1.60;

1.60
date	2005.03.25.18.17.13;	author momjian;	state Exp;
branches;
next	1.59;

1.59
date	2005.01.01.20.44.23;	author tgl;	state Exp;
branches
	1.59.4.1;
next	1.58;

1.58
date	2004.11.08.05.23.23;	author momjian;	state Exp;
branches;
next	1.57;

1.57
date	2004.10.07.13.45.48;	author momjian;	state Exp;
branches;
next	1.56;

1.56
date	2004.10.05.19.30.23;	author momjian;	state Exp;
branches;
next	1.55;

1.55
date	2004.10.04.20.32.58;	author momjian;	state Exp;
branches;
next	1.54;

1.54
date	2004.10.04.18.05.54;	author momjian;	state Exp;
branches;
next	1.53;

1.53
date	2004.10.04.13.43.56;	author momjian;	state Exp;
branches;
next	1.52;

1.52
date	2004.05.25.01.00.24;	author momjian;	state Exp;
branches;
next	1.51;

1.51
date	2004.05.24.01.01.37;	author momjian;	state Exp;
branches;
next	1.50;

1.50
date	2004.05.22.02.14.28;	author tgl;	state Exp;
branches;
next	1.49;

1.49
date	2004.05.19.17.15.20;	author momjian;	state Exp;
branches;
next	1.48;

1.48
date	2004.05.18.20.18.58;	author momjian;	state Exp;
branches;
next	1.47;

1.47
date	2004.05.11.21.57.14;	author momjian;	state Exp;
branches;
next	1.46;

1.46
date	2004.04.30.20.01.39;	author momjian;	state Exp;
branches;
next	1.45;

1.45
date	2004.04.26.17.40.48;	author momjian;	state Exp;
branches;
next	1.44;

1.44
date	2004.02.07.07.20.12;	author tgl;	state Exp;
branches;
next	1.43;

1.43
date	2003.12.23.21.56.21;	author tgl;	state Exp;
branches;
next	1.42;

1.42
date	2003.12.06.03.00.11;	author tgl;	state Exp;
branches;
next	1.41;

1.41
date	2003.11.29.19.52.04;	author pgsql;	state Exp;
branches;
next	1.40;

1.40
date	2003.08.08.04.52.21;	author momjian;	state Exp;
branches;
next	1.39;

1.39
date	2002.12.12.21.02.00;	author tgl;	state Exp;
branches;
next	1.38;

1.38
date	2002.08.27.18.57.26;	author petere;	state Exp;
branches;
next	1.37;

1.37
date	2002.08.18.09.36.25;	author petere;	state Exp;
branches;
next	1.36;

1.36
date	2002.07.27.20.10.05;	author petere;	state Exp;
branches;
next	1.35;

1.35
date	2002.07.15.21.34.05;	author momjian;	state Exp;
branches;
next	1.34;

1.34
date	2002.07.06.20.12.30;	author momjian;	state Exp;
branches;
next	1.33;

1.33
date	2002.06.20.20.29.41;	author momjian;	state Exp;
branches;
next	1.32;

1.32
date	2002.01.15.05.05.49;	author tgl;	state Exp;
branches;
next	1.31;

1.31
date	2001.03.24.13.21.14;	author petere;	state Exp;
branches;
next	1.30;

1.30
date	2001.02.27.08.13.28;	author ishii;	state Exp;
branches;
next	1.29;

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

1.28
date	2001.02.18.18.33.59;	author momjian;	state Exp;
branches;
next	1.27;

1.27
date	2000.11.30.20.36.11;	author petere;	state Exp;
branches;
next	1.26;

1.26
date	2000.10.20.21.03.56;	author petere;	state Exp;
branches;
next	1.25;

1.25
date	2000.09.17.13.02.36;	author petere;	state Exp;
branches;
next	1.24;

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

1.23
date	2000.08.31.16.11.13;	author petere;	state Exp;
branches;
next	1.22;

1.22
date	2000.08.01.15.51.44;	author pjw;	state Exp;
branches;
next	1.21;

1.21
date	2000.07.24.06.24.26;	author pjw;	state Exp;
branches;
next	1.20;

1.20
date	2000.07.21.11.40.08;	author pjw;	state Exp;
branches;
next	1.19;

1.19
date	2000.07.04.19.52.00;	author petere;	state Exp;
branches;
next	1.18;

1.18
date	2000.07.04.14.25.26;	author momjian;	state Exp;
branches;
next	1.17;

1.17
date	2000.07.03.16.35.39;	author petere;	state Exp;
branches;
next	1.16;

1.16
date	2000.06.28.18.29.16;	author petere;	state Exp;
branches;
next	1.15;

1.15
date	2000.06.27.00.31.12;	author petere;	state Exp;
branches;
next	1.14;

1.14
date	97.02.09.03.23.14;	author scrappy;	state dead;
branches;
next	1.13;

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

1.12
date	97.01.16.15.28.21;	author momjian;	state Exp;
branches;
next	1.11;

1.11
date	96.11.28.03.31.27;	author bryanh;	state Exp;
branches;
next	1.10;

1.10
date	96.11.26.07.38.16;	author bryanh;	state Exp;
branches;
next	1.9;

1.9
date	96.11.26.03.19.36;	author bryanh;	state Exp;
branches;
next	1.8;

1.8
date	96.11.12.06.10.37;	author bryanh;	state Exp;
branches;
next	1.7;

1.7
date	96.11.11.13.40.46;	author bryanh;	state Exp;
branches;
next	1.6;

1.6
date	96.10.31.05.56.01;	author momjian;	state Exp;
branches;
next	1.5;

1.5
date	96.07.31.18.59.00;	author scrappy;	state Exp;
branches;
next	1.4;

1.4
date	96.07.31.17.35.13;	author scrappy;	state Exp;
branches;
next	1.3;

1.3
date	96.07.22.08.36.57;	author scrappy;	state Exp;
branches;
next	1.2;

1.2
date	96.07.12.05.39.30;	author scrappy;	state Exp;
branches;
next	1.1;

1.1
date	96.07.09.06.22.14;	author scrappy;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	96.07.09.06.22.14;	author scrappy;	state Exp;
branches;
next	;

1.59.4.1
date	2005.03.25.18.18.40;	author momjian;	state Exp;
branches;
next	;


desc
@@


1.71
log
@Split the LDFLAGS make variable into two parts: LDFLAGS is now used for
linking both executables and shared libraries, and we add on LDFLAGS_EX when
linking executables or LDFLAGS_SL when linking shared libraries.  This
provides a significantly cleaner way of dealing with link-time switches than
the former behavior.  Also, make sure that the various platform-specific
%.so: %.o rules incorporate LDFLAGS and LDFLAGS_SL; most of them missed that
before.  (I did not add these variables for the platforms that invoke $(LD)
directly, however.  It's not clear if we can do that safely, since for the
most part we assume these variables use CC command-line syntax.)

Per gripe from Aaron Swenson and subsequent investigation.
@
text
@#-------------------------------------------------------------------------
#
# Makefile for src/bin/pg_dump
#
# Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
# $PostgreSQL: pgsql/src/bin/pg_dump/Makefile,v 1.70 2010/05/12 11:33:09 momjian Exp $
#
#-------------------------------------------------------------------------

PGFILEDESC = "pg_dump/pg_restore/pg_dumpall - backup and restore PostgreSQL databases"
PGAPPICON=win32

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

override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)

OBJS=	pg_backup_archiver.o pg_backup_db.o pg_backup_custom.o \
	pg_backup_files.o pg_backup_null.o pg_backup_tar.o \
	dumputils.o $(WIN32RES)

KEYWRDOBJS = keywords.o kwlookup.o

kwlookup.c: % : $(top_srcdir)/src/backend/parser/%
	rm -f $@@ && $(LN_S) $< .

all: submake-libpq submake-libpgport pg_dump pg_restore pg_dumpall

pg_dump: pg_dump.o common.o pg_dump_sort.o $(OBJS) $(KEYWRDOBJS) $(libpq_builddir)/libpq.a 
	$(CC) $(CFLAGS) pg_dump.o common.o pg_dump_sort.o $(KEYWRDOBJS) $(OBJS) $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@@$(X)

pg_restore: pg_restore.o $(OBJS) $(KEYWRDOBJS) $(libpq_builddir)/libpq.a
	$(CC) $(CFLAGS) pg_restore.o $(KEYWRDOBJS) $(OBJS) $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@@$(X)

pg_dumpall: pg_dumpall.o dumputils.o $(KEYWRDOBJS) $(libpq_builddir)/libpq.a
	$(CC) $(CFLAGS) pg_dumpall.o dumputils.o $(KEYWRDOBJS) $(WIN32RES) $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@@$(X)

install: all installdirs
	$(INSTALL_PROGRAM) pg_dump$(X) '$(DESTDIR)$(bindir)'/pg_dump$(X)
	$(INSTALL_PROGRAM) pg_restore$(X) '$(DESTDIR)$(bindir)'/pg_restore$(X)
	$(INSTALL_PROGRAM) pg_dumpall$(X) '$(DESTDIR)$(bindir)'/pg_dumpall$(X)

installdirs:
	$(MKDIR_P) '$(DESTDIR)$(bindir)'

uninstall:
	rm -f $(addprefix '$(DESTDIR)$(bindir)'/, pg_dump$(X) pg_restore$(X) pg_dumpall$(X))

clean distclean maintainer-clean:
	rm -f pg_dump$(X) pg_restore$(X) pg_dumpall$(X) $(OBJS) pg_dump.o common.o pg_dump_sort.o pg_restore.o pg_dumpall.o kwlookup.c $(KEYWRDOBJS)
@


1.70
log
@Add PGFILEDESC description to Makefiles for all /contrib executables.

Add PGAPPICON to all executable makefiles.
@
text
@d8 1
a8 1
# $PostgreSQL: pgsql/src/bin/pg_dump/Makefile,v 1.69 2010/01/02 16:57:58 momjian Exp $
d33 1
a33 1
	$(CC) $(CFLAGS) pg_dump.o common.o pg_dump_sort.o $(KEYWRDOBJS) $(OBJS) $(libpq_pgport) $(LDFLAGS) $(LIBS) -o $@@$(X)
d36 1
a36 1
	$(CC) $(CFLAGS) pg_restore.o $(KEYWRDOBJS) $(OBJS) $(libpq_pgport) $(LDFLAGS) $(LIBS) -o $@@$(X)
d39 1
a39 1
	$(CC) $(CFLAGS) pg_dumpall.o dumputils.o $(KEYWRDOBJS) $(WIN32RES) $(libpq_pgport) $(LDFLAGS) $(LIBS) -o $@@$(X)
@


1.69
log
@Update copyright for the year 2010.
@
text
@d8 1
a8 1
# $PostgreSQL: pgsql/src/bin/pg_dump/Makefile,v 1.68 2009/08/26 22:24:43 petere Exp $
d13 2
@


1.68
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
@d5 1
a5 1
# Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
d8 1
a8 1
# $PostgreSQL: pgsql/src/bin/pg_dump/Makefile,v 1.67 2009/03/07 00:13:58 alvherre Exp $
@


1.67
log
@Separate the key word list that lived in keywords.c into a new header file
kwlist.h, to avoid having to link the backend object file into other programs
like pg_dump.  We can now simply symlink a single source file from the backend
(kwlookup.c, containing the shared routine ScanKeywordLookup) and compile it
locally, which is a lot cleaner.
@
text
@d8 1
a8 1
# $PostgreSQL: pgsql/src/bin/pg_dump/Makefile,v 1.66 2009/01/01 17:23:54 momjian Exp $
d45 1
a45 1
	$(mkinstalldirs) '$(DESTDIR)$(bindir)'
@


1.66
log
@Update copyright for 2009.
@
text
@d8 1
a8 1
# $PostgreSQL: pgsql/src/bin/pg_dump/Makefile,v 1.65 2008/01/01 19:45:55 momjian Exp $
d23 1
a23 1
EXTRA_OBJS = $(top_builddir)/src/backend/parser/keywords.o
d25 2
a26 1
all: submake-libpq submake-libpgport submake-backend pg_dump pg_restore pg_dumpall
d28 1
a28 2
pg_dump: pg_dump.o common.o pg_dump_sort.o $(OBJS) $(libpq_builddir)/libpq.a 
	$(CC) $(CFLAGS) pg_dump.o common.o pg_dump_sort.o $(OBJS) $(EXTRA_OBJS) $(libpq_pgport) $(LDFLAGS) $(LIBS) -o $@@$(X)
d30 2
a31 2
pg_restore: pg_restore.o $(OBJS) $(libpq_builddir)/libpq.a
	$(CC) $(CFLAGS) pg_restore.o $(OBJS) $(EXTRA_OBJS) $(libpq_pgport) $(LDFLAGS) $(LIBS) -o $@@$(X)
d33 2
a34 6
pg_dumpall: pg_dumpall.o dumputils.o $(libpq_builddir)/libpq.a
	$(CC) $(CFLAGS) pg_dumpall.o dumputils.o $(EXTRA_OBJS) $(WIN32RES) $(libpq_pgport) $(LDFLAGS) $(LIBS) -o $@@$(X)

.PHONY: submake-backend
submake-backend:
	$(MAKE) -C $(top_builddir)/src/backend/parser keywords.o
d36 2
d51 1
a51 1
	rm -f pg_dump$(X) pg_restore$(X) pg_dumpall$(X) $(OBJS) pg_dump.o common.o pg_dump_sort.o pg_restore.o pg_dumpall.o
@


1.65
log
@Update copyrights in source tree to 2008.
@
text
@d5 1
a5 1
# Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
d8 1
a8 1
# $PostgreSQL: pgsql/src/bin/pg_dump/Makefile,v 1.64 2007/09/27 19:53:43 tgl Exp $
@


1.64
log
@Define the FRONTEND symbol in postgres_fe.h, which allows us to eliminate
duplicative -DFRONTEND flags from many Makefiles.  We still need Makefile
control of the symbol in a few places that compile frontend-or-backend
src/port/ files, but it's a lot cleaner than before.

Hiroshi Saito
@
text
@d5 1
a5 1
# Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
d8 1
a8 1
# $PostgreSQL: pgsql/src/bin/pg_dump/Makefile,v 1.63 2007/01/05 22:19:48 momjian Exp $
@


1.63
log
@Update CVS HEAD for 2007 copyright.  Back branches are typically not
back-stamped for this.
@
text
@d8 1
a8 1
# $PostgreSQL: pgsql/src/bin/pg_dump/Makefile,v 1.62 2006/03/05 15:58:50 momjian Exp $
d17 1
a17 1
override CPPFLAGS := -DFRONTEND -I$(libpq_srcdir) $(CPPFLAGS)
@


1.62
log
@Update copyright for 2006.  Update scripts.
@
text
@d5 1
a5 1
# Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
d8 1
a8 1
# $PostgreSQL: pgsql/src/bin/pg_dump/Makefile,v 1.61 2005/12/09 21:19:35 petere Exp $
@


1.61
log
@Allow installation into directories containing spaces in the name.
@
text
@d5 1
a5 1
# Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
d8 1
a8 1
# $PostgreSQL: pgsql/src/bin/pg_dump/Makefile,v 1.60 2005/03/25 18:17:13 momjian Exp $
@


1.60
log
@Have libpgport link before libpq so that PG client applications are more
immunte to changes in libpq's usage of pgport between major versions.
@
text
@d8 1
a8 1
# $PostgreSQL: pgsql/src/bin/pg_dump/Makefile,v 1.59 2005/01/01 20:44:23 tgl Exp $
d42 3
a44 3
	$(INSTALL_PROGRAM) pg_dump$(X) $(DESTDIR)$(bindir)/pg_dump$(X)
	$(INSTALL_PROGRAM) pg_restore$(X) $(DESTDIR)$(bindir)/pg_restore$(X)
	$(INSTALL_PROGRAM) pg_dumpall$(X) $(DESTDIR)$(bindir)/pg_dumpall$(X)
d47 1
a47 1
	$(mkinstalldirs) $(DESTDIR)$(bindir)
d50 1
a50 1
	rm -f $(addprefix $(DESTDIR)$(bindir)/, pg_dump$(X) pg_restore$(X) pg_dumpall$(X))
@


1.59
log
@Some more missed copyright notices.  Many of these look like they
should have been caught by the src/tools/copyright script ... why
weren't they?
@
text
@d8 1
a8 1
# $PostgreSQL: pgsql/src/bin/pg_dump/Makefile,v 1.58 2004/11/08 05:23:23 momjian Exp $
d28 1
a28 1
	$(CC) $(CFLAGS) pg_dump.o common.o pg_dump_sort.o $(OBJS) $(EXTRA_OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@@$(X)
d31 1
a31 1
	$(CC) $(CFLAGS) pg_restore.o $(OBJS) $(EXTRA_OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@@$(X)
d34 1
a34 1
	$(CC) $(CFLAGS) pg_dumpall.o dumputils.o $(EXTRA_OBJS) $(WIN32RES) $(libpq) $(LDFLAGS) $(LIBS) -o $@@$(X)
@


1.59.4.1
log
@Have libpgport link before libpq so that PG client applications are more
immunte to changes in libpq's usage of pgport between major versions.

Backpatch to 8.0.X.
@
text
@d8 1
a8 1
# $PostgreSQL: pgsql/src/bin/pg_dump/Makefile,v 1.59 2005/01/01 20:44:23 tgl Exp $
d28 1
a28 1
	$(CC) $(CFLAGS) pg_dump.o common.o pg_dump_sort.o $(OBJS) $(EXTRA_OBJS) $(libpq_pgport) $(LDFLAGS) $(LIBS) -o $@@$(X)
d31 1
a31 1
	$(CC) $(CFLAGS) pg_restore.o $(OBJS) $(EXTRA_OBJS) $(libpq_pgport) $(LDFLAGS) $(LIBS) -o $@@$(X)
d34 1
a34 1
	$(CC) $(CFLAGS) pg_dumpall.o dumputils.o $(EXTRA_OBJS) $(WIN32RES) $(libpq_pgport) $(LDFLAGS) $(LIBS) -o $@@$(X)
@


1.58
log
@Allow win32/cygwin link against the first matching library symbol rather
than erroring out.  This is the Unix behavior.
@
text
@d5 1
a5 1
# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
d8 1
a8 1
# $PostgreSQL: pgsql/src/bin/pg_dump/Makefile,v 1.57 2004/10/07 13:45:48 momjian Exp $
@


1.57
log
@Improve pgindent processing of comment after 'else'.
Improve comment of pg_dump Win32 link workaround.
@
text
@d8 1
a8 1
# $PostgreSQL: pgsql-server/src/bin/pg_dump/Makefile,v 1.56 2004/10/05 19:30:23 momjian Exp $
a24 6
# Not sure why MinGW needs this but it prevents a link failure
# of duplicate definitions for pg_tolower().  2004-10-06
ifeq ($(PORTNAME), win32)
EXTRA_OBJS += $(top_builddir)/src/port/exec.o
endif

@


1.56
log
@Add Win32 version info to client binaries.

Magnus Hagander
@
text
@d8 1
a8 1
# $PostgreSQL: pgsql-server/src/bin/pg_dump/Makefile,v 1.55 2004/10/04 20:32:58 momjian Exp $
d25 2
a26 1
# not sure why MinGW needs this but it prevents a link failure
@


1.55
log
@Fix MinGW link failure with new libpgport processing.
@
text
@d8 1
a8 1
# $PostgreSQL: pgsql-server/src/bin/pg_dump/Makefile,v 1.54 2004/10/04 18:05:54 momjian Exp $
d12 1
d21 1
a21 1
	dumputils.o
d39 1
a39 1
	$(CC) $(CFLAGS) pg_dumpall.o dumputils.o $(EXTRA_OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@@$(X)
@


1.54
log
@Readd -DFRONTEND to client makefiles because it still affects win32.h
defines.
@
text
@d8 1
a8 1
# $PostgreSQL: pgsql-server/src/bin/pg_dump/Makefile,v 1.53 2004/10/04 13:43:56 momjian Exp $
d24 4
@


1.53
log
@Make libpgport be front-end only and make libpgport_srv be a backend
library that uses palloc, ereport, etc.  This simplifies the makefiles
for client applications.
@
text
@d8 1
a8 1
# $PostgreSQL: pgsql-server/src/bin/pg_dump/Makefile,v 1.52 2004/05/25 01:00:24 momjian Exp $
d16 1
a16 1
override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
@


1.52
log
@Make the locale location relocatable.

Adjust get_*_path functions to be limited to MAXPGPATH.
@
text
@d8 1
a8 1
# $PostgreSQL: pgsql-server/src/bin/pg_dump/Makefile,v 1.51 2004/05/24 01:01:37 momjian Exp $
d16 1
a16 1
override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS) -DFRONTEND
d20 1
a20 1
	dumputils.o exec.o
d33 2
a34 6
pg_dumpall: pg_dumpall.o dumputils.o exec.o $(libpq_builddir)/libpq.a
	$(CC) $(CFLAGS) pg_dumpall.o dumputils.o exec.o $(EXTRA_OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@@$(X)

# We need our own build of exec.c so it gets made with -DFRONTEND
exec.c: % : $(top_srcdir)/src/port/%
	rm -f $@@ && $(LN_S) $< .
d53 1
a53 1
	rm -f pg_dump$(X) pg_restore$(X) pg_dumpall$(X) $(OBJS) pg_dump.o common.o pg_dump_sort.o pg_restore.o pg_dumpall.o exec.c
@


1.51
log
@Remove a few $filter() calls that were not needed.
@
text
@d8 1
a8 1
# $PostgreSQL: pgsql-server/src/bin/pg_dump/Makefile,v 1.50 2004/05/22 02:14:28 tgl Exp $
d20 1
a20 2
	dumputils.o
PG_DUMPALL_OBJS = exec.o
d33 2
a34 2
pg_dumpall: pg_dumpall.o dumputils.o $(PG_DUMPALL_OBJS) $(libpq_builddir)/libpq.a
	$(CC) $(CFLAGS) pg_dumpall.o dumputils.o $(PG_DUMPALL_OBJS) $(EXTRA_OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@@$(X)
d57 1
a57 1
	rm -f pg_dump$(X) pg_restore$(X) pg_dumpall$(X) $(OBJS) $(PG_DUMPALL_OBJS) pg_dump.o common.o pg_dump_sort.o pg_restore.o pg_dumpall.o exec.c
@


1.50
log
@Clean up failure to remove exec.o on 'make clean'.
@
text
@d8 1
a8 1
# $PostgreSQL: pgsql-server/src/bin/pg_dump/Makefile,v 1.49 2004/05/19 17:15:20 momjian Exp $
d21 1
a21 1
PG_DUMPALL_OBJS = $(filter exec.o, $(LIBOBJS))
@


1.49
log
@Re-add elog() to exec.c, per Tom.
@
text
@d8 1
a8 1
# $PostgreSQL: pgsql-server/src/bin/pg_dump/Makefile,v 1.48 2004/05/18 20:18:58 momjian Exp $
d16 1
a16 1
override CPPFLAGS += -DFRONTEND
d21 1
a21 1
PG_DUMPALL_OBJS =	$(filter exec.o, $(LIBOBJS))
a24 2
override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)

d37 1
d58 1
a58 1
	rm -f pg_dump$(X) pg_restore$(X) pg_dumpall$(X) $(OBJS) pg_dump.o common.o pg_dump_sort.o pg_restore.o pg_dumpall.o exec.c
@


1.48
log
@Move find_my_exec() way up into main.c so it is available to the
timezone code and other places.

Remove elog() calls from find_my_exec;  do fprintf(stderr) instead.  We
can then remove the exec.c handling in the makefile because it doesn't
have to be built to suppress elog calls.
@
text
@d8 1
a8 1
# $PostgreSQL: pgsql-server/src/bin/pg_dump/Makefile,v 1.47 2004/05/11 21:57:14 momjian Exp $
d21 1
d36 5
a40 2
pg_dumpall: pg_dumpall.o dumputils.o $(libpq_builddir)/libpq.a
	$(CC) $(CFLAGS) pg_dumpall.o dumputils.o $(EXTRA_OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@@$(X)
d59 1
a59 1
	rm -f pg_dump$(X) pg_restore$(X) pg_dumpall$(X) $(OBJS) pg_dump.o common.o pg_dump_sort.o pg_restore.o pg_dumpall.o
@


1.47
log
@As part of the work for making relocatable installs, I have re-factored
all the code that looks for other binaries.  I move FindExec into
port/exec.c (and renamed it to find_my_binary()).  I also added
find_other_binary that looks for another binary in the same directory as
the calling program, and checks the version string.

The only behavior change was that initdb and pg_dump would look in the
hard-coded bindir directory if it can't find the requested binary in the
same directory as the caller.  The new code throws an error.  The old
behavior seemed too error prone for version mismatches.
@
text
@d8 1
a8 1
# $PostgreSQL: pgsql-server/src/bin/pg_dump/Makefile,v 1.46 2004/04/30 20:01:39 momjian Exp $
a20 1
PG_DUMPALL_OBJS =	$(filter exec.o, $(LIBOBJS))
d35 2
a36 5
pg_dumpall: pg_dumpall.o dumputils.o $(PG_DUMPALL_OBJS) $(libpq_builddir)/libpq.a
	$(CC) $(CFLAGS) pg_dumpall.o dumputils.o $(PG_DUMPALL_OBJS) $(EXTRA_OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@@$(X)

exec.c: % : $(top_srcdir)/src/port/%
	rm -f $@@ && $(LN_S) $< .
d55 1
a55 1
	rm -f pg_dump$(X) pg_restore$(X) pg_dumpall$(X) $(OBJS) pg_dump.o common.o pg_dump_sort.o pg_restore.o pg_dumpall.o exec.c
@


1.46
log
@Allow build of timezone database on unix.
@
text
@d8 1
a8 1
# $PostgreSQL: pgsql-server/src/bin/pg_dump/Makefile,v 1.45 2004/04/26 17:40:48 momjian Exp $
d21 1
d25 1
a25 1
override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS) -DBINDIR=\"$(bindir)\"
d36 5
a40 2
pg_dumpall: pg_dumpall.o dumputils.o $(libpq_builddir)/libpq.a
	$(CC) $(CFLAGS) pg_dumpall.o dumputils.o $(EXTRA_OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@@$(X)
d59 1
a59 5
	rm -f pg_dump$(X) pg_restore$(X) pg_dumpall$(X) $(OBJS) pg_dump.o common.o pg_dump_sort.o pg_restore.o pg_dumpall.o


# ensure that changes in bindir etc. propagate into object file
pg_dumpall.o: pg_dumpall.c $(top_builddir)/src/Makefile.global
@


1.45
log
@Add $(X) for cross-compiling.  Seems the mingw compiler running on
FreeBSD doesn't add .EXE to links.

Michiel Ephraim
@
text
@d8 1
a8 1
# $PostgreSQL: pgsql-server/src/bin/pg_dump/Makefile,v 1.44 2004/02/07 07:20:12 tgl Exp $
d15 2
@


1.44
log
@Add missing dependency, per Wade Klaver.
@
text
@d8 1
a8 1
# $PostgreSQL: pgsql-server/src/bin/pg_dump/Makefile,v 1.43 2003/12/23 21:56:21 tgl Exp $
d28 1
a28 1
	$(CC) $(CFLAGS) pg_dump.o common.o pg_dump_sort.o $(OBJS) $(EXTRA_OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@@
d31 1
a31 1
	$(CC) $(CFLAGS) pg_restore.o $(OBJS) $(EXTRA_OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@@
d34 1
a34 1
	$(CC) $(CFLAGS) pg_dumpall.o dumputils.o $(EXTRA_OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@@
@


1.43
log
@Fix a number of places where reconfiguring with a different installation
prefix would fail, because the new path did not get propagated to where
it needed to be.  Note this would fail even with --enable-depend.
@
text
@d8 1
a8 1
# $PostgreSQL: pgsql-server/src/bin/pg_dump/Makefile,v 1.42 2003/12/06 03:00:11 tgl Exp $
d33 1
a33 1
pg_dumpall: pg_dumpall.o $(libpq_builddir)/libpq.a
@


1.42
log
@Massive overhaul of pg_dump: make use of dependency information from
pg_depend to determine a safe dump order.  Defaults and check constraints
can be emitted either as part of a table or domain definition, or
separately if that's needed to break a dependency loop.  Lots of old
half-baked code for controlling dump order removed.
@
text
@d8 1
a8 1
# $PostgreSQL: pgsql-server/src/bin/pg_dump/Makefile,v 1.41 2003/11/29 19:52:04 pgsql Exp $
d54 4
@


1.41
log
@
$Header: -> $PostgreSQL Changes ...
@
text
@d8 1
a8 1
# $PostgreSQL: /cvsroot/pgsql-server/src/bin/pg_dump/Makefile,v 1.40 2003/08/08 04:52:21 momjian Exp $
d27 2
a28 2
pg_dump: pg_dump.o common.o $(OBJS) $(libpq_builddir)/libpq.a 
	$(CC) $(CFLAGS) pg_dump.o common.o $(OBJS) $(EXTRA_OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@@
d53 1
a53 1
	rm -f pg_dump$(X) pg_restore$(X) pg_dumpall$(X) $(OBJS) pg_dump.o common.o pg_restore.o pg_dumpall.o
@


1.40
log
@Move simple_prompt()/sprompt.c into /port.
@
text
@d8 1
a8 1
# $Header: /cvsroot/pgsql-server/src/bin/pg_dump/Makefile,v 1.39 2002/12/12 21:02:00 tgl Exp $
@


1.39
log
@Don't force rebuild of all of backend/parser when we only need
keywords.o.
@
text
@d8 1
a8 1
# $Header: /cvsroot/pgsql-server/src/bin/pg_dump/Makefile,v 1.38 2002/08/27 18:57:26 petere Exp $
d16 3
a18 3
OBJS= pg_backup_archiver.o pg_backup_db.o pg_backup_custom.o \
      pg_backup_files.o pg_backup_null.o pg_backup_tar.o \
      sprompt.o dumputils.o
d34 1
a34 1
	$(CC) $(CFLAGS) pg_dumpall.o dumputils.o sprompt.o $(EXTRA_OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@@
@


1.38
log
@Reimplement pg_dumpall in C.  Currently no change in functionality,
except that it's more robust, reconnects less often, and is NLS'ed.
@
text
@d8 1
a8 1
# $Header: /cvsroot/pgsql-server/src/bin/pg_dump/Makefile,v 1.37 2002/08/18 09:36:25 petere Exp $
d38 1
a38 1
	$(MAKE) -C $(top_builddir)/src/backend/parser
@


1.37
log
@Make pg_dump output more portable and more pleasing to look at.

The -n and -N options were removed.  Quoting is now smart enough to
supply quotes if and only if necessary.

Numerical types are now printed without quotes, except in cases of
special values such as NaN.

Boolean values printed as true and false.

Most string literals now do not escape whitespace characters (newlines,
etc.) for portability.

SET SESSION AUTHORIZATION argument is a string literal, to follow SQL.

Made commands output by pg_dump use consistent spacing and indentation.
@
text
@d8 1
a8 1
# $Header: /cvsroot/pgsql-server/src/bin/pg_dump/Makefile,v 1.36 2002/07/27 20:10:05 petere Exp $
d17 2
a18 1
      pg_backup_files.o pg_backup_null.o pg_backup_tar.o sprompt.o
d22 1
a22 1
override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
d33 2
a34 6
pg_dumpall: pg_dumpall.sh
	sed -e 's,@@VERSION@@,$(VERSION),g' \
	    -e 's,@@MULTIBYTE@@,$(MULTIBYTE),g' \
	    -e 's,@@bindir@@,$(bindir),g' \
	  $< >$@@
	chmod a+x $@@
d44 1
a44 1
	$(INSTALL_SCRIPT) pg_dumpall $(DESTDIR)$(bindir)/pg_dumpall
d50 1
a50 1
	rm -f $(addprefix $(DESTDIR)$(bindir)/, pg_dump$(X) pg_restore$(X) pg_dumpall)
d53 1
a53 1
	rm -f pg_dump$(X) pg_restore$(X) $(OBJS) pg_dump.o common.o pg_restore.o pg_dumpall
@


1.36
log
@Assemble portability modules into libpgport library.
Some makefile simplifications.
@
text
@d8 1
a8 1
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.35 2002/07/15 21:34:05 momjian Exp $
d19 2
d23 2
a24 1
all: submake-libpq submake-libpgport pg_dump pg_restore pg_dumpall
d27 1
a27 1
	$(CC) $(CFLAGS) pg_dump.o common.o $(OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@@
d30 1
a30 1
	$(CC) $(CFLAGS) pg_restore.o $(OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@@
d38 5
@


1.35
log
@Remove certain Makefile dependencies by using full pathnames in
configure.in.
@
text
@d8 1
a8 1
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.34 2002/07/06 20:12:30 momjian Exp $
d17 1
a17 2
      pg_backup_files.o pg_backup_null.o pg_backup_tar.o sprompt.o \
      $(STRDUP) $(STRTOUL)
d21 1
a21 1
all: submake pg_dump pg_restore pg_dumpall
a35 4
.PHONY: submake
submake:
	$(MAKE) -C $(libpq_builddir) all

a46 3
depend dep:
	$(CC) -MM $(CFLAGS) *.c >depend

a48 4

ifeq (depend,$(wildcard depend))
include depend
endif
@


1.34
log
@Move simple_prompt() into its own file to be shared with psql and pg_dump.
@
text
@d8 1
a8 1
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.33 2002/06/20 20:29:41 momjian Exp $
d17 2
a18 15
      pg_backup_files.o pg_backup_null.o pg_backup_tar.o sprompt.o

ifdef STRDUP
OBJS+=$(top_builddir)/src/utils/strdup.o

$(top_builddir)/src/utils/strdup.o:
	$(MAKE) -C $(top_builddir)/src/utils strdup.o
endif

ifdef STRTOUL
OBJS+=$(top_builddir)/src/backend/port/strtoul.o

$(top_builddir)/src/backend/port/strtoul.o:
	$(MAKE) -C $(top_builddir)/src/backend/port strtoul.o
endif
@


1.33
log
@Update copyright to 2002.
@
text
@d8 1
a8 1
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.32 2002/01/15 05:05:49 tgl Exp $
d16 2
a17 2
OBJS= pg_backup_archiver.o pg_backup_db.o pg_backup_custom.o pg_backup_files.o \
       pg_backup_null.o pg_backup_tar.o
@


1.32
log
@pg_upgrade doesn't live here anymore.  Remove dangling references.
@
text
@d5 1
a5 1
# Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
d8 1
a8 1
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.31 2001/03/24 13:21:14 petere Exp $
@


1.31
log
@Disable pg_upgrade.
@
text
@d8 1
a8 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.30 2001/02/27 08:13:28 ishii Exp $
a57 1
#	$(INSTALL_SCRIPT) $(srcdir)/pg_upgrade $(DESTDIR)$(bindir)/pg_upgrade
d63 1
a63 1
	rm -f $(addprefix $(DESTDIR)$(bindir)/, pg_dump$(X) pg_restore$(X) pg_dumpall pg_upgrade)
@


1.30
log
@Massive commits for SunOS4 port.
@
text
@d8 1
a8 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.29 2001/02/20 19:20:28 petere Exp $
d58 1
a58 1
	$(INSTALL_SCRIPT) $(srcdir)/pg_upgrade $(DESTDIR)$(bindir)/pg_upgrade
@


1.29
log
@Make sure -L and -I's for our source tree are always before system include
or library directories on the command line.
@
text
@d8 1
a8 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.28 2001/02/18 18:33:59 momjian Exp $
d17 15
a31 1
       pg_backup_null.o pg_backup_tar.o $(STRDUP)
a41 3

../../utils/strdup.o:
	$(MAKE) -C ../../utils strdup.o
@


1.28
log
@Add copyright mentions, per Tom Lane.
@
text
@d8 1
a8 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.27 2000/11/30 20:36:11 petere Exp $
d19 1
a19 1
override CPPFLAGS+= -I$(libpq_srcdir)
d24 1
a24 1
	$(CC) $(CFLAGS) $(LDFLAGS) pg_dump.o common.o $(OBJS) $(libpq) $(LIBS) -o $@@
d27 1
a27 1
	$(CC) $(CFLAGS) $(LDFLAGS) pg_restore.o $(OBJS) $(libpq) $(LIBS) -o $@@
@


1.27
log
@Make all commands that link a program look like

$(CC) $(CFLAGS) $(LDFLAGS) <object files> <extra-libraries> $(LIBS) -o $@@

This form seemed to be the most portable, readable, and logical, but in any
case it's better than having a dozen different ones in the tree.
@
text
@d5 2
a6 1
# Copyright (c) 1994, Regents of the University of California
d8 1
a8 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.26 2000/10/20 21:03:56 petere Exp $
@


1.26
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
@d7 1
a7 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.25 2000/09/17 13:02:36 petere Exp $
d23 1
a23 1
	$(CC) $(CFLAGS) -o $@@ pg_dump.o common.o $(OBJS) $(libpq) $(LDFLAGS)
d26 1
a26 1
	$(CC) $(CFLAGS) -o $@@ pg_restore.o $(OBJS) $(libpq) $(LDFLAGS)
@


1.25
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
@d7 1
a7 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.24 2000/09/08 18:29:27 petere Exp $
d18 1
a18 2
CPPFLAGS+= -I$(libpq_srcdir)
LIBS+= -lz
d46 1
a46 1
	$(INSTALL_SCRIPT) pg_upgrade $(DESTDIR)$(bindir)/pg_upgrade
@


1.24
log
@Make building scripts kind of consistent in look and feel, kind of immune
to parallel make, kind of resistent to corruption due to incomplete builds.
@
text
@d7 1
a7 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.23 2000/08/31 16:11:13 petere Exp $
d44 4
a47 4
	$(INSTALL_PROGRAM) pg_dump$(X) $(bindir)/pg_dump$(X)
	$(INSTALL_PROGRAM) pg_restore$(X) $(bindir)/pg_restore$(X)
	$(INSTALL_SCRIPT) pg_dumpall $(bindir)/pg_dumpall
	$(INSTALL_SCRIPT) pg_upgrade $(bindir)/pg_upgrade
d50 1
a50 1
	$(mkinstalldirs) $(bindir)
d53 1
a53 1
	rm -f $(addprefix $(bindir)/, pg_dump$(X) pg_restore$(X) pg_dumpall pg_upgrade)
@


1.23
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
@d7 1
a7 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.22 2000/08/01 15:51:44 pjw Exp $
d33 5
a37 4
	sed -e 's:__VERSION__:$(VERSION):g' \
	    -e 's:__MULTIBYTE__:$(MULTIBYTE):g' \
	    -e 's:__bindir__:$(bindir):g' \
	  < $< > $@@
@


1.22
log
@- Added --create, --no-owner, --superuser, --no-reconnect (pg_dump & pg_restore)
- Added code to dump 'Create Schema' statement (pg_dump)
- Don't bother to disable/enable triggers if we don't have a superuser (pg_restore)
- Cleaned up code for reconnecting to database.
- Force a reconnect as superuser before enabling/disabling triggers.
- Added & Removed --throttle (pg_dump)
- Fixed minor bug in language dumping code: expbuffres were not being reset.
- Fixed version number initialization in _allocAH (pg_backup_archiver.c)
- Added second connection when restoring BLOBs to allow temp. table to survive
  (db reconnection causes temp tables to be lost).
@
text
@d7 1
a7 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.19 2000/07/04 19:52:00 petere Exp $
d13 1
a13 1
include ../../Makefile.global
d18 1
a18 1
CFLAGS+= -I$(LIBPQDIR)
d23 2
a24 2
pg_dump: pg_dump.o common.o $(OBJS) $(LIBPQDIR)/libpq.a 
	$(CC) $(CFLAGS) -o $@@ pg_dump.o common.o $(OBJS) $(LIBPQ) $(LDFLAGS)
d26 2
a27 2
pg_restore: pg_restore.o $(OBJS) $(LIBPQDIR)/libpq.a
	$(CC) $(CFLAGS) -o $@@ pg_restore.o $(OBJS) $(LIBPQ) $(LDFLAGS)
d40 1
a40 1
	$(MAKE) -C $(LIBPQDIR) all
@


1.21
log
@- no longer put ACLs at end of dump
- connect as appropriate user in pg_restore with db connection
- dump owner of rule in pg_dump
@
text
@@


1.20
log
@- Support for BLOB output from pg_dump and input via pg_restore
- Support for direct DB connection in pg_restore
- Fixes in support for --insert flag
- pg_dump now outputs in modified OID order
- various other bug fixes
@
text
@@


1.19
log
@Fix broken pg_dump makefile
@
text
@d7 1
a7 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.18 2000/07/04 14:25:26 momjian Exp $
d15 2
a16 2
OBJS= pg_backup_archiver.o pg_backup_custom.o pg_backup_files.o \
       pg_backup_plain_text.o $(STRDUP)
@


1.18
log
@pg_dump patch from Philip Warner
@
text
@d7 1
a7 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.16 2000/06/28 18:29:16 petere Exp $
d19 1
a19 1
LDFLAGS+= -lz
d21 1
a21 1
all: submake pg_dump$(X) pg_restore$(X)
d23 1
a23 1
pg_dump$(X): pg_dump.o common.o $(OBJS) $(LIBPQDIR)/libpq.a 
d26 1
a26 1
pg_restore$(X): pg_restore.o $(OBJS) $(LIBPQDIR)/libpq.a
d32 6
d52 1
a52 1
	rm -f $(addprefix $(bindir)/, pg_dump$(X) pg_dumpall pg_upgrade)
d58 1
a58 1
	rm -f pg_dump$(X) pg_restore$(X) $(OBJS) pg_dump.o common.o pg_restore.o
@


1.17
log
@Have pg_dumpall write CREATE USER and CREATE GROUP commands instead of raw
COPYs of pg_shadow and pg_group.

It also turns out that pg_dumpall was all but broken for multiple servers
running at non-standard port numbers. You might get the users and groups
from one server and the databases from another. Fixed that.

A little user interface and code cleanup along with that. This also takes
care of the portability bug discussed in "[BUGS] pg_dumpall" in March 2000.
@
text
@d15 2
a16 1
OBJS= pg_dump.o common.o $(STRDUP)
d19 1
d21 1
d23 2
a24 1
all: submake pg_dump pg_dumpall
d26 2
a27 8
pg_dump: $(OBJS) $(LIBPQDIR)/libpq.a
	$(CC) $(CFLAGS) -o $@@ $(OBJS) $(LIBPQ) $(LDFLAGS)

pg_dumpall: pg_dumpall.sh
	sed -e 's:__VERSION__:$(VERSION):g' \
	    -e 's:__MULTIBYTE__:$(MULTIBYTE):g' \
	    -e 's:__bindir__:$(bindir):g' \
	  < $< > $@@
d38 1
d52 1
a52 1
	rm -f pg_dump$(X) $(OBJS) pg_dumpall
@


1.16
log
@Makefile cleanup for interface tree. Now essentially with all the
standard targets and behaviour. Replaced Makefile.in's with
Makefile's and declared the respective variables in Makefile.global.

maintainer-clean target now available at top level, although it does
not work in the backend tree yet.

Cleanup pass over Makefile.shlib, renamed some targets and variables.
The shared library symlink tests are now done by make, not the shell.

ecpg: Remove one warning in sloppy flex output.

PL/Perl and Perl interface: the MakeMaker documentation is confusing,
the realclean target *does* "delete derived files", but it also
uninstalls them. Don't use that.

The submake targets in the various bin directories that update libpq
should `make all', not `make libpq.a'. That is a) unportable, and
b) doesn't build the shared library.
@
text
@d7 1
a7 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.15 2000/06/27 00:31:12 petere Exp $
d20 1
a20 1
all: submake pg_dump$(X)
d22 1
a22 1
pg_dump$(X): $(OBJS) $(LIBPQDIR)/libpq.a
d25 6
d53 1
a53 1
	rm -f pg_dump$(X) $(OBJS) 
@


1.15
log
@Makefile cleanup for bin and pl subtrees. They should now support
all the standard semantics. Also get rid of Makefile.in's on the
way and instead declare all variables in Makefile.global.
@
text
@d7 1
a7 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/bin/pg_dump/Makefile.in,v 1.14 2000/06/17 00:09:44 petere Exp $
d30 1
a30 1
	$(MAKE) -C $(LIBPQDIR) libpq.a
@


1.14
log
@Various fixes suggested by Gregor Hoffleit

Add a check to configure for strdup
Remove all the '-ltermcap' checks from psql/Makefile
Have {psql,pg_dump}/Makefile modified if strdup doesn't exist on the system
@
text
@d3 1
a3 2
# Makefile.inc--
#    Makefile for bin/pg_dump
d7 1
a7 3
#
# IDENTIFICATION
#    $Header: /usr/local/cvsroot/postgres95/src/bin/pg_dump/Makefile,v 1.13 1997/02/06 02:31:05 momjian Exp scrappy $
d11 2
a12 1
SRCDIR= ../..
a13 1
include ../Makefile.global
d15 3
a17 1
OBJS= pg_dump.o common.o
a18 3
ifeq ($(PORTNAME), ultrix4)
OBJS+= ../../utils/strdup.o
endif
d20 1
a20 1
all: submake pg_dump
d22 2
a23 2
pg_dump: $(OBJS) $(LIBPQDIR)/libpq.a
	$(CC) $(LDFLAGS) -o pg_dump -L$(LIBPQDIR) $(OBJS) -lpq $(LD_ADD)
d32 10
a41 3
install: pg_dump
	$(INSTALL) $(INSTL_EXE_OPTS) pg_dump $(DESTDIR)$(BINDIR)/pg_dump
	$(INSTALL) $(INSTL_EXE_OPTS) pg_dumpall $(DESTDIR)$(BINDIR)/pg_dumpall
d44 1
a44 1
	$(CC) -MM $(INCLUDE_OPT) *.c >depend
d46 2
a47 2
clean: 
	rm -f pg_dump $(OBJS) 
@


1.13
log
@Include main Makefile.global first so variables are not over-written.
@
text
@d10 1
a10 1
#    $Header: /usr/local/cvsroot/postgres95/src/bin/pg_dump/Makefile,v 1.12 1997/01/16 15:28:21 momjian Exp $
@


1.12
log
@Added pg_dumpall to source tree.
@
text
@d10 1
a10 1
#    $Header: /usr/local/cvsroot/postgres95/src/bin/pg_dump/Makefile,v 1.11 1996/11/28 03:31:27 bryanh Exp $
d15 1
a16 1
include ../../Makefile.global
@


1.11
log
@Make strdup work for Ultrix.  Thanks Erik Bertelsen
@
text
@d10 1
a10 1
#    $Header: /usr/local/cvsroot/postgres95/src/bin/pg_dump/Makefile,v 1.10 1996/11/26 07:38:16 bryanh Exp $
d38 1
@


1.10
log
@Whoops, redo Ultrix patch so the other ports still compile.
@
text
@d10 1
a10 1
#    $Header: /usr/local/cvsroot/postgres95/src/bin/pg_dump/Makefile,v 1.9 1996/11/26 03:19:36 bryanh Exp $
d30 1
a30 1
	$(MAKE) -C ../../utils/strdup.o
@


1.9
log
@Make it compile on Ultrix.  Thanks Erik Bertelson.
@
text
@d10 1
a10 1
#    $Header: /usr/local/cvsroot/postgres95/src/bin/pg_dump/Makefile,v 1.8 1996/11/12 06:10:37 bryanh Exp $
d18 1
a18 1
CFLAGS+= -I../../backend/port/${PORTNAME}
d20 3
a22 1
OBJS= pg_dump.o common.o
d28 3
@


1.8
log
@Add dependency for install.
@
text
@d10 1
a10 1
#    $Header: /usr/local/cvsroot/postgres95/src/bin/pg_dump/Makefile,v 1.6 1996/10/31 05:56:01 momjian Exp $
d17 2
@


1.7
log
@Makefile simplification: the "bin" chapter
@
text
@d29 1
a29 1
install:
@


1.6
log
@Added needed include file.
@
text
@d10 1
a10 1
#    $Header: /usr/local/cvsroot/postgres95/src/bin/pg_dump/Makefile,v 1.5 1996/07/31 18:59:00 scrappy Exp $
d14 7
a20 1
PROG=	pg_dump
d22 6
a27 3
MKDIR=	../../mk
include $(MKDIR)/postgres.mk
include ../Makefile.global
d29 2
a30 1
CFLAGS+= -I../../backend/port/$(PORTNAME)
d32 2
a33 1
SRCS=	pg_dump.c common.c
d35 2
a36 1
include $(MKDIR)/postgres.prog.mk
d38 3
@


1.5
log
@Move port includes from bin/pg_dump/Makefile to Makefile.global
@
text
@d10 1
a10 1
#    $Header: /usr/local/cvsroot/postgres95/src/bin/pg_dump/Makefile,v 1.4 1996/07/31 17:35:13 scrappy Exp $
d19 2
@


1.4
log
@Fix for <machine.h> bug

Submitted by: Bruce
@
text
@d10 1
a10 1
#    $Header: /usr/local/cvsroot/postgres95/src/bin/pg_dump/Makefile,v 1.3 1996/07/22 08:36:57 scrappy Exp $
d19 1
a19 1
CFLAGS += -I ../../backend/port/$(PORTNAME)
@


1.3
log
@Brought in David Bennett's (dave@@bensoft.com) changes to pg_dump
@
text
@d10 1
a10 1
#    $Header: /usr/local/devel/pglite/cvs/src/bin/pg_dump/Makefile,v 1.4 1996/02/24 01:13:09 jolly Exp $
d19 1
a19 1

@


1.2
log
@Brought in extensions to pg_dump

Submitted by: david bennett <dave@@bensoft.com>
	      marc g. fournier <scrappy@@ki.net>
@
text
@@


1.1
log
@Initial revision
@
text
@d10 1
a10 1
#    $Header: /usr/local/cvsroot/postgres95/postgres95/src/bin/pg_dump/Makefile,v 1.1.1.1 1996/07/09 05:32:35 scrappy Exp $
@


1.1.1.1
log
@Postgres95 1.01 Distribution - Virgin Sources
@
text
@@
