postgres.git / summary / log / commit / refs

commit    b9f152d25a11e535975df971e536a2e27386179a
Author:   Andrew Dunstan <andrew@dunslane.net>
Date:     Sun May 31 22:33:00 2020 +0000
First released in: 13.0, 9.5.23, 9.6.19, 10.14, 11.9, 12.4

    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.


GNUmakefile.in | 1 + src/test/regress/GNUmakefile | 4 ++-- 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 587de56fb90..332d0b833f9 100644 --- a/src/test/regress/GNUmakefile +++ b/src/test/regress/GNUmakefile @@ -85,8 +85,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 [parent: 43d7934a3a92]