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

Commit5652ea7

Browse files
committed
Make pg_regress.c get paths from pg_config_paths.h, instead of -D
switches passed from the Makefile. This looks like it will fixproblem with virtual vs real paths under msys.
1 parent9dc842f commit5652ea7

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

‎src/test/regress/GNUmakefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
77
# Portions Copyright (c) 1994, Regents of the University of California
88
#
9-
# $PostgreSQL: pgsql/src/test/regress/GNUmakefile,v 1.60 2006/07/19 17:02:59 tgl Exp $
9+
# $PostgreSQL: pgsql/src/test/regress/GNUmakefile,v 1.61 2006/07/20 01:16:57 tgl Exp $
1010
#
1111
#-------------------------------------------------------------------------
1212

@@ -35,10 +35,7 @@ NOLOCALE += --no-locale
3535
endif
3636

3737
# stuff to pass into build of pg_regress
38-
EXTRADEFS = '-DPGBINDIR="$(bindir)"'\
39-
'-DLIBDIR="$(libdir)"'\
40-
'-DPGSHAREDIR="$(datadir)"'\
41-
'-DHOST_TUPLE="$(host_tuple)"'\
38+
EXTRADEFS = '-DHOST_TUPLE="$(host_tuple)"'\
4239
'-DMAKEPROG="$(MAKE)"'\
4340
'-DSHELLPROG="$(SHELL)"'
4441

@@ -53,9 +50,12 @@ all: submake-libpgport pg_regress$(X)
5350
pg_regress$(X): pg_regress.o
5451
$(CC)$(CFLAGS)$^$(LDFLAGS)$(LIBS) -o$@
5552

56-
# depend on Makefile.global to ensure that symbol changes propagate
57-
pg_regress.o: pg_regress.c$(top_builddir)/src/Makefile.global
58-
$(CC)$(CFLAGS)$(CPPFLAGS)$(EXTRADEFS) -c -o$@$<
53+
# dependencies ensure that path changes propagate
54+
pg_regress.o: pg_regress.c$(top_builddir)/src/port/pg_config_paths.h
55+
$(CC)$(CFLAGS)$(CPPFLAGS) -I$(top_builddir)/src/port$(EXTRADEFS) -c -o$@$<
56+
57+
$(top_builddir)/src/port/pg_config_paths.h:$(top_builddir)/src/Makefile.global
58+
$(MAKE) -C$(top_builddir)/src/port pg_config_paths.h
5959

6060
install: pg_regress$(X)
6161
$(INSTALL_PROGRAM) pg_regress$(X)'$(DESTDIR)$(pgxsdir)/$(subdir)/pg_regress$(X)'

‎src/test/regress/pg_regress.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
1212
* Portions Copyright (c) 1994, Regents of the University of California
1313
*
14-
* $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.5 2006/07/19 17:02:59 tgl Exp $
14+
* $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.6 2006/07/20 01:16:57 tgl Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
@@ -25,6 +25,7 @@
2525
#include<unistd.h>
2626

2727
#include"getopt_long.h"
28+
#include"pg_config_paths.h"
2829

2930
#ifndefWIN32
3031
#definePID_TYPE pid_t
@@ -51,9 +52,11 @@ typedef struct _resultmap
5152
}_resultmap;
5253

5354
/*
54-
* Values inserted from Makefile. (It might seem tempting to get the paths
55-
* via get_share_path() and friends, but that's not going to work because
56-
* pg_regress is typically not executed from an installed bin directory.)
55+
* Values obtained from pg_config_paths.h and Makefile. (It might seem
56+
* tempting to get the paths via get_share_path() and friends, but that's
57+
* not going to work because pg_regress is typically not executed from an
58+
* installed bin directory. In any case, for our purposes the configured
59+
* paths are what we want anyway.)
5760
*/
5861
staticchar*bindir=PGBINDIR;
5962
staticchar*libdir=LIBDIR;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp