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
|
2000-12-29 01:34:52 +08:00
|
|
|
SONAME = $(NAME)$(DLSUFFIX)
|
2000-12-21 01:22:35 +08:00
|
|
|
SQLS = master.sql slave.sql
|
|
|
|
TCLS = RservTest
|
2000-12-21 23:26:04 +08:00
|
|
|
PERLS = MasterInit MasterAddTable Replicate MasterSync CleanLog
|
|
|
|
PERLS += SlaveInit SlaveAddTable GetSyncID
|
|
|
|
PERLS += PrepareSnapshot ApplySnapshot
|
2000-12-21 01:22:35 +08:00
|
|
|
SCRIPTS = InitRservTest
|
|
|
|
|
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)
|
2001-06-19 05:38:02 +08:00
|
|
|
override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
|
2000-12-21 01:22:35 +08:00
|
|
|
|
|
|
|
|
2000-12-29 01:34:52 +08:00
|
|
|
all: $(SQLS) $(TCLS) $(PERLS) $(SCRIPTS) $(SONAME)
|
2000-12-21 01:22:35 +08:00
|
|
|
|
|
|
|
%.sql: %.sql.in
|
2001-09-17 00:11:11 +08:00
|
|
|
sed 's,@MODULE_FILENAME@,$$libdir/$(NAME),g' $< >$@
|
2000-12-21 01:22:35 +08:00
|
|
|
|
2000-12-29 01:34:52 +08:00
|
|
|
$(PERLS) $(TCLS) $(SCRIPTS): %: %.in
|
2001-09-17 00:11:11 +08:00
|
|
|
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' $< >$@
|
2000-12-29 01:34:52 +08:00
|
|
|
chmod a+x $@
|
|
|
|
|
|
|
|
|
|
|
|
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
|
2001-09-06 18:49:30 +08:00
|
|
|
$(INSTALL_DATA) $(srcdir)/RServ.pm $(DESTDIR)$(datadir)/contrib
|
2001-09-17 00:11:11 +08:00
|
|
|
$(INSTALL_SHLIB) $(SONAME) $(DESTDIR)$(pkglibdir)
|
2001-09-06 18:49:30 +08:00
|
|
|
$(INSTALL_DATA) $(srcdir)/README.$(NAME) $(DESTDIR)$(docdir)/contrib
|
2000-12-29 01:34:52 +08:00
|
|
|
|
|
|
|
installdirs:
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(datadir)/contrib \
|
2001-09-17 00:11:11 +08:00
|
|
|
$(DESTDIR)$(pkglibdir) $(DESTDIR)$(docdir)/contrib
|
2000-12-29 01:34:52 +08:00
|
|
|
|
2000-12-21 01:22:35 +08:00
|
|
|
|
2000-12-29 01:34:52 +08:00
|
|
|
clean distclean maintainer-clean:
|
|
|
|
rm -f $(SQLS) $(TCLS) $(PERLS) $(SCRIPTS) $(SONAME) $(NAME).o
|