head	1.39;
access;
symbols
	REL9_0_0:1.39
	REL9_1_ALPHA1:1.39
	REL9_0_RC1:1.39
	REL9_0_BETA4:1.39
	REL9_0_STABLE:1.39.0.2
	REL9_0_BETA3:1.39
	REL9_0_BETA2:1.38
	REL7_4_29:1.8
	REL8_0_25:1.21.4.2
	REL8_1_21:1.29.2.2
	REL8_2_17:1.33
	REL8_3_11:1.35
	REL8_4_4:1.37
	REL9_0_BETA1:1.38
	REL9_0_ALPHA5_BRANCH:1.38.0.8
	REL9_0_ALPHA5:1.38
	REL7_4_28:1.8
	REL8_0_24:1.21.4.2
	REL8_1_20:1.29.2.2
	REL8_2_16:1.33
	REL8_3_10:1.35
	REL8_4_3:1.37
	REL9_0_ALPHA4:1.38
	REL9_0_ALPHA4_BRANCH:1.38.0.6
	REL8_5_ALPHA3:1.38
	REL8_5_ALPHA3_BRANCH:1.38.0.4
	REL7_4_27:1.8
	REL8_0_23:1.21.4.2
	REL8_1_19:1.29.2.2
	REL8_2_15:1.33
	REL8_3_9:1.35
	REL8_4_2:1.37
	REL8_5_ALPHA2:1.38
	REL8_5_ALPHA2_BRANCH:1.38.0.2
	REL7_4_26:1.8
	REL8_0_22:1.21.4.2
	REL8_1_18:1.29.2.2
	REL8_2_14:1.33
	REL8_3_8:1.35
	REL8_4_1:1.37
	REL8_5_ALPHA1:1.37
	REL8_5_ALPHA1_BRANCH:1.37.0.4
	REL8_4_STABLE:1.37.0.2
	REL8_4_0:1.37
	REL8_4_RC2:1.37
	REL8_4_RC1:1.37
	REL8_4_BETA2:1.37
	REL8_4_BETA1:1.37
	REL7_4_25:1.8
	REL8_0_21:1.21.4.2
	REL8_1_17:1.29.2.2
	REL8_2_13:1.33
	REL8_3_7:1.35
	REL7_4_24:1.8
	REL8_0_20:1.21.4.2
	REL8_1_16:1.29.2.2
	REL8_2_12:1.33
	REL8_3_6:1.35
	REL7_4_23:1.8
	REL8_0_19:1.21.4.2
	REL8_1_15:1.29.2.2
	REL8_2_11:1.33
	REL8_3_5:1.35
	REL7_4_22:1.8
	REL8_0_18:1.21.4.2
	REL8_1_14:1.29.2.2
	REL8_2_10:1.33
	REL8_3_4:1.35
	REL7_4_21:1.8
	REL8_0_17:1.21.4.2
	REL8_1_13:1.29.2.2
	REL8_2_9:1.33
	REL8_3_3:1.35
	REL7_4_20:1.8
	REL8_0_16:1.21.4.2
	REL8_1_12:1.29.2.2
	REL8_2_8:1.33
	REL8_3_2:1.35
	REL8_2_7:1.33
	REL8_3_1:1.35
	REL8_3_STABLE:1.35.0.2
	REL8_3_0:1.35
	REL8_3_RC2:1.35
	REL7_3_21:1.3
	REL7_4_19:1.8
	REL8_0_15:1.21.4.2
	REL8_1_11:1.29.2.2
	REL8_2_6:1.33
	REL8_3_RC1:1.35
	REL8_3_BETA4:1.35
	REL8_3_BETA3:1.35
	REL8_3_BETA2:1.35
	REL8_3_BETA1:1.35
	REL7_3_20:1.3
	REL7_4_18:1.8
	REL8_0_14:1.21.4.2
	REL8_1_10:1.29.2.2
	REL8_2_5:1.33
	REL7_3_19:1.3
	REL7_4_17:1.8
	REL8_0_13:1.21.4.2
	REL8_1_9:1.29.2.2
	REL8_2_4:1.33
	REL8_0_12:1.21.4.2
	REL8_1_8:1.29.2.2
	REL8_2_3:1.33
	REL7_3_18:1.3
	REL7_4_16:1.8
	REL8_0_11:1.21.4.2
	REL8_1_7:1.29.2.2
	REL8_2_2:1.33
	REL8_0_10:1.21.4.2
	REL8_1_6:1.29.2.2
	REL8_2_1:1.33
	REL7_4_15:1.8
	REL7_3_17:1.3
	REL8_2_STABLE:1.33.0.2
	REL8_2_0:1.33
	REL8_2_RC1:1.33
	REL8_2_BETA3:1.33
	REL8_2_BETA2:1.33
	REL8_1_5:1.29.2.2
	REL8_0_9:1.21.4.2
	REL7_4_14:1.8
	REL7_3_16:1.3
	REL8_2_BETA1:1.33
	REL7_3_15:1.3
	REL7_4_13:1.8
	REL8_0_8:1.21.4.1
	REL8_1_4:1.29.2.1
	REL7_3_14:1.3
	REL7_4_12:1.8
	REL8_0_7:1.21
	REL8_1_3:1.29
	REL7_3_13:1.3
	REL7_4_11:1.8
	REL8_0_6:1.21
	REL8_1_2:1.29
	REL7_3_12:1.3
	REL7_4_10:1.8
	REL8_0_5:1.21
	REL8_1_1:1.29
	REL8_1_STABLE:1.29.0.2
	REL8_1_0:1.29
	REL8_1_0RC1:1.29
	REL8_1_0BETA4:1.29
	REL8_1_0BETA3:1.29
	REL7_3_11:1.3
	REL7_4_9:1.8
	REL8_0_4:1.21
	REL8_1_0BETA2:1.28
	REL8_1_0BETA1:1.28
	REL7_3_10:1.3
	REL7_4_8:1.8
	REL8_0_3:1.21
	REL8_0_2:1.21
	REL7_3_9:1.3
	REL7_4_7:1.8
	REL8_0_1:1.21
	REL8_0_STABLE:1.21.0.4
	REL8_0_0:1.21.0.2
	REL8_0_0RC5:1.21
	REL8_0_0RC4:1.21
	REL8_0_0RC3:1.21
	REL8_0_0RC2:1.21
	REL8_0_0RC1:1.21
	REL8_0_0BETA5:1.21
	REL8_0_0BETA4:1.20
	REL7_4_6:1.8
	REL7_3_8:1.3
	REL8_0_0BETA3:1.18
	REL8_0_0BETA2:1.18
	REL7_4_5:1.8
	REL7_3_7:1.3
	REL7_4_4:1.8
	REL8_0_0BETA1:1.16
	REL7_4_3:1.8
	REL7_4_2:1.8
	REL7_3_6:1.3
	REL7_4_1:1.8
	REL7_3_5:1.3
	REL7_4:1.8
	REL7_4_RC2:1.8
	REL7_4_STABLE:1.8.0.2
	REL7_4_RC1:1.8
	REL7_4_BETA5:1.7
	REL7_4_BETA4:1.7
	REL7_4_BETA3:1.6
	REL7_4_BETA2:1.6
	WIN32_DEV:1.6.0.2
	REL7_4_BETA1:1.4
	REL7_3_4:1.3
	REL7_3_2:1.3
	REL7_3_STABLE:1.3.0.2;
