]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Make install-tests target work with vpath builds
authorAndrew Dunstan <andrew@dunslane.net>
Sun, 31 May 2020 22:33:00 +0000 (18:33 -0400)
committerAndrew Dunstan <andrew@dunslane.net>
Sun, 31 May 2020 22:35:21 +0000 (18:35 -0400)
Also add a top-level install-tests target.

Backpatch to all live branches.

Craig Ringer, tweaked by me.

GNUmakefile.in
src/test/regress/GNUmakefile

index af04ed9f2f670f5ec5a85275fe9277c0447d115d..31e2efed8d47edb230e0fa2a0b4830b06d886925 100644 (file)
@@ -72,6 +72,7 @@ $(call recurse,check-world,src/test src/pl src/interfaces/ecpg contrib src/bin,c
 $(call recurse,checkprep,  src/test src/pl src/interfaces/ecpg contrib src/bin)
 
 $(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 $@
index 378bd0175305407ec63912fabdfcda2720aa8d0f..82c6633b15ac8eea039b2f35447e5bdfcb2c0cfc 100644 (file)
@@ -87,8 +87,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