Debian Codegraph @

src/test/isolation/Makefile

raw
1 #
2 # Makefile for isolation tests
3 #
4
5 PGFILEDESC = "pg_isolation_regress/isolationtester - multi-client test driver"
6 PGAPPICON = win32
7
8 subdir = src/test/isolation
9 top_builddir = ../../..
10 include $(top_builddir)/src/Makefile.global
11
12 override CPPFLAGS := -I. -I$(srcdir) -I$(libpq_srcdir) \
13 -I$(srcdir)/../regress $(CPPFLAGS)
14
15 OBJS = \
16 $(WIN32RES) \
17 isolationtester.o \
18 specparse.o \
19 specscanner.o
20
21 all: isolationtester$(X) pg_isolation_regress$(X)
22
23 install: all installdirs
24 $(INSTALL_PROGRAM) pg_isolation_regress$(X) '$(DESTDIR)$(pgxsdir)/$(subdir)/pg_isolation_regress$(X)'
25 $(INSTALL_PROGRAM) isolationtester$(X) '$(DESTDIR)$(pgxsdir)/$(subdir)/isolationtester$(X)'
26
27 installdirs:
28 $(MKDIR_P) '$(DESTDIR)$(pgxsdir)/$(subdir)'
29
30 uninstall:
31 rm -f '$(DESTDIR)$(pgxsdir)/$(subdir)/pg_isolation_regress$(X)'
32 rm -f '$(DESTDIR)$(pgxsdir)/$(subdir)/isolationtester$(X)'
33
34 submake-regress:
35 $(MAKE) -C $(top_builddir)/src/test/regress pg_regress.o
36
37 pg_regress.o: | submake-regress
38 rm -f $@ && $(LN_S) $(top_builddir)/src/test/regress/pg_regress.o .
39
40 pg_isolation_regress$(X): isolation_main.o pg_regress.o $(WIN32RES)
41 $(CC) $(CFLAGS) $^ $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@
42
43 isolationtester$(X): $(OBJS) | submake-libpq submake-libpgport
44 $(CC) $(CFLAGS) $^ $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@
45
46 # See notes in src/backend/parser/Makefile about the following two rules
47 specparse.h: specparse.c
48 touch $@
49
50 specparse.c: BISONFLAGS += -d
51
52 # Force these dependencies to be known even without dependency info built:
53 specparse.o specscanner.o: specparse.h
54
55 clean distclean:
56 rm -f isolationtester$(X) pg_isolation_regress$(X) $(OBJS) isolation_main.o
57 rm -f pg_regress.o
58 rm -rf $(pg_regress_clean_files)
59 rm -f specparse.h specparse.c specscanner.c
60
61 installcheck: all
62 $(pg_isolation_regress_installcheck) --schedule=$(srcdir)/isolation_schedule
63
64 check: all
65 $(pg_isolation_regress_check) --schedule=$(srcdir)/isolation_schedule
66
67 # Non-default tests. It only makes sense to run these if set up to use
68 # prepared transactions, via TEMP_CONFIG for the check case, or via the
69 # postgresql.conf for the installcheck case.
70 installcheck-prepared-txns: all temp-install
71 $(pg_isolation_regress_installcheck) --schedule=$(srcdir)/isolation_schedule prepared-transactions prepared-transactions-cic
72
73 check-prepared-txns: all temp-install
74 $(pg_isolation_regress_check) --schedule=$(srcdir)/isolation_schedule prepared-transactions prepared-transactions-cic