1 # $PostgreSQL: pgsql/src/interfaces/ecpg/test/Makefile,v 1.63 2007/01/12 11:27:28 meskes Exp $
3 subdir = src/interfaces/ecpg/test
4 top_builddir = ../../../..
5 include $(top_builddir)/src/Makefile.global
7 # port number for temp-installation test postmaster
8 # this is also defined in test/connect/Makefile
9 TEMP_PORT = 5$(DEF_PGPORT)
17 NOLOCALE += --no-locale
20 ifneq ($(PORTNAME),win32)
21 abs_builddir := $(shell pwd)
23 abs_builddir := $(shell pwd -W)
26 all install installdirs uninstall dep depend distprep:
28 $(MAKE) -C expected $@
30 $(MAKE) -C pgtypeslib $@
32 $(MAKE) -C compat_informix $@
35 clean distclean maintainer-clean:
37 $(MAKE) -C connect extraclean
38 $(MAKE) -C expected extraclean
40 $(MAKE) -C pgtypeslib $@
42 $(MAKE) -C compat_informix $@
44 rm -rf tmp_check results log
45 rm -f pg_regress regression.diffs
49 pg_regress: pg_regress.sh $(top_builddir)/src/Makefile.global
50 sed -e 's,@bindir@,$(bindir),g' \
51 -e 's,@libdir@,$(libdir),g' \
52 -e 's,@pkglibdir@,$(pkglibdir),g' \
53 -e 's,@datadir@,$(datadir),g' \
54 -e 's/@VERSION@/$(VERSION)/g' \
55 -e 's/@host_tuple@/$(host_tuple)/g' \
56 -e 's,@GMAKE@,$(MAKE),g' \
57 -e 's/@enable_shared@/$(enable_shared)/g' \
58 -e 's/@GCC@/$(GCC)/g' \
61 # When doing a VPATH build, copy over the .pgc, .stdout and .stderr
62 # files so that the driver script can find them. We have to use an
63 # absolute path for the targets, because otherwise make will try to
64 # locate the missing files using VPATH, and will find them in
65 # $(srcdir), but the point here is that we want to copy them from
66 # $(srcdir) to the build directory.
69 remaining_files_src := $(wildcard $(srcdir)/*/*.pgc) $(wildcard $(srcdir)/expected/*.c) $(wildcard $(srcdir)/expected/*.stdout) $(wildcard $(srcdir)/expected/*.stderr)
70 remaining_files_build := $(patsubst $(srcdir)/%, $(abs_builddir)/%, $(remaining_files_src))
72 all: $(remaining_files_build)
73 $(remaining_files_build): $(abs_builddir)/%: $(srcdir)/%
79 sh ./pg_regress --dbname=regress1 --temp-install --top-builddir=$(top_builddir) --temp-port=$(TEMP_PORT) --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE)
81 # the same options, but with --listen-on-tcp
83 sh ./pg_regress --dbname=regress1 --temp-install --top-builddir=$(top_builddir) --temp-port=$(TEMP_PORT) --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE) --listen-on-tcp
86 sh ./pg_regress --dbname=regress1 --top-builddir=$(top_builddir) --load-language=plpgsql $(NOLOCALE)