head	1.14;
access;
symbols
	REL7_4_29:1.12
	REL7_4_28:1.12
	REL7_4_27:1.12
	REL7_4_26:1.12
	REL7_4_25:1.12
	REL7_4_24:1.12
	REL7_4_23:1.12
	REL7_4_22:1.12
	REL7_4_21:1.12
	REL7_4_20:1.12
	REL7_3_21:1.12
	REL7_4_19:1.12
	REL7_3_20:1.12
	REL7_4_18:1.12
	REL7_3_19:1.12
	REL7_4_17:1.12
	REL7_3_18:1.12
	REL7_4_16:1.12
	REL7_4_15:1.12
	REL7_3_17:1.12
	REL7_4_14:1.12
	REL7_3_16:1.12
	REL7_3_15:1.12
	REL7_4_13:1.12
	REL7_3_14:1.12
	REL7_4_12:1.12
	REL7_3_13:1.12
	REL7_4_11:1.12
	REL7_3_12:1.12
	REL7_4_10:1.12
	REL7_3_11:1.12
	REL7_4_9:1.12
	REL7_2_8:1.7
	REL7_3_10:1.12
	REL7_4_8:1.12
	REL7_2_7:1.7
	REL7_3_9:1.12
	REL7_4_7:1.12
	REL7_4_6:1.12
	REL7_3_8:1.12
	REL7_2_6:1.7
	REL7_2_5:1.7
	REL7_4_5:1.12
	REL7_3_7:1.12
	REL7_4_4:1.12
	REL8_0_0BETA1:1.12
	REL7_4_3:1.12
	REL7_4_2:1.12
	REL7_3_6:1.12
	REL7_4_1:1.12
	REL7_3_5:1.12
	REL7_4:1.12
	REL7_4_RC2:1.12
	REL7_4_STABLE:1.12.0.6
	REL7_4_RC1:1.12
	REL7_4_BETA5:1.12
	REL7_4_BETA4:1.12
	REL7_4_BETA3:1.12
	REL7_4_BETA2:1.12
	WIN32_DEV:1.12.0.4
	REL7_4_BETA1:1.12
	REL7_3_4:1.12
	REL7_3_2:1.12
	REL7_2_4:1.7
	REL7_3_STABLE:1.12.0.2
	REL7_2_3:1.7
	REL7_2_STABLE:1.7.0.2
	REL7_2:1.7
	REL7_2_RC2:1.7
	REL7_2_RC1:1.7
	REL7_2_BETA5:1.7
	REL7_2_BETA4:1.7
	REL7_2_BETA3:1.7
	REL7_2_BETA2:1.7
	REL7_2_BETA1:1.7
	REL7_1_2:1.4
	REL7_1_STABLE:1.4.0.2
	REL7_1:1.4
	REL7_1_BETA3:1.3
	REL7_1_BETA2:1.3;
locks; strict;
comment	@# @;


1.14
date	2004.08.28.21.36.25;	author tgl;	state dead;
branches;
next	1.13;

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

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

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

1.10
date	2002.09.05.18.28.45;	author petere;	state Exp;
branches;
next	1.9;

1.9
date	2002.03.11.04.39.14;	author momjian;	state Exp;
branches;
next	1.8;

1.8
date	2002.03.06.20.41.34;	author momjian;	state Exp;
branches;
next	1.7;

1.7
date	2001.09.16.16.11.09;	author petere;	state Exp;
branches;
next	1.6;

1.6
date	2001.09.06.10.49.30;	author petere;	state Exp;
branches;
next	1.5;

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

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

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

1.2
date	2000.12.21.15.26.04;	author thomas;	state Exp;
branches;
next	1.1;

1.1
date	2000.12.20.17.22.35;	author thomas;	state Exp;
branches;
next	;


desc
@@


1.14
log
@Remove contrib/rserv, since there are better replication solutions
available elsewhere (including a descendant project on gborg).
@
text
@# Makefile for erServer demonstration implementation
# (c) 2000 Vadim Mikheev, PostgreSQL Inc.

NAME	= rserv
MODULES	= rserv
DATA	= RServ.pm
DATA_built	= master.sql slave.sql
SQLS	= $(DATA_built)
DOCS	= README.rserv
SCRIPTS_built	= RservTest
SCRIPTS_built	+= MasterInit MasterAddTable Replicate MasterSync CleanLog
SCRIPTS_built	+= SlaveInit SlaveAddTable GetSyncID
SCRIPTS_built	+= PrepareSnapshot ApplySnapshot
SCRIPTS_built	+= InitRservTest


ifdef USE_PGXS
PGXS = $(shell pg_config --pgxs)
include $(PGXS)
else
subdir = contrib/rserv
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif


$(SQLS): %.sql: %.sql.in
	sed 's,@@MODULE_FILENAME@@,$$libdir/$(NAME),g' $< >$@@

$(SCRIPTS_built): %: %.in
	sed -e 's,@@MODULE_FILENAME@@,$$libdir/$(NAME),g' \
	    -e 's:@@SQLDIR@@:$(datadir)/contrib:g' \
	    -e 's:@@BINDIR@@:$(bindir):g' \
	    -e 's:@@LIBDIR@@:$(datadir)/contrib:g' $< >$@@
	chmod a+x $@@
