2000-12-21 01:22:35 +08:00
|
|
|
# Makefile for erServer demonstration implementation
|
|
|
|
# (c) 2000 Vadim Mikheev, PostgreSQL Inc.
|
|
|
|
|
|
|
|
subdir = contrib/rserv
|
|
|
|
top_builddir = ../..
|
|
|
|
include $(top_builddir)/src/Makefile.global
|
|
|
|
|
|
|
|
NAME = rserv
|
2002-10-10 00:23:55 +08:00
|
|
|
MODULES = rserv
|
|
|
|
DATA = RServ.pm
|
|
|
|
DATA_built = master.sql slave.sql
|
|
|
|
SQLS = $(DATA_built)
|
|
|
|
DOCS = README.rserv
|
|
|
|
SCRIPTS = RservTest
|
|
|
|
SCRIPTS += MasterInit MasterAddTable Replicate MasterSync CleanLog
|
|
|
|
SCRIPTS += SlaveInit SlaveAddTable GetSyncID
|
|
|
|
SCRIPTS += PrepareSnapshot ApplySnapshot
|
|
|
|
SCRIPTS += InitRservTest
|
|
|
|
EXTRA_CLEAN = $(SCRIPTS)
|
2000-12-21 01:22:35 +08:00
|
|
|
|
2001-02-21 03:20:30 +08:00
|
|
|
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
|
2000-12-21 01:22:35 +08:00
|
|
|
override CFLAGS += $(CFLAGS_SL)
|
2002-09-06 02:28:46 +08:00
|
|
|
SHLIB_LINK = $(BE_DLLLIBS)
|
2000-12-21 01:22:35 +08:00
|
|
|
|
|
|
|
|
2002-10-10 00:23:55 +08:00
|
|
|
all: $(SCRIPTS) $(SQLS) $(addsuffix $(DLSUFFIX), $(MODULES))
|
2000-12-21 01:22:35 +08:00
|
|
|
|
2002-10-10 00:23:55 +08:00
|
|
|
$(SQLS): %.sql: %.sql.in
|
2002-03-11 12:39:14 +08:00
|
|
|
sed 's,@MODULE_FILENAME@,$$libdir/$(NAME),g' $< >$@
|
2000-12-21 01:22:35 +08:00
|
|
|
|
2002-10-10 00:23:55 +08:00
|
|
|
$(SCRIPTS): %: %.in
|
2002-03-11 12:39:14 +08:00
|
|
|
sed -e 's,@MODULE_FILENAME@,$$libdir/$(NAME),g' \
|
2001-09-17 00:11:11 +08:00
|
|
|
-e 's:@SQLDIR@:$(datadir)/contrib:g' \
|
|
|
|
-e 's:@BINDIR@:$(bindir):g' \
|
|
|
|
-e 's:@LIBDIR@:$(datadir)/contrib:g' $< >$@
|
2000-12-29 01:34:52 +08:00
|
|
|
chmod a+x $@
|
|
|
|
|
2002-10-10 00:23:55 +08:00
|
|
|
include $(top_srcdir)/contrib/contrib-global.mk
|