1
1
# -------------------------------------------------------------------------
2
2
#
3
3
# GNUmakefile--
4
- # Makefile for regress (the regression tests)
4
+ # Makefile for src/test/ regress (the regression tests)
5
5
#
6
- # Copyright (c) 1994, Regents of the University of California
6
+ # Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
7
+ # Portions Copyright (c) 1994, Regents of the University of California
7
8
#
8
- #
9
- # IDENTIFICATION
10
- # $PostgreSQL: pgsql/src/test/regress/GNUmakefile,v 1.50 2005/07/17 18:28:45 tgl Exp $
9
+ # $PostgreSQL: pgsql/src/test/regress/GNUmakefile,v 1.51 2005/07/25 00:58:27 tgl Exp $
11
10
#
12
11
# -------------------------------------------------------------------------
13
12
@@ -17,11 +16,6 @@ include $(top_builddir)/src/Makefile.global
17
16
18
17
contribdir := $(top_builddir ) /contrib
19
18
20
- override CPPFLAGS := -I$(libpq_srcdir ) $(CPPFLAGS )
21
- override CFLAGS += $(CFLAGS_SL )
22
-
23
- SHLIB_LINK = $(BE_DLLLIBS )
24
-
25
19
# port number for temp-installation test postmaster
26
20
TEMP_PORT = 5$(DEF_PGPORT )
27
21
@@ -59,13 +53,28 @@ pg_regress: pg_regress.sh GNUmakefile $(top_builddir)/src/Makefile.global
59
53
60
54
# Build dynamically-loaded object file for CREATE FUNCTION ... LANGUAGE 'C'.
61
55
62
- DLOBJS := regress$(DLSUFFIX )
63
- # This is for some platforms
64
- ifdef EXPSUFF
65
- DLOBJS += regress$(EXPSUFF )
66
- endif
56
+ NAME = regress
57
+ SO_MAJOR_VERSION = 0
58
+ SO_MINOR_VERSION = 0
59
+ OBJS = regress.o pgsleep.o
60
+ SHLIB_LINK = $(BE_DLLLIBS )
61
+
62
+ include $(top_srcdir ) /src/Makefile.shlib
63
+
64
+ all : $(NAME )$(DLSUFFIX )
65
+
66
+ $(NAME )$(DLSUFFIX ) : $(shlib )
67
+ rm -f $(NAME )$(DLSUFFIX )
68
+ $(LN_S ) $(shlib ) $(NAME )$(DLSUFFIX )
69
+
70
+ # regress.so needs pg_usleep, which on some platforms can't be linked
71
+ # from the main backend (though I'd sure like to know why not).
72
+ # We can't incorporate libpgport directly either, since it's not built
73
+ # with appropriate options to build a shared lib. Instead,
74
+ # symlink the source file in here and build our own object file.
67
75
68
- all : $(DLOBJS )
76
+ pgsleep.c : % : $(top_srcdir ) /src/port/%
77
+ rm -f $@ && $(LN_S ) $< .
69
78
70
79
71
80
# Build test input and expected files
@@ -163,10 +172,11 @@ bigcheck:
163
172
# # Clean up
164
173
# #
165
174
166
- clean distclean maintainer-clean :
175
+ clean distclean maintainer-clean : clean-lib
167
176
# things built by `all' target
177
+ rm -f $(NAME)$(DLSUFFIX) $(OBJS) pgsleep.c
168
178
$(MAKE) -C $(contribdir)/spi clean
169
- rm -f $(output_files) $(input_files) $(DLOBJS) regress.o pg_regress
179
+ rm -f $(output_files) $(input_files) pg_regress
170
180
# things created by various check targets
171
181
rm -rf testtablespace
172
182
rm -rf results tmp_check log
0 commit comments