Skip to content

Commit bc6444d

Browse files
committed
Fix PL makefiles to support running regression tests in VPATH builds.
1 parent 1a022f7 commit bc6444d

File tree

3 files changed

+66
-3
lines changed

3 files changed

+66
-3
lines changed

src/pl/plperl/GNUmakefile

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Makefile for PL/Perl
2-
# $PostgreSQL: pgsql/src/pl/plperl/GNUmakefile,v 1.21 2005/05/24 08:05:36 neilc Exp $
2+
# $PostgreSQL: pgsql/src/pl/plperl/GNUmakefile,v 1.22 2005/05/24 17:07:41 tgl Exp $
33

44
subdir = src/pl/plperl
55
top_builddir = ../../..
@@ -47,6 +47,27 @@ all: all-lib
4747
SPI.c: SPI.xs
4848
$(PERL) $(perl_privlibexp)/ExtUtils/xsubpp -typemap $(perl_privlibexp)/ExtUtils/typemap $< >$@
4949

50+
# When doing a VPATH build, copy over the .sql and .out files so that the
51+
# test script can find them. See comments in src/test/regress/GNUmakefile.
52+
ifdef VPATH
53+
54+
ifneq ($(PORTNAME),win32)
55+
abs_srcdir := $(shell cd $(srcdir) && pwd)
56+
abs_builddir := $(shell pwd)
57+
else
58+
abs_srcdir := $(shell cd $(srcdir) && pwd -W)
59+
abs_builddir := $(shell pwd -W)
60+
endif
61+
62+
test_files_src := $(wildcard $(srcdir)/sql/*.sql) $(wildcard $(srcdir)/expected/*.out)
63+
test_files_build := $(patsubst $(srcdir)/%, $(abs_builddir)/%, $(test_files_src))
64+
65+
all: $(test_files_build)
66+
$(test_files_build): $(abs_builddir)/%: $(srcdir)/%
67+
ln -s $< $@
68+
69+
endif
70+
5071
install: all installdirs
5172
ifeq ($(enable_shared), yes)
5273
$(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(pkglibdir)/plperl$(DLSUFFIX)

src/pl/plpython/Makefile

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $PostgreSQL: pgsql/src/pl/plpython/Makefile,v 1.20 2005/05/17 18:26:23 tgl Exp $
1+
# $PostgreSQL: pgsql/src/pl/plpython/Makefile,v 1.21 2005/05/24 17:07:41 tgl Exp $
22

33
subdir = src/pl/plpython
44
top_builddir = ../../..
@@ -66,6 +66,27 @@ include $(top_srcdir)/src/Makefile.shlib
6666

6767
all: all-lib
6868

69+
# When doing a VPATH build, copy over the .sql and .out files so that the
70+
# test script can find them. See comments in src/test/regress/GNUmakefile.
71+
ifdef VPATH
72+
73+
ifneq ($(PORTNAME),win32)
74+
abs_srcdir := $(shell cd $(srcdir) && pwd)
75+
abs_builddir := $(shell pwd)
76+
else
77+
abs_srcdir := $(shell cd $(srcdir) && pwd -W)
78+
abs_builddir := $(shell pwd -W)
79+
endif
80+
81+
test_files_src := $(wildcard $(srcdir)/sql/*.sql) $(wildcard $(srcdir)/expected/*.out)
82+
test_files_build := $(patsubst $(srcdir)/%, $(abs_builddir)/%, $(test_files_src))
83+
84+
all: $(test_files_build)
85+
$(test_files_build): $(abs_builddir)/%: $(srcdir)/%
86+
ln -s $< $@
87+
88+
endif
89+
6990
install: all installdirs
7091
ifeq ($(enable_shared), yes)
7192
$(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(pkglibdir)/plpython$(DLSUFFIX)

src/pl/tcl/Makefile

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# Makefile for the pltcl shared object
44
#
5-
# $PostgreSQL: pgsql/src/pl/tcl/Makefile,v 1.46 2005/05/17 18:26:23 tgl Exp $
5+
# $PostgreSQL: pgsql/src/pl/tcl/Makefile,v 1.47 2005/05/24 17:07:41 tgl Exp $
66
#
77
#-------------------------------------------------------------------------
88

@@ -50,6 +50,27 @@ ifeq ($(TCL_SHARED_BUILD), 1)
5050
all: all-lib
5151
$(MAKE) -C modules $@
5252

53+
# When doing a VPATH build, copy over the .sql and .out files so that the
54+
# test script can find them. See comments in src/test/regress/GNUmakefile.
55+
ifdef VPATH
56+
57+
ifneq ($(PORTNAME),win32)
58+
abs_srcdir := $(shell cd $(srcdir) && pwd)
59+
abs_builddir := $(shell pwd)
60+
else
61+
abs_srcdir := $(shell cd $(srcdir) && pwd -W)
62+
abs_builddir := $(shell pwd -W)
63+
endif
64+
65+
test_files_src := $(wildcard $(srcdir)/sql/*.sql) $(wildcard $(srcdir)/expected/*.out)
66+
test_files_build := $(patsubst $(srcdir)/%, $(abs_builddir)/%, $(test_files_src))
67+
68+
all: $(test_files_build)
69+
$(test_files_build): $(abs_builddir)/%: $(srcdir)/%
70+
ln -s $< $@
71+
72+
endif
73+
5374
install: all installdirs
5475
ifeq ($(enable_shared), yes)
5576
$(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(pkglibdir)/$(NAME)$(DLSUFFIX)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy