Skip to content

Commit cb9795e

Browse files
committed
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.
1 parent 43d3d73 commit cb9795e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

GNUmakefile.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ $(call recurse,check-world,src/test src/pl src/interfaces/ecpg contrib src/bin,c
7272
$(call recurse,checkprep, src/test src/pl src/interfaces/ecpg contrib src/bin)
7373

7474
$(call recurse,installcheck-world,src/test src/pl src/interfaces/ecpg contrib src/bin,installcheck)
75+
$(call recurse,install-tests,src/test/regress,install-tests)
7576

7677
GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
7778
./config.status $@

src/test/regress/GNUmakefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ regress_data_files = \
8585

8686
install-tests: all install install-lib installdirs-tests
8787
$(MAKE) -C $(top_builddir)/contrib/spi install
88-
for file in $(regress_data_files); do \
89-
$(INSTALL_DATA) $$file '$(DESTDIR)$(pkglibdir)/regress/'$$file || exit; \
88+
for file in $(subst $(srcdir)/,,$(regress_data_files)); do \
89+
$(INSTALL_DATA) $(srcdir)/$$file '$(DESTDIR)$(pkglibdir)/regress/'$$file || exit; \
9090
done
9191

9292
installdirs-tests: installdirs

0 commit comments

Comments
 (0)