locks; strict;
comment	@# @;


1.39
date	2010.07.02.17.03.30;	author rhaas;	state Exp;
branches;
next	1.38;

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

1.37
date	2008.11.25.18.19.31;	author tgl;	state Exp;
branches
	1.37.2.1;
next	1.36;

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

1.35
date	2007.09.28.22.25.49;	author tgl;	state Exp;
branches;
next	1.34;

1.34
date	2007.02.09.15.56.00;	author petere;	state Exp;
branches;
next	1.33;

1.33
date	2006.07.14.16.45.43;	author tgl;	state Exp;
branches;
next	1.32;

1.32
date	2006.06.26.18.40.50;	author momjian;	state Exp;
branches;
next	1.31;

1.31
date	2006.05.08.02.18.50;	author momjian;	state Exp;
branches;
next	1.30;

1.30
date	2005.12.09.21.19.36;	author petere;	state Exp;
branches;
next	1.29;

1.29
date	2005.09.27.17.39.35;	author tgl;	state Exp;
branches
	1.29.2.1;
next	1.28;

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

1.27
date	2005.08.12.19.43.31;	author momjian;	state Exp;
branches;
next	1.26;

1.26
date	2005.08.12.19.42.45;	author momjian;	state Exp;
branches;
next	1.25;

1.25
date	2005.03.20.03.53.39;	author momjian;	state Exp;
branches;
next	1.24;

1.24
date	2005.03.20.02.44.45;	author momjian;	state Exp;
branches;
next	1.23;

1.23
date	2005.03.20.02.40.28;	author momjian;	state Exp;
branches;
next	1.22;

1.22
date	2005.03.20.02.39.33;	author momjian;	state Exp;
branches;
next	1.21;

1.21
date	2004.10.27.11.51.40;	author neilc;	state Exp;
branches
	1.21.4.1;
