File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 1- # $Header: /cvsroot/pgsql/contrib/contrib-global.mk,v 1.4 2002/11/01 23:45:37 tgl Exp $
1+ # $Header: /cvsroot/pgsql/contrib/contrib-global.mk,v 1.5 2002/11/02 00:16:21 tgl Exp $
22
33# This file contains generic rules to build many kinds of simple
44# contrib modules. You only need to set a few variables and include
@@ -185,6 +185,24 @@ distclean maintainer-clean: clean
185185
186186
187187ifdef REGRESS
188+
189+ # When doing a VPATH build, must copy over the test .sql and .out
190+ # files so that the driver script can find them. We have to use an
191+ # absolute path for the targets, because otherwise make will try to
192+ # locate the missing files using VPATH, and will find them in
193+ # $(srcdir), but the point here is that we want to copy them from
194+ # $(srcdir) to the build directory.
195+
196+ ifdef VPATH
197+ abs_builddir := $(shell pwd)
198+ test_files_src := $(wildcard $(srcdir ) /sql/* .sql) $(wildcard $(srcdir ) /expected/* .out) $(wildcard $(srcdir ) /data/* .data)
199+ test_files_build := $(patsubst $(srcdir ) /% , $(abs_builddir ) /% , $(test_files_src ) )
200+
201+ all : $(test_files_build )
202+ $(test_files_build ) : $(abs_builddir ) /% : $(srcdir ) /%
203+ ln -s $< $@
204+ endif # VPATH
205+
188206.PHONY : submake
189207submake :
190208 $(MAKE ) -C $(top_builddir ) /src/test/regress pg_regress
You can’t perform that action at this time.
0 commit comments