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.
This commit is contained in:
Andrew Dunstan 2020-05-31 18:33:00 -04:00
parent f140d9b6e0
commit bb45c5de27
2 changed files with 3 additions and 2 deletions

View File

@ -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 $@

View File

@ -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