next	1.20;

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

1.19
date	2004.10.04.13.43.58;	author momjian;	state Exp;
branches;
next	1.18;

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

1.17
date	2004.08.20.20.13.10;	author momjian;	state Exp;
branches;
next	1.16;

1.16
date	2004.08.01.06.56.39;	author momjian;	state Exp;
branches;
next	1.15;

1.15
date	2004.05.30.14.07.47;	author momjian;	state Exp;
branches;
next	1.14;

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

1.13
date	2004.05.22.02.15.08;	author tgl;	state Exp;
branches;
next	1.12;

1.12
date	2004.05.21.20.56.50;	author tgl;	state Exp;
branches;
next	1.11;

1.11
date	2004.05.17.14.35.34;	author momjian;	state Exp;
branches;
next	1.10;

1.10
date	2004.04.23.18.15.55;	author momjian;	state Exp;
branches;
next	1.9;

1.9
date	2003.11.29.19.52.13;	author pgsql;	state Exp;
branches;
next	1.8;

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

1.7
date	2003.09.27.15.32.48;	author momjian;	state Exp;
branches;
next	1.6;

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

1.5
date	2003.08.08.02.55.08;	author momjian;	state Exp;
branches;
next	1.4;

1.4
date	2003.06.14.14.35.42;	author momjian;	state Exp;
branches;
next	1.3;

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

1.2
date	2002.07.19.17.35.11;	author momjian;	state Exp;
branches;
next	1.1;

1.1
date	2002.07.18.04.13.59;	author momjian;	state Exp;
branches;
next	;

1.21.4.1
date	2006.05.08.02.18.21;	author momjian;	state Exp;
branches;
next	1.21.4.2;

1.21.4.2
date	2006.07.14.16.45.55;	author tgl;	state Exp;
branches;
next	;

1.29.2.1
date	2006.05.08.02.18.59;	author momjian;	state Exp;
branches;
next	1.29.2.2;

1.29.2.2
date	2006.07.14.16.45.48;	author tgl;	state Exp;
branches;
next	;

1.37.2.1
date	2010.07.02.17.03.38;	author rhaas;	state Exp;
branches;
next	;


desc
@@


1.39
log
@Move copydir.c from src/port to src/backend/storage/file

The previous commit to make copydir() interruptible prevented
postgres.exe from linking on MinGW and Cygwin, because on those
platforms libpgport_srv.a can't freely reference symbols defined
by the backend.  Since that code is already backend-specific anyway,
just move the whole file into the backend rather than adding further
kludges to deal with the symbols needed by CHECK_FOR_INTERRUPTS().

This probably needs some further cleanup, but this commit just moves
the file as-is, which should hopefully be enough to turn the
buildfarm green again.
@
text
@#-------------------------------------------------------------------------
#
# Makefile
#    Makefile for the port-specific subsystem of the backend
#
# These files are used in other directories for portability on systems
# with broken/missing library files, and for common code sharing.
#
# This makefile generates two outputs:
#
#	libpgport.a - contains object files with FRONTEND defined,
#		for use by client application and libraries
#
#	libpgport_srv.a - contains object files without FRONTEND defined,
#		for use only by the backend binaries
#
# LIBOBJS is set by configure (via Makefile.global) to be the list of
# object files that are conditionally needed as determined by configure's probing.
# OBJS adds additional object files that are always compiled.
#
# IDENTIFICATION
#    $PostgreSQL: pgsql/src/port/Makefile,v 1.38 2009/08/26 22:24:43 petere Exp $
#
#-------------------------------------------------------------------------

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

override CPPFLAGS := -I$(top_builddir)/src/port -DFRONTEND $(CPPFLAGS)
LIBS += $(PTHREAD_LIBS)

OBJS = $(LIBOBJS) chklocale.o dirmod.o exec.o noblock.o path.o \
	pgsleep.o pgstrcasecmp.o qsort.o qsort_arg.o sprompt.o thread.o
ifneq (,$(filter $(PORTNAME),cygwin win32))
OBJS += pipe.o
endif

# foo_srv.o and foo.o are both built from foo.c, but only foo.o has -DFRONTEND
OBJS_SRV = $(OBJS:%.o=%_srv.o)

all: libpgport.a libpgport_srv.a

# libpgport is needed by some contrib
install: all installdirs
	$(INSTALL_STLIB) libpgport.a '$(DESTDIR)$(libdir)/libpgport.a'

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

uninstall:
	rm -f '$(DESTDIR)$(libdir)/libpgport.a'

libpgport.a: $(OBJS)
	$(AR) $(AROPT) $@@ $^

