Skip to content

Commit af4ea50

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 4cad253 commit af4ea50

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

GNUmakefile.in

+1
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

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ regress_data_files = \
8787

8888
install-tests: all install install-lib installdirs-tests
8989
$(MAKE) -C $(top_builddir)/contrib/spi install
90-
for file in $(regress_data_files); do \
91-
$(INSTALL_DATA) $$file '$(DESTDIR)$(pkglibdir)/regress/'$$file || exit; \
90+
for file in $(subst $(srcdir)/,,$(regress_data_files)); do \
91+
$(INSTALL_DATA) $(srcdir)/$$file '$(DESTDIR)$(pkglibdir)/regress/'$$file || exit; \
9292
done
9393

9494
installdirs-tests: installdirs

0 commit comments

Comments
 (0)