mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
Allow pg_regress to be run outside the build tree. Look for input files
in both input and output dir, to handle vpath builds more simply.
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
# PGXS: PostgreSQL extensions makefile
|
||||
|
||||
# $PostgreSQL: pgsql/src/makefiles/pgxs.mk,v 1.12 2008/04/07 14:15:58 petere Exp $
|
||||
# $PostgreSQL: pgsql/src/makefiles/pgxs.mk,v 1.13 2008/10/01 22:38:56 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,23 +232,6 @@ endif
|
||||
# where to find psql for running the tests
|
||||
PSQLDIR = $(bindir)
|
||||
|
||||
# When doing a VPATH build, must copy over the test .sql and .out
|
||||
# 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)/sql/*.sql) $(wildcard $(srcdir)/expected/*.out) $(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
|
||||
|
Reference in New Issue
Block a user