diff options
author | Tom Lane | 2005-05-24 17:07:41 +0000 |
---|---|---|
committer | Tom Lane | 2005-05-24 17:07:41 +0000 |
commit | bc6444dc6a4b98d6d8b65dede360531ce2294ece (patch) | |
tree | 546c61a1d4ae10ffa409bfa1c2370758bc4bc9c3 /src/pl/plpython | |
parent | 1a022f71d86d935cd068a263f1884a24acdf0829 (diff) |
Fix PL makefiles to support running regression tests in VPATH builds.
Diffstat (limited to 'src/pl/plpython')
-rw-r--r-- | src/pl/plpython/Makefile | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/pl/plpython/Makefile b/src/pl/plpython/Makefile index 3720dc3cef0..c8eead2601d 100644 --- a/src/pl/plpython/Makefile +++ b/src/pl/plpython/Makefile @@ -1,4 +1,4 @@ -# $PostgreSQL: pgsql/src/pl/plpython/Makefile,v 1.20 2005/05/17 18:26:23 tgl Exp $ +# $PostgreSQL: pgsql/src/pl/plpython/Makefile,v 1.21 2005/05/24 17:07:41 tgl Exp $ subdir = src/pl/plpython top_builddir = ../../.. @@ -66,6 +66,27 @@ include $(top_srcdir)/src/Makefile.shlib all: all-lib +# When doing a VPATH build, copy over the .sql and .out files so that the +# test script can find them. See comments in src/test/regress/GNUmakefile. +ifdef VPATH + +ifneq ($(PORTNAME),win32) +abs_srcdir := $(shell cd $(srcdir) && pwd) +abs_builddir := $(shell pwd) +else +abs_srcdir := $(shell cd $(srcdir) && pwd -W) +abs_builddir := $(shell pwd -W) +endif + +test_files_src := $(wildcard $(srcdir)/sql/*.sql) $(wildcard $(srcdir)/expected/*.out) +test_files_build := $(patsubst $(srcdir)/%, $(abs_builddir)/%, $(test_files_src)) + +all: $(test_files_build) +$(test_files_build): $(abs_builddir)/%: $(srcdir)/% + ln -s $< $@ + +endif + install: all installdirs ifeq ($(enable_shared), yes) $(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(pkglibdir)/plpython$(DLSUFFIX) |