aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2008-10-03 08:00:16 +0000
committerPeter Eisentraut <peter_e@gmx.net>2008-10-03 08:00:16 +0000
commit8f1658cbf32547a34a07b59ebceabb0b80d8a085 (patch)
tree2946a8989e4d72726344d7a9bdc812436a563ba0 /src
parent706a308806a066017c63024c454bb02953c9822c (diff)
downloadpostgresql-8f1658cbf32547a34a07b59ebceabb0b80d8a085.tar.gz
postgresql-8f1658cbf32547a34a07b59ebceabb0b80d8a085.zip
Put back the copying of some of the regression test data files for vpath
builds. It is too complicated to fix in another way for now.
Diffstat (limited to 'src')
-rw-r--r--src/makefiles/pgxs.mk19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/makefiles/pgxs.mk b/src/makefiles/pgxs.mk
index 61fa05b413b..bdc92a86683 100644
--- a/src/makefiles/pgxs.mk
+++ b/src/makefiles/pgxs.mk
@@ -1,6 +1,6 @@
# PGXS: PostgreSQL extensions makefile
-# $PostgreSQL: pgsql/src/makefiles/pgxs.mk,v 1.14 2008/10/02 12:25:25 tgl Exp $
+# $PostgreSQL: pgsql/src/makefiles/pgxs.mk,v 1.15 2008/10/03 08:00:16 petere Exp $
# This file contains generic rules to build many kinds of simple
# extension modules. You only need to set a few variables and include
@@ -232,6 +232,23 @@ endif
# where to find psql for running the tests
PSQLDIR = $(bindir)
+# When doing a VPATH build, must copy over the data 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
+abs_builddir := $(shell pwd)
+test_files_src := $(wildcard $(srcdir)/data/*.data)
+test_files_build := $(patsubst $(srcdir)/%, $(abs_builddir)/%, $(test_files_src))
+
+all: $(test_files_build)
+$(test_files_build): $(abs_builddir)/%: $(srcdir)/%
+ ln -s $< $@
+endif # VPATH
+
.PHONY: submake
submake:
ifndef PGXS