# thread.o needs PTHREAD_CFLAGS (but thread_srv.o does not)
thread.o: thread.c
	$(CC) $(CFLAGS) $(CPPFLAGS) $(PTHREAD_CFLAGS) -c $<

#
# Server versions of object files
#

libpgport_srv.a: $(OBJS_SRV)
	$(AR) $(AROPT) $@@ $^

%_srv.o: %.c
	$(CC) $(CFLAGS) $(subst -DFRONTEND,, $(CPPFLAGS)) -c $< -o $@@

# Dependency is to ensure that path changes propagate

path.o: path.c pg_config_paths.h

path_srv.o: path.c pg_config_paths.h

# We create a separate file rather than put these in pg_config.h
# because many of these values come from makefiles and are not
# available to configure.
pg_config_paths.h: $(top_builddir)/src/Makefile.global
	echo "#define PGBINDIR \"$(bindir)\"" >$@@
	echo "#define PGSHAREDIR \"$(datadir)\"" >>$@@
	echo "#define SYSCONFDIR \"$(sysconfdir)\"" >>$@@
	echo "#define INCLUDEDIR \"$(includedir)\"" >>$@@
	echo "#define PKGINCLUDEDIR \"$(pkgincludedir)\"" >>$@@
	echo "#define INCLUDEDIRSERVER \"$(includedir_server)\"" >>$@@
	echo "#define LIBDIR \"$(libdir)\"" >>$@@
	echo "#define PKGLIBDIR \"$(pkglibdir)\"" >>$@@
	echo "#define LOCALEDIR \"$(localedir)\"" >>$@@
	echo "#define DOCDIR \"$(docdir)\"" >>$@@
	echo "#define HTMLDIR \"$(htmldir)\"" >>$@@
	echo "#define MANDIR \"$(mandir)\"" >>$@@

clean distclean maintainer-clean:
	rm -f libpgport.a libpgport_srv.a $(OBJS) $(OBJS_SRV) pg_config_paths.h
@


1.38
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
@d22 1
a22 1
#    $PostgreSQL: pgsql/src/port/Makefile,v 1.37 2008/11/25 18:19:31 tgl Exp $
d33 1
a33 1
OBJS = $(LIBOBJS) chklocale.o copydir.o dirmod.o exec.o noblock.o path.o \
@


1.37
log
@Omit src/port/pipe.c on non-Windows platforms.  It's useless and draws
complaints about empty object files on some platforms, eg Darwin.
@
text
@d22 1
a22 1
#    $PostgreSQL: pgsql/src/port/Makefile,v 1.36 2008/02/18 14:51:48 petere Exp $
d49 1
a49 1
	$(mkinstalldirs) '$(DESTDIR)$(libdir)'
@


1.37.2.1
log
@Move copydir.c from src/port to src/backend/storage/file

The previous commit to make copydir() interruptible prevented
postgres.exe from linking on MinGW and Cygwin, because on those
platforms libpgport_srv.a can't freely reference symbols defined
by the backend.  Since that code is already backend-specific anyway,
just move the whole file into the backend rather than adding further
kludges to deal with the symbols needed by CHECK_FOR_INTERRUPTS().

This probably needs some further cleanup, but this commit just moves
the file as-is, which should hopefully be enough to turn the
buildfarm green again.
@
text
@d22 1
a22 1
#    $PostgreSQL: pgsql/src/port/Makefile,v 1.37 2008/11/25 18:19:31 tgl Exp $
d33 1
a33 1
OBJS = $(LIBOBJS) chklocale.o dirmod.o exec.o noblock.o path.o \
@


1.36
log
@Added --htmldir option to pg_config, equivalent to the new configure option.
@
text
@d18 1
a18 1
# object files that are conditionally needed depending on platform.
d22 1
a22 1
#    $PostgreSQL: pgsql/src/port/Makefile,v 1.35 2007/09/28 22:25:49 tgl Exp $
d33 5
a37 1
OBJS = $(LIBOBJS) chklocale.o copydir.o dirmod.o exec.o noblock.o path.o pipe.o pgsleep.o pgstrcasecmp.o qsort.o qsort_arg.o sprompt.o thread.o
@


1.35
log
@Change initdb and CREATE DATABASE to actively reject attempts to create
databases with encodings that are incompatible with the server's LC_CTYPE
locale, when we can determine that (which we can on most modern platforms,
I believe).  C/POSIX locale is compatible with all encodings, of course,
so there is still some usefulness to CREATE DATABASE's ENCODING option,
but this will insulate us against all sorts of recurring complaints
caused by mismatched settings.

