2 # Makefile for isolation tests
5 subdir = src/test/isolation
6 top_builddir = ../../..
7 include $(top_builddir)/src/Makefile.global
9 ifeq ($(PORTNAME), win32)
13 override CPPFLAGS := -I$(srcdir) -I$(libpq_srcdir) $(CPPFLAGS)
14 override LDLIBS := $(libpq_pgport) $(LDLIBS)
16 OBJS = specparse.o isolationtester.o
19 $(MAKE) -C $(top_builddir)/src/test/regress pg_regress.o
21 pg_regress.o: | submake-regress
22 rm -f $@ && $(LN_S) $(top_builddir)/src/test/regress/pg_regress.o .
24 pg_isolation_regress: isolation_main.o pg_regress.o
25 $(CC) $(CFLAGS) $^ $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
27 all: isolationtester pg_isolation_regress
29 isolationtester: $(OBJS) | submake-libpq submake-libpgport
30 $(CC) $(CFLAGS) $(OBJS) $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
34 # There is no correct way to write a rule that generates two files.
35 # Rules with two targets don't have that meaning, they are merely
36 # shorthand for two otherwise separate rules. To be safe for parallel
37 # make, we must chain the dependencies like this. The semicolon is
38 # important, otherwise make will choose the built-in rule for
41 all: isolationtester$(X) pg_isolation_regress$(X)
43 specparse.h: specparse.c ;
45 # specscanner is compiled as part of specparse
46 specparse.o: specscanner.c
48 specparse.c: specparse.y
50 $(BISON) $(BISONFLAGS) -o $@ $<
52 @$(missing) bison $< $@
55 specscanner.c: specscanner.l
57 $(FLEX) $(FLEXFLAGS) -o'$@' $<
59 @$(missing) flex $< $@
61 # specparse.c is in the distribution tarball, so is not cleaned here
63 rm -f isolationtester$(X) pg_isolation_regress$(X) $(OBJS) isolation_main.o
67 maintainer-clean: distclean
68 rm -f specparse.c specscanner.c
71 ./pg_isolation_regress --schedule=$(srcdir)/isolation_schedule
74 ./pg_isolation_regress --temp-install=./tmp_check --top-builddir=$(top_builddir) --schedule=$(srcdir)/isolation_schedule