]> granicus.if.org Git - postgresql/blob - src/interfaces/ecpg/test/Makefile
also adjust MinGW expected file to new setup
[postgresql] / src / interfaces / ecpg / test / Makefile
1 # $PostgreSQL: pgsql/src/interfaces/ecpg/test/Makefile,v 1.63 2007/01/12 11:27:28 meskes Exp $
2
3 subdir = src/interfaces/ecpg/test
4 top_builddir = ../../../..
5 include $(top_builddir)/src/Makefile.global
6
7 # port number for temp-installation test postmaster
8 # this is also defined in test/connect/Makefile
9 TEMP_PORT = 5$(DEF_PGPORT)
10
11 # default encoding
12 MULTIBYTE = SQL_ASCII
13
14 # locale
15 NOLOCALE :=
16 ifdef NO_LOCALE
17 NOLOCALE += --no-locale
18 endif
19
20 ifneq ($(PORTNAME),win32)
21 abs_builddir := $(shell pwd)
22 else
23 abs_builddir := $(shell pwd -W)
24 endif
25
26 all install installdirs uninstall dep depend distprep:
27         $(MAKE) -C connect $@
28         $(MAKE) -C expected $@
29         $(MAKE) -C sql $@
30         $(MAKE) -C pgtypeslib $@
31         $(MAKE) -C preproc $@
32         $(MAKE) -C compat_informix $@
33         $(MAKE) -C thread $@
34
35 clean distclean maintainer-clean:
36         $(MAKE) -C connect $@
37         $(MAKE) -C connect extraclean
38         $(MAKE) -C expected extraclean
39         $(MAKE) -C sql $@
40         $(MAKE) -C pgtypeslib $@
41         $(MAKE) -C preproc $@
42         $(MAKE) -C compat_informix $@
43         $(MAKE) -C thread $@
44         rm -rf tmp_check results log
45         rm -f pg_regress regression.diffs
46
47 all: pg_regress
48
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' \
59           $< >$@
60
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.
67
68 ifdef VPATH
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))
71
72 all: $(remaining_files_build)
73 $(remaining_files_build): $(abs_builddir)/%: $(srcdir)/%
74         ln -s $< $@
75 endif
76
77
78 check: all
79         sh ./pg_regress  --dbname=regress1 --temp-install --top-builddir=$(top_builddir) --temp-port=$(TEMP_PORT) --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE)
80
81 # the same options, but with --listen-on-tcp
82 checktcp: all
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
84
85 installcheck: all
86         sh ./pg_regress  --dbname=regress1 --top-builddir=$(top_builddir) --load-language=plpgsql $(NOLOCALE)