I moved initdb's existing LC_CTYPE-to-encoding mapping knowledge into
a new src/port/ file so it could be shared by CREATE DATABASE.
@
text
@d22 1
a22 1
#    $PostgreSQL: pgsql/src/port/Makefile,v 1.34 2007/02/09 15:56:00 petere Exp $
d87 1
@


1.34
log
@Replace useless uses of := by = in makefiles.
@
text
@d17 4
d22 1
a22 1
#    $PostgreSQL: pgsql/src/port/Makefile,v 1.33 2006/07/14 16:45:43 tgl Exp $
d33 4
a36 2
# Replace all object files so they use FRONTEND define
LIBOBJS_SRV = $(LIBOBJS:%.o=%_srv.o)
d50 1
a50 1
libpgport.a: $(LIBOBJS)
d53 1
a56 4
path.o: path.c pg_config_paths.h

path_srv.o: path.c pg_config_paths.h

d61 1
a61 1
libpgport_srv.a: $(LIBOBJS_SRV)
d67 5
a71 3
# No thread flags for server version
thread_srv.o: thread.c
	$(CC) $(CFLAGS) $(subst -DFRONTEND,, $(CPPFLAGS)) -c $< -o $@@
a72 2
# Dependency is to ensure that path changes propagate
#
d90 1
a90 1
	rm -f libpgport.a libpgport_srv.a $(LIBOBJS) $(LIBOBJS_SRV) pg_config_paths.h
@


1.33
log
@Add dependency to fix parallel-make race condition.  Alexander Dupuy
@
text
@d18 1
a18 1
#    $PostgreSQL: pgsql/src/port/Makefile,v 1.32 2006/06/26 18:40:50 momjian Exp $
d30 1
a30 1
LIBOBJS_SRV := $(LIBOBJS:%.o=%_srv.o)
@


1.32
log
@Add comment about the use of pg_config_paths.h.
@
text
@d18 1
a18 1
#    $PostgreSQL: pgsql/src/port/Makefile,v 1.31 2006/05/08 02:18:50 momjian Exp $
d52 2
@


1.31
log
@Build server libpgport with all non-FRONTEND object files.  This is to
fix a Win32 bug where pipe.c included a file that used FRONTEND, but it
wasn't on the server-build list.
@
text
@d18 1
a18 1
#    $PostgreSQL: pgsql/src/port/Makefile,v 1.30 2005/12/09 21:19:36 petere Exp $
d67 4
@


1.30
log
@Allow installation into directories containing spaces in the name.
@
text
@d18 1
a18 1
#    $PostgreSQL: pgsql/src/port/Makefile,v 1.29 2005/09/27 17:39:35 tgl Exp $
d29 2
a30 6
# Replace object files that use FRONTEND define
LIBOBJS_SRV := $(LIBOBJS)
LIBOBJS_SRV := $(patsubst dirmod.o,dirmod_srv.o, $(LIBOBJS_SRV))
LIBOBJS_SRV := $(patsubst exec.o,exec_srv.o, $(LIBOBJS_SRV))
LIBOBJS_SRV := $(patsubst getaddrinfo.o,getaddrinfo_srv.o, $(LIBOBJS_SRV))
LIBOBJS_SRV := $(patsubst thread.o,thread_srv.o, $(LIBOBJS_SRV))
d59 1
a59 7
dirmod_srv.o: dirmod.c
	$(CC) $(CFLAGS) $(subst -DFRONTEND,, $(CPPFLAGS)) -c $< -o $@@

exec_srv.o: exec.c
	$(CC) $(CFLAGS) $(subst -DFRONTEND,, $(CPPFLAGS)) -c $< -o $@@

getaddrinfo_srv.o: getaddrinfo.c
@


1.29
log
@Fix problems with PGXS builds against an installation tree that was
relocated after installation.  We can't trust the installation paths
inserted into Makefile.global by configure, so instead we must get the
paths from pg_config.  This requires extending pg_config to support all
the separately-configurable path names, but that was on TODO anyway.
@
text
@d18 1
a18 1
#    $PostgreSQL: pgsql/src/port/Makefile,v 1.28 2005/08/12 19:45:14 momjian Exp $
d39 5
a43 2
install: all
	$(INSTALL_STLIB) libpgport.a $(DESTDIR)$(libdir)
d46 1
a46 1
	$(RM) $(DESTDIR)$(libdir)/libpgport.a
@


1.29.2.1
log
@Build server libpgport with all non-FRONTEND object files.  This is to
fix a Win32 bug where pipe.c included a file that used FRONTEND, but it
wasn't on the server-build list.
@
text
@d18 1
a18 1
#    $PostgreSQL: pgsql/src/port/Makefile,v 1.29 2005/09/27 17:39:35 tgl Exp $
d29 6
a34 2
# Replace all object files so they use FRONTEND define
LIBOBJS_SRV := $(LIBOBJS:%.o=%_srv.o)
d60 7
a66 1
%_srv.o: %.c
@