@


1.13
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
@@


1.12
log
@Fix contrib/rserv to install successfully when built outside source tree.
(Not that it will actually work with 7.3, I fear.)
@
text
@a3 4
subdir = contrib/rserv
top_builddir = ../..
include $(top_builddir)/src/Makefile.global

d17 11
a36 2

include $(top_srcdir)/contrib/contrib-global.mk
@


1.11
log
@   Well, this patch makes Makefile for contrib/rserv use the
   contrib/contrib-global.mk library and _generally_ behave like
   Makefiles for other contrib modules.
   Besides it fixes Perl's interpolation of $libdir variable, which
   should be passed to backend instead. This patch is done against
   PostgreSQL 7.3b2

   Besides, I want to thank Peter Eisentraut for his very friendly and
   helpful attitude and politely ask him to check whether contrib
   modules actually continue to work after he implements another
   major change to their build process.

Alexey Borzov
@
text
@d14 5
a18 6
SCRIPTS	= RservTest
SCRIPTS	+= MasterInit MasterAddTable Replicate MasterSync CleanLog
SCRIPTS	+= SlaveInit SlaveAddTable GetSyncID
SCRIPTS	+= PrepareSnapshot ApplySnapshot
SCRIPTS	+= InitRservTest
EXTRA_CLEAN	= $(SCRIPTS)
a19 6
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
override CFLAGS += $(CFLAGS_SL)
SHLIB_LINK = $(BE_DLLLIBS)


all: $(SCRIPTS) $(SQLS) $(addsuffix $(DLSUFFIX), $(MODULES))
d24 1
a24 1
$(SCRIPTS): %: %.in
@


1.10
log
@Assorted fixes for Cygwin:

Eliminate the mysterious games that the Cygwin build plays with the linker
flag variables.  DLLLIBS is gone, use SHLIB_LINK like everyone else.
Detect cygipc in configure, after the linker flags are set up, otherwise
configure might not work at all.

Make sure everything is covered by make clean.

Fix the build of the new conversion procedure modules.

Add new DLLIMPORT markers where required.

Finally, the compiler complains if we use an explicit
-I/usr/local/include, so don't do that.  Curiously, -L/usr/local/lib is
still necessary.
@
text
@d9 11
a19 7
SONAME	= $(NAME)$(DLSUFFIX)
SQLS	= master.sql slave.sql
TCLS	= RservTest
PERLS	= MasterInit MasterAddTable Replicate MasterSync CleanLog
PERLS	+= SlaveInit SlaveAddTable GetSyncID
PERLS	+= PrepareSnapshot ApplySnapshot
SCRIPTS	= InitRservTest
d26 1
a26 1
all: $(SQLS) $(TCLS) $(PERLS) $(SCRIPTS) $(SONAME)
d28 1
a28 1
%.sql: %.sql.in
d31 1
a31 1
$(PERLS) $(TCLS) $(SCRIPTS): %: %.in
d38 1
a38 19

install: all installdirs
	for file in $(SQLS); do \
	  $(INSTALL_DATA) $$file $(DESTDIR)$(datadir)/contrib || exit ; \
	done
	for file in $(TCLS) $(PERLS) $(SCRIPTS); do \
	  $(INSTALL_SCRIPT) $$file $(DESTDIR)$(bindir) || exit ; \
	done
	$(INSTALL_DATA) $(srcdir)/RServ.pm $(DESTDIR)$(datadir)/contrib
	$(INSTALL_SHLIB) $(SONAME) $(DESTDIR)$(pkglibdir)
	$(INSTALL_DATA) $(srcdir)/README.$(NAME) $(DESTDIR)$(docdir)/contrib

installdirs:
	$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(datadir)/contrib \
	  $(DESTDIR)$(pkglibdir) $(DESTDIR)$(docdir)/contrib


clean distclean maintainer-clean:
	rm -f $(SQLS) $(TCLS) $(PERLS) $(SCRIPTS) $(SONAME) $(NAME).o
@


1.9
log
@Back out this for Peter:

>       This simple patch fixes broken Makefile, broken ApplySnapshot and
>       makes all utilities honour --verbose command line option.
>
>       --
>       Yours, Alexey V. Borzov, Webmaster of RDW.ru
>
@
text
@d19 1
a19 1
override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
@


1.8
log
@This simple patch fixes broken Makefile, broken ApplySnapshot and
makes all utilities honour --verbose command line option.

--
Yours, Alexey V. Borzov, Webmaster of RDW.ru
@
text
@d25 1
a25 1
	sed 's,@@MODULE_FILENAME@@,$(pkglibdir)/$(SONAME),g' $< >$@@
d28 1
a28 1
	sed -e 's,@@MODULE_FILENAME@@,$(pkglibdir)/$(SONAME),g' \
@


1.7
log
@Install dynamically loadable modules into a private subdirectory
under libdir, for a cleaner separation in the installation layout
and compatibility with binary packaging standards.  Point backend's
default search location there.  The contrib modules are also
installed in the said location, giving them the benefit of the
default search path as well.  No changes in user interface
nevertheless.
@
text
@d25 1
a25 1
	sed 's,@@MODULE_FILENAME@@,$$libdir/$(NAME),g' $< >$@@
