forked from postgres/postgres
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
68 lines (57 loc) · 1.71 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
EXTENSION = multimaster
DATA = multimaster--1.0.sql
OBJS = src/multimaster.o src/dmq.o src/commit.o src/bytebuf.o src/bgwpool.o \
src/pglogical_output.o src/pglogical_proto.o src/pglogical_receiver.o \
src/pglogical_apply.o src/pglogical_hooks.o src/pglogical_config.o \
src/pglogical_relid_map.o src/ddd.o src/bkb.o src/spill.o src/state.o \
src/resolver.o src/ddl.o src/syncpoint.o
MODULE_big = multimaster
ifdef USE_PGXS
PG_CPPFLAGS += -I$(CURDIR)/src/include
else
PG_CPPFLAGS += -I$(top_srcdir)/$(subdir)/src/include
endif
PG_CPPFLAGS += -I$(libpq_srcdir)
SHLIB_LINK = $(libpq)
ifdef USE_PGXS
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
else
subdir = contrib/mmts
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif
.PHONY: all
EXTRA_INSTALL=contrib/mmts
all: multimaster.so
check: temp-install
$(prove_check)
submake-regress:
$(MAKE) -C $(top_builddir)/src/test/regress all
start: temp-install
rm -rf '$(CURDIR)'/tmp_check
$(MKDIR_P) '$(CURDIR)'/tmp_check
cd $(srcdir) && TESTDIR='$(CURDIR)' \
$(with_temp_install) \
MMPORT='6$(DEF_PGPORT)' \
PG_REGRESS='$(CURDIR)/$(top_builddir)/src/test/regress/pg_regress' \
perl run.pl --start
stop:
cd $(srcdir) && TESTDIR='$(CURDIR)' \
$(with_temp_install) \
PGPORT='6$(DEF_PGPORT)' \
PG_REGRESS='$(CURDIR)/$(top_builddir)/src/test/regress/pg_regress' \
perl run.pl --stop
regress: submake-regress
cd $(CURDIR)/$(top_builddir)/src/test/regress && \
$(with_temp_install) \
PGPORT='6$(DEF_PGPORT)' \
PGHOST='127.0.0.1' \
PGUSER='$(USER)' \
./pg_regress \
--bindir='' \
--use-existing \
--schedule=serial_schedule \
--dlpath=$(CURDIR)/$(top_builddir)/src/test/regress