aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2020-05-31 18:33:00 -0400
committerAndrew Dunstan <andrew@dunslane.net>2020-05-31 18:35:52 -0400
commitbb45c5de2750f8aa5ab501aa327ababafed890d2 (patch)
treeee880eb4bc32d53f83d21da89e6dfa9b183b0ad2
parentf140d9b6e0aff91e07b7dd80cf0915bb19f02a9c (diff)
downloadpostgresql-bb45c5de2750f8aa5ab501aa327ababafed890d2.tar.gz
postgresql-bb45c5de2750f8aa5ab501aa327ababafed890d2.zip
Make install-tests target work with vpath builds
Also add a top-level install-tests target. Backpatch to all live branches. Craig Ringer, tweaked by me.
-rw-r--r--GNUmakefile.in1
-rw-r--r--src/test/regress/GNUmakefile4
2 files changed, 3 insertions, 2 deletions
diff --git a/GNUmakefile.in b/GNUmakefile.in
index 97c0d4e69ea..b97d75e6c2e 100644
--- a/GNUmakefile.in
+++ b/GNUmakefile.in
@@ -70,6 +70,7 @@ check check-tests installcheck installcheck-parallel installcheck-tests:
$(call recurse,check-world,src/test src/pl src/interfaces/ecpg contrib src/bin,check)
$(call recurse,installcheck-world,src/test src/pl src/interfaces/ecpg contrib src/bin,installcheck)
+$(call recurse,install-tests,src/test/regress,install-tests)
GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
./config.status $@
diff --git a/src/test/regress/GNUmakefile b/src/test/regress/GNUmakefile
index 487d6589b45..dd54aedd9ab 100644
--- a/src/test/regress/GNUmakefile
+++ b/src/test/regress/GNUmakefile
@@ -89,8 +89,8 @@ regress_data_files = \
install-tests: all install install-lib installdirs-tests
$(MAKE) -C $(top_builddir)/contrib/spi install
- for file in $(regress_data_files); do \
- $(INSTALL_DATA) $$file '$(DESTDIR)$(pkglibdir)/regress/'$$file || exit; \
+ for file in $(subst $(srcdir)/,,$(regress_data_files)); do \
+ $(INSTALL_DATA) $(srcdir)/$$file '$(DESTDIR)$(pkglibdir)/regress/'$$file || exit; \
done
installdirs-tests: installdirs