1.29.2.2
log
@Add dependency to fix parallel-make race condition.  Alexander Dupuy
@
text
@d18 1
a18 1
#    $PostgreSQL: pgsql/src/port/Makefile,v 1.29.2.1 2006/05/08 02:18:59 momjian Exp $
a48 2
path_srv.o: path.c pg_config_paths.h

@


1.28
log
@No server version of snprintf needed, so remove Makefile rule.
@
text
@d18 1
a18 1
#    $PostgreSQL: pgsql/src/port/Makefile,v 1.27 2005/08/12 19:43:31 momjian Exp $
d84 2
@


1.27
log
@Reverse out changes to canonicalize_path(), per suggestion from Tom.
@
text
@d18 1
a18 1
#    $PostgreSQL: pgsql/src/port/Makefile,v 1.26 2005/08/12 19:42:45 momjian Exp $
a68 3
snprintf_srv.o: snprintf.c
	$(CC) $(CFLAGS) $(subst -DFRONTEND,, $(CPPFLAGS)) -c $< -o $@@

@


1.26
log
@Modify canonicalize_path() so if we would return a trailing "..", throw
an error instead.
@
text
@d18 1
a18 1
#    $PostgreSQL: pgsql/src/port/Makefile,v 1.25 2005/03/20 03:53:39 momjian Exp $
a33 1
LIBOBJS_SRV := $(patsubst path.o,path_srv.o, $(LIBOBJS_SRV))
d69 1
a69 1
path_srv.o: path.c
@


1.25
log
@Department of second thoughts.  Remove FRONTEND from snprintf.c because
snprintf is called before the memory system is started.  We have to just
malloc/free.  There are no elogs in the code so we should be fine.
@
text
@d18 1
a18 1
#    $PostgreSQL: pgsql/src/port/Makefile,v 1.24 2005/03/20 02:44:45 momjian Exp $
d34 1
d70 1
a70 1
snprintf_srv.o: snprintf.c
@


1.24
log
@Fix typo in Makefile.
@
text
@d18 1
a18 1
#    $PostgreSQL: pgsql/src/port/Makefile,v 1.23 2005/03/20 02:40:28 momjian Exp $
a33 1
LIBOBJS_SRV := $(patsubst snprintf.o,snprintf_srv.o, $(LIBOBJS_SRV))
@


1.23
log
@Another change for FRONTEND snprintf.c.
@
text
@d18 1
a18 1
#    $PostgreSQL: pgsql/src/port/Makefile,v 1.22 2005/03/20 02:39:33 momjian Exp $
d34 1
a34 1
LIBOBJS_SRV := $(patsubst snprintf.o,snpritnf_srv.o, $(LIBOBJS_SRV))
@


1.22
log
@Mark snprintf.c as a file that uses FRONTEND and needs to a version in
the server-side port library.  Somehow I missed that change when I added
memory allocation to snprintf.c.
@
text
@d18 1
a18 1
#    $PostgreSQL: pgsql/src/port/Makefile,v 1.21 2004/10/27 11:51:40 neilc Exp $
d70 3
@


1.21
log
@Add a missing dependency: the "install" target requires "all" to have
been built before it. Per report from Kris Jurka.
@
text
@d18 1
a18 1
#    $PostgreSQL: pgsql/src/port/Makefile,v 1.20 2004/10/06 08:50:02 momjian Exp $
d34 1
@


1.21.4.1
log
@Build server libpgport with all non-FRONTEND object files.  This is to
fix a Win32 bug where pipe.c included a file that used FRONTEND, but it
wasn't on the server-build list.
@
text
@d18 1
a18 1
#    $PostgreSQL: pgsql/src/port/Makefile,v 1.21 2004/10/27 11:51:40 neilc Exp $
d29 6
a34 2
# Replace all object files so they use FRONTEND define
LIBOBJS_SRV := $(LIBOBJS:%.o=%_srv.o)
d60 7
a66 1
%_srv.o: %.c
@


1.21.4.2
log
@Add dependency to fix parallel-make race condition.  Alexander Dupuy
@
text
@d18 1
a18 1
#    $PostgreSQL: pgsql/src/port/Makefile,v 1.21.4.1 2006/05/08 02:18:21 momjian Exp $
a48 2
path_srv.o: path.c pg_config_paths.h

@


