2007-02-09 16:56:00 +01:00
|
|
|
# $PostgreSQL: pgsql/src/interfaces/ecpg/test/Makefile,v 1.66 2007/02/09 15:55:59 petere Exp $
|
1998-05-06 15:03:47 +02:00
|
|
|
|
2001-08-11 12:52:09 +02:00
|
|
|
subdir = src/interfaces/ecpg/test
|
|
|
|
top_builddir = ../../../..
|
|
|
|
include $(top_builddir)/src/Makefile.global
|
1999-12-16 07:53:12 +01:00
|
|
|
|
2006-08-02 15:43:23 +02:00
|
|
|
# port number for temp-installation test postmaster
|
2006-08-04 10:52:18 +02:00
|
|
|
# this is also defined in test/connect/Makefile
|
2006-08-02 15:43:23 +02:00
|
|
|
TEMP_PORT = 5$(DEF_PGPORT)
|
1998-05-06 15:03:47 +02:00
|
|
|
|
2006-08-02 15:43:23 +02:00
|
|
|
# default encoding
|
|
|
|
MULTIBYTE = SQL_ASCII
|
1998-02-10 17:44:17 +01:00
|
|
|
|
2006-08-02 15:43:23 +02:00
|
|
|
# locale
|
2007-02-09 16:56:00 +01:00
|
|
|
NOLOCALE =
|
2006-08-02 15:43:23 +02:00
|
|
|
ifdef NO_LOCALE
|
|
|
|
NOLOCALE += --no-locale
|
2003-12-20 00:29:15 +01:00
|
|
|
endif
|
1999-11-02 13:11:53 +01:00
|
|
|
|
2006-08-28 18:13:11 +02:00
|
|
|
ifneq ($(PORTNAME),win32)
|
|
|
|
abs_builddir := $(shell pwd)
|
|
|
|
else
|
|
|
|
abs_builddir := $(shell pwd -W)
|
|
|
|
endif
|
|
|
|
|
2007-01-20 18:16:17 +01:00
|
|
|
all install installdirs uninstall distprep:
|
2006-08-02 15:43:23 +02:00
|
|
|
$(MAKE) -C connect $@
|
2007-01-12 12:27:28 +01:00
|
|
|
$(MAKE) -C expected $@
|
2006-08-02 15:43:23 +02:00
|
|
|
$(MAKE) -C sql $@
|
|
|
|
$(MAKE) -C pgtypeslib $@
|
2006-09-05 14:11:03 +02:00
|
|
|
$(MAKE) -C preproc $@
|
2006-08-02 15:43:23 +02:00
|
|
|
$(MAKE) -C compat_informix $@
|
|
|
|
$(MAKE) -C thread $@
|
2006-08-04 10:52:18 +02:00
|
|
|
|
|
|
|
clean distclean maintainer-clean:
|
|
|
|
$(MAKE) -C connect $@
|
|
|
|
$(MAKE) -C connect extraclean
|
2007-01-12 12:27:28 +01:00
|
|
|
$(MAKE) -C expected extraclean
|
2006-08-04 10:52:18 +02:00
|
|
|
$(MAKE) -C sql $@
|
|
|
|
$(MAKE) -C pgtypeslib $@
|
2006-09-05 14:11:03 +02:00
|
|
|
$(MAKE) -C preproc $@
|
2006-08-04 10:52:18 +02:00
|
|
|
$(MAKE) -C compat_informix $@
|
|
|
|
$(MAKE) -C thread $@
|
2006-08-04 16:18:09 +02:00
|
|
|
rm -rf tmp_check results log
|
2006-08-28 18:13:11 +02:00
|
|
|
rm -f pg_regress regression.diffs
|
2006-08-02 15:43:23 +02:00
|
|
|
|
2006-08-28 18:13:11 +02:00
|
|
|
all: pg_regress
|
2006-08-02 15:43:23 +02:00
|
|
|
|
2006-08-28 18:13:11 +02:00
|
|
|
pg_regress: pg_regress.sh $(top_builddir)/src/Makefile.global
|
2006-08-02 15:43:23 +02:00
|
|
|
sed -e 's,@bindir@,$(bindir),g' \
|
|
|
|
-e 's,@libdir@,$(libdir),g' \
|
|
|
|
-e 's,@pkglibdir@,$(pkglibdir),g' \
|
|
|
|
-e 's,@datadir@,$(datadir),g' \
|
|
|
|
-e 's/@VERSION@/$(VERSION)/g' \
|
|
|
|
-e 's/@host_tuple@/$(host_tuple)/g' \
|
|
|
|
-e 's,@GMAKE@,$(MAKE),g' \
|
|
|
|
-e 's/@enable_shared@/$(enable_shared)/g' \
|
|
|
|
$< >$@
|
|
|
|
|
2006-08-28 18:13:11 +02:00
|
|
|
# When doing a VPATH build, copy over the .pgc, .stdout and .stderr
|
|
|
|
# files so that the driver script can find them. We have to use an
|
|
|
|
# absolute path for the targets, because otherwise make will try to
|
|
|
|
# locate the missing files using VPATH, and will find them in
|
|
|
|
# $(srcdir), but the point here is that we want to copy them from
|
|
|
|
# $(srcdir) to the build directory.
|
|
|
|
|
|
|
|
ifdef VPATH
|
|
|
|
remaining_files_src := $(wildcard $(srcdir)/*/*.pgc) $(wildcard $(srcdir)/expected/*.c) $(wildcard $(srcdir)/expected/*.stdout) $(wildcard $(srcdir)/expected/*.stderr)
|
|
|
|
remaining_files_build := $(patsubst $(srcdir)/%, $(abs_builddir)/%, $(remaining_files_src))
|
|
|
|
|
|
|
|
all: $(remaining_files_build)
|
|
|
|
$(remaining_files_build): $(abs_builddir)/%: $(srcdir)/%
|
|
|
|
ln -s $< $@
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
check: all
|
2006-08-29 14:33:45 +02:00
|
|
|
sh ./pg_regress --dbname=regress1 --temp-install --top-builddir=$(top_builddir) --temp-port=$(TEMP_PORT) --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE)
|
2006-08-02 15:43:23 +02:00
|
|
|
|
2006-08-04 10:52:18 +02:00
|
|
|
# the same options, but with --listen-on-tcp
|
2006-08-28 18:13:11 +02:00
|
|
|
checktcp: all
|
2006-08-29 14:33:45 +02:00
|
|
|
sh ./pg_regress --dbname=regress1 --temp-install --top-builddir=$(top_builddir) --temp-port=$(TEMP_PORT) --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE) --listen-on-tcp
|
2001-08-11 12:52:09 +02:00
|
|
|
|
2006-08-28 18:13:11 +02:00
|
|
|
installcheck: all
|
2006-08-29 14:33:45 +02:00
|
|
|
sh ./pg_regress --dbname=regress1 --top-builddir=$(top_builddir) --load-language=plpgsql $(NOLOCALE)
|