d28 1
a28 1
	sed -e 's,@@MODULE_FILENAME@@,$$libdir/$(NAME),g' \
@


1.6
log
@To fix the perpetually broken makefiles in the contrib tree, I have
written a generic framework of rules that the contrib makefiles can
use instead of writing their own each time.  You only need to set a few
variables and off you go.
@
text
@d25 1
a25 2
	sed -e "s:_OBJWD_:$(libdir)/contrib:g" \
	    -e "s:_DLSUFFIX_:$(DLSUFFIX):g" $< >$@@
d28 4
a31 5
	sed -e "s:_OBJWD_:$(libdir)/contrib:g" \
	    -e "s:_DLSUFFIX_:$(DLSUFFIX):g" \
	    -e "s:@@SQLDIR@@:$(datadir)/contrib:g" \
	    -e "s:@@BINDIR@@:$(bindir):g" \
	    -e "s:@@LIBDIR@@:$(datadir)/contrib:g" $< >$@@
d43 1
a43 1
	$(INSTALL_SHLIB) $(SONAME) $(DESTDIR)$(libdir)/contrib
d48 1
a48 1
	  $(DESTDIR)$(libdir)/contrib $(DESTDIR)$(docdir)/contrib
@


1.5
log
@The attached patch enables the contrib subtree to build cleanly under
Cygwin with the possible exception of mSQL-interface.  Since I don't
have mSQL installed, I skipped this tool.

Except for dealing with a missing getopt.h (oid2name) and HUGE (seg),
the bulk of the patch uses the standard PostgreSQL approach to deal with
Windows DLL issues.

I tested the build aspect of this patch under Cygwin and Linux without
any ill affects.  Note that I did not actually attempt to test the code
for functionality.

The procedure to apply the patch is as follows:

    $ # save the attachment as /tmp/contrib.patch
    $ # change directory to the top of the PostgreSQL source tree
    $ patch -p0 </tmp/contrib.patch

Jason
@
text
@d44 1
a44 1
	$(INSTALL_DATA) RServ.pm $(DESTDIR)$(datadir)/contrib
d46 1
a46 1
	$(INSTALL_DATA) README.$(NAME) $(DESTDIR)$(docdir)/contrib
@


1.4
log
@Make sure -L and -I's for our source tree are always before system include
or library directories on the command line.
@
text
@d19 1
@


1.3
log
@Qualify %.in rule to avoid triggering on configure.in, repair unportable
attempt to install more than one file per 'install' invocation, clean up
some other oddities.
@
text
@d17 1
a17 1
override CPPFLAGS += -I$(srcdir)
@


1.2
log
@Rename undocumented utility SyncSyncID to MasterSync.
Document MasterSync.
Fix up a couple of print statements to respect $verbose and $debug.
@
text
@a3 3
#vpath %.pl perl
#vpath %.pm perl

d9 1
a9 2
OBJS	= $(NAME).o
DOCS	= README.$(NAME)
a14 1
LIBS	= RServ.pm
a15 1
MODS	= $(OBJS:.o=$(DLSUFFIX))
a19 7
INPUTFILES = $(wildcard *.in)
CLEANFILES = $(INPUTFILES:.in=)
CLEANFILES += $(OBJS) $(MODS)

.PHONY: all install installdirs tarball

all: $(SQLS) $(TCLS) $(PERLS) $(SCRIPTS) $(MODS)
d21 1
a21 9
install: all installdirs
	$(INSTALL_DATA) $(SQLS) $(libdir)/contrib
	$(INSTALL_SCRIPT) $(TCLS) $(PERLS) $(SCRIPTS) $(bindir)
	$(INSTALL_SCRIPT) $(LIBS) $(libdir)/contrib
	$(INSTALL_SHLIB) $(MODS) $(libdir)/contrib
	$(INSTALL_DATA) $(DOCS) $(docdir)/contrib/$(NAME)

installdirs:
	$(mkinstalldirs) $(datadir)/contrib $(libdir)/contrib $(docdir)/contrib/$(NAME)
a23 2
	rm -f $@@; \
	C=`pwd`; \
d25 1
a25 1
	    -e "s:_DLSUFFIX_:$(DLSUFFIX):g" < $< > $@@
d27 1
a27 1
%: %.in
d30 1
a30 1
	    -e "s:@@SQLDIR@@:$(libdir)/contrib:g" \
d32 19
a50 2
	    -e "s:@@LIBDIR@@:$(libdir)/contrib:g" < $< > $@@
	chmod 775 $@@
d52 2
a53 3
clean:
#	@@echo "Removing $(CLEANFILES)"
	rm -f $(CLEANFILES)
@


1.1
log
@rserv replication toolkit from Vadim Mikheev.
@
text
@d16 3
a18 2
PERLS	= MasterInit SlaveInit MasterAddTable SlaveAddTable Replicate CleanLog
PERLS	+= PrepareSnapshot ApplySnapshot GetSyncID SyncSyncID
@