1.20
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
@d18 1
a18 1
#    $PostgreSQL: pgsql-server/src/port/Makefile,v 1.19 2004/10/04 13:43:58 momjian Exp $
d39 1
a39 1
install:
@


1.19
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
@d18 1
a18 1
#    $PostgreSQL: pgsql-server/src/port/Makefile,v 1.18 2004/08/28 22:55:06 momjian Exp $
d39 1
a39 1
install-all-headers: 
@


1.18
log
@> Am Dienstag, 17. August 2004 14:26 schrieb Fabien COELHO:
> > The patch adds missing the "libpgport.a" file to the installation under
> > "install-all-headers". It is needed by some contribs. I install the
> > library in "pkglibdir", but I was wondering whether it should be "libdir"?

Please find attached a small patch against current CVS head that fixes
pgport library installation so that it goes to libdir instead of
pkglibdir. It works for me.

Fabien Coelho
@
text
@d3 1
a3 1
# Makefile--
d7 10
a16 2
# with broken/missing library files.

d18 1
a18 1
#    $PostgreSQL: pgsql-server/src/port/Makefile,v 1.17 2004/08/20 20:13:10 momjian Exp $
d26 1
a26 1
override CPPFLAGS := -I$(top_builddir)/src/port $(CPPFLAGS)
d29 8
a36 1
all: libpgport.a
d53 20
d86 1
a86 1
	rm -f libpgport.a $(LIBOBJS) pg_config_paths.h
@


1.17
log
@> Please find enclose a submission to fix these problems.
>
> The patch adds missing the "libpgport.a" file to the installation under
> "install-all-headers". It is needed by some contribs. I install the
> library in "pkglibdir", but I was wondering whether it should be "libdir"?
> I was wondering also whether it would make sense to have a "libpgport.so"?
>
> It fixes various macros which are used by contrib makefiles, especially
> libpq_*dir and LDFLAGS when used under PGXS. It seems to me that they are
> needed to
>
> It adds the ability to test and use PGXS with contribs, with "make
> USE_PGXS=1". Without the macro, this is exactly as before, there should be
> no difference, esp. wrt the vpath feature that seemed broken by previous
> submission. So it should not harm anybody, and it is useful at least to me.
>
> It fixes some inconsistencies in various contrib makefiles
> (useless override, ":=" instead of "=").

Fabien COELHO
@
text
@d10 1
a10 1
#    $PostgreSQL: pgsql-server/src/port/Makefile,v 1.16 2004/08/01 06:56:39 momjian Exp $
d25 1
a25 1
	$(INSTALL_STLIB) libpgport.a $(DESTDIR)$(pkglibdir)
d28 1
a28 1
	$(RM) $(DESTDIR)$(pkglibdir)/libpgport.a
@


1.16
log
@Create a C version of pg_config.

Andrew Dunstan
@
text
@d10 1
a10 1
#    $PostgreSQL: pgsql-server/src/port/Makefile,v 1.15 2004/05/30 14:07:47 momjian Exp $
d23 7
@


1.15
log
@Add thread library to libpgport creation.
@
text
@d10 1
a10 1
#    $PostgreSQL: pgsql-server/src/port/Makefile,v 1.14 2004/05/25 01:00:30 momjian Exp $
d38 2
@


1.14
log
@Make the locale location relocatable.

Adjust get_*_path functions to be limited to MAXPGPATH.
@
text
@d10 1
a10 1
#    $PostgreSQL: pgsql-server/src/port/Makefile,v 1.13 2004/05/22 02:15:08 tgl Exp $
d19 1
a20 1
ifdef LIBOBJS
a21 1
endif
@


1.13
log
@Fix for vpath builds.
@
text
@d10 1
a10 1
#    $PostgreSQL: pgsql-server/src/port/Makefile,v 1.12 2004/05/21 20:56:50 tgl Exp $
d40 1
@


1.12
log
@Put path configuration information into a .h file instead of cluttering
several different module Makefiles with it.  Also, do any adjustment
of installation paths during configure, rather than every time Makefile.global
is read.
@
text
@d10 1
a10 1
#    $PostgreSQL: pgsql-server/src/port/Makefile,v 1.11 2004/05/17 14:35:34 momjian Exp $
d17 2
@


1.11
log
@Reorganize code to allow path-relative installs.

Create new get_* functions to access compiled-in paths and adjust if
relative installs are to be used.

Clean up substitute_libpath_macro() code.
@
text
@d10 1
a10 1
#    $PostgreSQL: pgsql-server/src/port/Makefile,v 1.10 2004/04/23 18:15:55 momjian Exp $
a17 7
override CPPFLAGS += -DPGBINDIR=\"$(bindir)\" \
		     -DPGDATADIR=\"$(datadir)\" \
		     -DSYSCONFDIR='"$(sysconfdir)"' \
		     -DINCLUDEDIR=\"$(includedir)\" \
		     -DPKGINCLUDEDIR=\"$(pkgincludedir)\" \
		     -DPKGLIBDIR=\"$(pkglibdir)\"

