postgresql/contrib/rserv/Makefile
Bruce Momjian 558fae16e3 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
2001-06-18 21:38:02 +00:00

55 lines
1.6 KiB
Makefile

# Makefile for erServer demonstration implementation
# (c) 2000 Vadim Mikheev, PostgreSQL Inc.
subdir = contrib/rserv
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
NAME = rserv
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
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
override CFLAGS += $(CFLAGS_SL)
override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
all: $(SQLS) $(TCLS) $(PERLS) $(SCRIPTS) $(SONAME)
%.sql: %.sql.in
sed -e "s:_OBJWD_:$(libdir)/contrib:g" \
-e "s:_DLSUFFIX_:$(DLSUFFIX):g" $< >$@
$(PERLS) $(TCLS) $(SCRIPTS): %: %.in
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" $< >$@
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
clean distclean maintainer-clean:
rm -f $(SQLS) $(TCLS) $(PERLS) $(SCRIPTS) $(SONAME) $(NAME).o