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
|
|
|
|
sed -e "s:_OBJWD_:$(libdir)/contrib:g" \
|
2000-12-29 01:34:52 +08:00
|
|
|
-e "s:_DLSUFFIX_:$(DLSUFFIX):g" $< >$@
|
2000-12-21 01:22:35 +08:00
|
|
|
|
2000-12-29 01:34:52 +08:00
|
|
|
$(PERLS) $(TCLS) $(SCRIPTS): %: %.in
|
2000-12-21 01:22:35 +08:00
|
|
|
sed -e "s:_OBJWD_:$(libdir)/contrib:g" \
|
|
|
|
-e "s:_DLSUFFIX_:$(DLSUFFIX):g" \
|
2000-12-29 01:34:52 +08:00
|
|
|
-e "s:@SQLDIR@:$(datadir)/contrib:g" \
|
2000-12-21 01:22:35 +08:00
|
|
|
-e "s:@BINDIR@:$(bindir):g" \
|
2000-12-29 01:34:52 +08:00
|
|
|
-e "s:@LIBDIR@:$(datadir)/contrib:g" $< >$@
|
|
|
|
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
|
|
|
|
$(INSTALL_DATA) RServ.pm $(DESTDIR)$(datadir)/contrib
|
|
|
|
$(INSTALL_SHLIB) $(SONAME) $(DESTDIR)$(libdir)/contrib
|
|
|
|
$(INSTALL_DATA) README.$(NAME) $(DESTDIR)$(docdir)/contrib
|
|
|
|
|
|
|
|
installdirs:
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(datadir)/contrib \
|
|
|
|
$(DESTDIR)$(libdir)/contrib $(DESTDIR)$(docdir)/contrib
|
|
|
|
|
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
|