d28 11
d40 1
a40 1
	rm -f libpgport.a $(LIBOBJS)
@


1.10
log
@Add new auto-detection of thread flags.

Allow additional thread flags to be added via port templates.

Change thread flag names to PTHREAD_CFLAGS and PTHREAD_LIBS to match new
configure script.
@
text
@d10 1
a10 1
#    $PostgreSQL: pgsql-server/src/port/Makefile,v 1.9 2003/11/29 19:52:13 pgsql Exp $
d17 7
@


1.9
log
@
$Header: -> $PostgreSQL Changes ...
@
text
@d10 1
a10 1
#    $PostgreSQL: /cvsroot/pgsql-server/src/port/Makefile,v 1.8 2003/10/24 20:31:43 petere Exp $
d26 1
a26 1
	$(CC) $(CFLAGS) $(CPPFLAGS) $(THREAD_CPPFLAGS) -c $<
@


1.8
log
@Use AROPT, not hard-coded flags.
@
text
@d10 1
a10 1
#    $Header: /cvsroot/pgsql-server/src/port/Makefile,v 1.7 2003/09/27 15:32:48 momjian Exp $
@


1.7
log
@Rename thread compile flag.  Move thread test program to tools/thread,
and improve tests.
@
text
@d10 1
a10 1
#    $Header: /cvsroot/pgsql-server/src/port/Makefile,v 1.6 2003/08/13 03:12:04 momjian Exp $
d23 1
a23 1
	$(AR) crs $@@ $^
@


1.6
log
@I'm quite fond of doing VPATH builds, i.e. building outside the source
tree. This also catches lots of little Makefile bugs, so here's a small
patch for one of them (replacing an explicit reference to thread.c with
a reference to it as the first prerequsite of the rule makes make look
for it in the place where it was found (the source tree) rather than in
the build tree. (using GNU make 3.79.1)

John Gray
@
text
@d10 1
a10 1
#    $Header: /cvsroot/pgsql-server/src/port/Makefile,v 1.5 2003/08/08 02:55:08 momjian Exp $
d26 1
a26 1
	$(CC) $(CFLAGS) $(CPPFLAGS) $(THREAD_CFLAGS) -c $<
@


1.5
log
@More threading cleanups.
@
text
@d10 1
a10 1
#    $Header: /cvsroot/pgsql-server/src/port/Makefile,v 1.4 2003/06/14 14:35:42 momjian Exp $
d26 1
a26 1
	$(CC) $(CFLAGS) $(CPPFLAGS) $(THREAD_CFLAGS) -c thread.c
@


1.4
log
@Add thread.c for libpq threading, and hook it into libpq/configure.
@
text
@d10 1
a10 1
#    $Header: /cvsroot/pgsql-server/src/port/Makefile,v 1.3 2002/07/27 20:10:05 petere Exp $
d26 1
a26 1
	$(CC) $(CFLAGS) $(THREAD_CFLAGS) -c thread.c
@


1.3
log
@Assemble portability modules into libpgport library.
Some makefile simplifications.
@
text
@d10 1
a10 1
#    $Header: /cvsroot/pgsql/src/port/Makefile,v 1.2 2002/07/19 17:35:11 momjian Exp $
d24 3
@


1.2
log
@Complete TODO item:

* -Add BSD-licensed qsort() for Solaris
@
text
@d10 1
a10 1
#    $Header: /cvsroot/pgsql/src/port/Makefile,v 1.1 2002/07/18 04:13:59 momjian Exp $
d18 3
d22 5
a26 5
#
# The backend/port directory removes these files.
#
#distclean clean:
#	rm -f $(OBJS)
@


1.1
log
@Move libc replacement files from src/backend/port to src/port.
@
text
@d10 1
a10 1
#    $Header: /cvsroot/pgsql/src/backend/port/Makefile,v 1.15 2002/07/16 05:49:38 momjian Exp $
a17 3
OBJS=$(GETHOSTNAME) $(GETRUSAGE) $(INET_ATON) $(ISINF) $(MEMCMP) \
        $(MISSING_RANDOM) $(SNPRINTF) $(SRANDOM) $(STRCASECMP) $(STRDUP) \
	$(STRERROR) $(STRTOL) $(STRTOUL)
d19 5
a23 2
distclean clean:
	rm -f $(OBJS)
@
