Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcb504a4

Browse files
committed
Change build of regress.so to use Makefile.shlib instead of depending
on the not-very-good .so pattern rules in the port-specific Makefiles.(This leaves only pgxs' MODULES case needing those rules.) Also,compile pgsleep.c locally and add it to regress.so to avoid failureon AIX.
1 parentac65246 commitcb504a4

File tree

1 file changed

+28
-18
lines changed

1 file changed

+28
-18
lines changed

‎src/test/regress/GNUmakefile

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
#-------------------------------------------------------------------------
22
#
33
# GNUmakefile--
4-
# Makefile for regress (the regression tests)
4+
# Makefile forsrc/test/regress (the regression tests)
55
#
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
78
#
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 $
1110
#
1211
#-------------------------------------------------------------------------
1312

@@ -17,11 +16,6 @@ include $(top_builddir)/src/Makefile.global
1716

1817
contribdir :=$(top_builddir)/contrib
1918

20-
overrideCPPFLAGS := -I$(libpq_srcdir)$(CPPFLAGS)
21-
overrideCFLAGS +=$(CFLAGS_SL)
22-
23-
SHLIB_LINK =$(BE_DLLLIBS)
24-
2519
# port number for temp-installation test postmaster
2620
TEMP_PORT = 5$(DEF_PGPORT)
2721

@@ -59,13 +53,28 @@ pg_regress: pg_regress.sh GNUmakefile $(top_builddir)/src/Makefile.global
5953

6054
# Build dynamically-loaded object file for CREATE FUNCTION ... LANGUAGE 'C'.
6155

62-
DLOBJS := regress$(DLSUFFIX)
63-
# This is for some platforms
64-
ifdefEXPSUFF
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.
6775

68-
all:$(DLOBJS)
76+
pgsleep.c:% :$(top_srcdir)/src/port/%
77+
rm -f$@&&$(LN_S)$<.
6978

7079

7180
# Build test input and expected files
@@ -163,10 +172,11 @@ bigcheck:
163172
## Clean up
164173
##
165174

166-
cleandistcleanmaintainer-clean:
175+
cleandistcleanmaintainer-clean: clean-lib
167176
# things built by `all' target
177+
rm -f $(NAME)$(DLSUFFIX) $(OBJS) pgsleep.c
168178
$(MAKE) -C $(contribdir)/spi clean
169-
rm -f $(output_files) $(input_files)$(DLOBJS) regress.opg_regress
179+
rm -f $(output_files) $(input_files) pg_regress
170180
# things created by various check targets
171181
rm -rf testtablespace
172182
rm -rf results tmp_check log

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp