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

Commit314ed5d

Browse files
committed
Define the FRONTEND symbol in postgres_fe.h, which allows us to eliminate
duplicative -DFRONTEND flags from many Makefiles. We still need Makefilecontrol of the symbol in a few places that compile frontend-or-backendsrc/port/ files, but it's a lot cleaner than before.Hiroshi Saito
1 parent77c166b commit314ed5d

File tree

15 files changed

+28
-34
lines changed

15 files changed

+28
-34
lines changed

‎src/bin/initdb/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
66
# Portions Copyright (c) 1994, Regents of the University of California
77
#
8-
# $PostgreSQL: pgsql/src/bin/initdb/Makefile,v 1.52 2007/01/05 22:19:47 momjian Exp $
8+
# $PostgreSQL: pgsql/src/bin/initdb/Makefile,v 1.53 2007/09/2719:53:43 tgl Exp $
99
#
1010
#-------------------------------------------------------------------------
1111

@@ -14,7 +14,7 @@ subdir = src/bin/initdb
1414
top_builddir = ../../..
1515
include$(top_builddir)/src/Makefile.global
1616

17-
overrideCPPFLAGS := -DFRONTEND -I$(libpq_srcdir)$(CPPFLAGS)
17+
overrideCPPFLAGS := -I$(libpq_srcdir)$(CPPFLAGS)
1818

1919
OBJS=initdb.o$(WIN32RES)
2020

‎src/bin/pg_config/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Copyright (c) 1998-2007, PostgreSQL Global Development Group
66
#
7-
# $PostgreSQL: pgsql/src/bin/pg_config/Makefile,v 1.18 2007/01/05 22:19:48 momjian Exp $
7+
# $PostgreSQL: pgsql/src/bin/pg_config/Makefile,v 1.19 2007/09/2719:53:43 tgl Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -19,7 +19,6 @@ OBJS= pg_config.o $(WIN32RES)
1919
STD_CPPFLAGS :=$(filter-out -I$(top_srcdir)/src/include -I$(top_builddir)/src/include,$(CPPFLAGS))
2020
STD_LDFLAGS :=$(filter-out -L$(top_builddir)/src/port,$(LDFLAGS))
2121

22-
overrideCPPFLAGS += -DFRONTEND
2322
overrideCPPFLAGS += -DVAL_CONFIGURE="\"$(configure_args)\""
2423
overrideCPPFLAGS += -DVAL_CC="\"$(CC)\""
2524
overrideCPPFLAGS += -DVAL_CPPFLAGS="\"$(STD_CPPFLAGS)\""

‎src/bin/pg_controldata/Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Copyright (c) 1998-2007, PostgreSQL Global Development Group
66
#
7-
# $PostgreSQL: pgsql/src/bin/pg_controldata/Makefile,v 1.15 2007/01/05 22:19:48 momjian Exp $
7+
# $PostgreSQL: pgsql/src/bin/pg_controldata/Makefile,v 1.16 2007/09/2719:53:43 tgl Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -13,8 +13,6 @@ subdir = src/bin/pg_controldata
1313
top_builddir = ../../..
1414
include$(top_builddir)/src/Makefile.global
1515

16-
overrideCPPFLAGS += -DFRONTEND
17-
1816
OBJS= pg_controldata.o pg_crc.o$(WIN32RES)
1917

2018
all: submake-libpgport pg_controldata

‎src/bin/pg_ctl/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
66
# Portions Copyright (c) 1994, Regents of the University of California
77
#
8-
# $PostgreSQL: pgsql/src/bin/pg_ctl/Makefile,v 1.23 2007/01/05 22:19:48 momjian Exp $
8+
# $PostgreSQL: pgsql/src/bin/pg_ctl/Makefile,v 1.24 2007/09/2719:53:43 tgl Exp $
99
#
1010
#-------------------------------------------------------------------------
1111

@@ -14,7 +14,7 @@ subdir = src/bin/pg_ctl
1414
top_builddir = ../../..
1515
include$(top_builddir)/src/Makefile.global
1616

17-
overrideCPPFLAGS := -DFRONTEND -DDEF_PGPORT=$(DEF_PGPORT) -I$(libpq_srcdir)$(CPPFLAGS)
17+
overrideCPPFLAGS := -DDEF_PGPORT=$(DEF_PGPORT) -I$(libpq_srcdir)$(CPPFLAGS)
1818

1919
OBJS=pg_ctl.o$(WIN32RES)
2020

‎src/bin/pg_dump/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
66
# Portions Copyright (c) 1994, Regents of the University of California
77
#
8-
# $PostgreSQL: pgsql/src/bin/pg_dump/Makefile,v 1.63 2007/01/05 22:19:48 momjian Exp $
8+
# $PostgreSQL: pgsql/src/bin/pg_dump/Makefile,v 1.64 2007/09/2719:53:43 tgl Exp $
99
#
1010
#-------------------------------------------------------------------------
1111

@@ -14,7 +14,7 @@ subdir = src/bin/pg_dump
1414
top_builddir = ../../..
1515
include$(top_builddir)/src/Makefile.global
1616

17-
overrideCPPFLAGS := -DFRONTEND -I$(libpq_srcdir)$(CPPFLAGS)
17+
overrideCPPFLAGS := -I$(libpq_srcdir)$(CPPFLAGS)
1818

1919
OBJS=pg_backup_archiver.o pg_backup_db.o pg_backup_custom.o\
2020
pg_backup_files.o pg_backup_null.o pg_backup_tar.o\

‎src/bin/pg_resetxlog/Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Copyright (c) 1998-2007, PostgreSQL Global Development Group
66
#
7-
# $PostgreSQL: pgsql/src/bin/pg_resetxlog/Makefile,v 1.17 2007/01/05 22:19:48 momjian Exp $
7+
# $PostgreSQL: pgsql/src/bin/pg_resetxlog/Makefile,v 1.18 2007/09/2719:53:43 tgl Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -13,8 +13,6 @@ subdir = src/bin/pg_resetxlog
1313
top_builddir = ../../..
1414
include$(top_builddir)/src/Makefile.global
1515

16-
overrideCPPFLAGS += -DFRONTEND
17-
1816
OBJS= pg_resetxlog.o pg_crc.o$(WIN32RES)
1917

2018
all: submake-libpgport pg_resetxlog

‎src/bin/psql/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
66
# Portions Copyright (c) 1994, Regents of the University of California
77
#
8-
# $PostgreSQL: pgsql/src/bin/psql/Makefile,v 1.58 2007/01/05 22:19:48 momjian Exp $
8+
# $PostgreSQL: pgsql/src/bin/psql/Makefile,v 1.59 2007/09/2719:53:43 tgl Exp $
99
#
1010
#-------------------------------------------------------------------------
1111

@@ -17,7 +17,7 @@ include $(top_builddir)/src/Makefile.global
1717

1818
REFDOCDIR=$(top_srcdir)/doc/src/sgml/ref
1919

20-
overrideCPPFLAGS := -DFRONTEND -I$(srcdir) -I$(libpq_srcdir) -I$(top_srcdir)/src/bin/pg_dump$(CPPFLAGS)
20+
overrideCPPFLAGS := -I$(srcdir) -I$(libpq_srcdir) -I$(top_srcdir)/src/bin/pg_dump$(CPPFLAGS)
2121

2222
OBJS=command.o common.o help.o input.o stringutils.o mainloop.o copy.o\
2323
startup.o prompt.o variables.o large_obj.o print.o describe.o\

‎src/bin/scripts/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
66
# Portions Copyright (c) 1994, Regents of the University of California
77
#
8-
# $PostgreSQL: pgsql/src/bin/scripts/Makefile,v 1.37 2007/01/05 22:19:50 momjian Exp $
8+
# $PostgreSQL: pgsql/src/bin/scripts/Makefile,v 1.38 2007/09/2719:53:44 tgl Exp $
99
#
1010
#-------------------------------------------------------------------------
1111

@@ -16,7 +16,7 @@ include $(top_builddir)/src/Makefile.global
1616

1717
PROGRAMS = createdb createlang createuser dropdb droplang dropuser clusterdb vacuumdb reindexdb
1818

19-
overrideCPPFLAGS := -DFRONTEND -I$(top_srcdir)/src/bin/pg_dump -I$(top_srcdir)/src/bin/psql -I$(libpq_srcdir)$(CPPFLAGS)
19+
overrideCPPFLAGS := -I$(top_srcdir)/src/bin/pg_dump -I$(top_srcdir)/src/bin/psql -I$(libpq_srcdir)$(CPPFLAGS)
2020

2121
all: submake-libpq submake-backend$(PROGRAMS)
2222

‎src/include/postgres_fe.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@
1111
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
1212
* Portions Copyright (c) 1995, Regents of the University of California
1313
*
14-
* $PostgreSQL: pgsql/src/include/postgres_fe.h,v 1.12 2007/01/05 22:19:50 momjian Exp $
14+
* $PostgreSQL: pgsql/src/include/postgres_fe.h,v 1.13 2007/09/2719:53:44 tgl Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
1818
#ifndefPOSTGRES_FE_H
1919
#definePOSTGRES_FE_H
2020

21+
#ifndefFRONTEND
22+
#defineFRONTEND 1
23+
#endif
24+
2125
#include"c.h"
2226

2327
#endif/* POSTGRES_FE_H */

‎src/interfaces/ecpg/ecpglib/Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Copyright (c) 1994, Regents of the University of California
66
#
7-
# $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/Makefile,v 1.47 2007/08/14 10:01:52 meskes Exp $
7+
# $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/Makefile,v 1.48 2007/09/27 19:53:44 tgl Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -17,8 +17,7 @@ SO_MAJOR_VERSION= 6
1717
SO_MINOR_VERSION= 0
1818
DLTYPE= library
1919

20-
overrideCPPFLAGS := -DFRONTEND\
21-
-I../include -I$(top_srcdir)/src/interfaces/ecpg/include\
20+
overrideCPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include\
2221
-I$(libpq_srcdir) -I$(top_builddir)/src/port$(CPPFLAGS)
2322
overrideCFLAGS +=$(PTHREAD_CFLAGS)
2423

‎src/interfaces/ecpg/include/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ subdir = src/interfaces/ecpg/include
22
top_builddir = ../../../..
33
include$(top_builddir)/src/Makefile.global
44

5-
overrideCPPFLAGS := -DFRONTEND\
6-
-I../include -I$(top_srcdir)/src/interfaces/ecpg/include\
5+
overrideCPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include\
76
-I$(libpq_srcdir) -I$(top_builddir)/src/port$(CPPFLAGS)
87

98
informix_esql_dir =$(pkgincludedir)/informix/esql

‎src/interfaces/ecpg/pgtypeslib/Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Copyright (c) 1994, Regents of the University of California
66
#
7-
# $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/Makefile,v 1.32 2007/01/20 17:16:17 petere Exp $
7+
# $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/Makefile,v 1.33 2007/09/27 19:53:44 tgl Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -17,8 +17,7 @@ SO_MAJOR_VERSION= 2
1717
SO_MINOR_VERSION= 3
1818
DLTYPE= library
1919

20-
overrideCPPFLAGS := -DFRONTEND\
21-
-I../include -I$(top_srcdir)/src/interfaces/ecpg/include\
20+
overrideCPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include\
2221
-I$(top_srcdir)/src/include/utils -I$(libpq_srcdir)$(CPPFLAGS)
2322
overrideCFLAGS +=$(PTHREAD_CFLAGS)
2423

‎src/tools/findoidjoins/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
#
55
# Copyright (c) 2003-2007, PostgreSQL Global Development Group
66
#
7-
# $PostgreSQL: pgsql/src/tools/findoidjoins/Makefile,v 1.3 2007/01/05 22:20:04 momjian Exp $
7+
# $PostgreSQL: pgsql/src/tools/findoidjoins/Makefile,v 1.4 2007/09/27 19:53:44 tgl Exp $
88
#
99
#-------------------------------------------------------------------------
1010

1111
subdir = src/tools/findoidjoins
1212
top_builddir = ../../..
1313
include$(top_builddir)/src/Makefile.global
1414

15-
overrideCPPFLAGS := -DFRONTEND -I$(libpq_srcdir)$(CPPFLAGS)
15+
overrideCPPFLAGS := -I$(libpq_srcdir)$(CPPFLAGS)
1616

1717
OBJS= findoidjoins.o
1818

‎src/tools/fsync/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
#
55
# Copyright (c) 2003-2007, PostgreSQL Global Development Group
66
#
7-
# $PostgreSQL: pgsql/src/tools/fsync/Makefile,v 1.4 2007/01/05 22:20:05 momjian Exp $
7+
# $PostgreSQL: pgsql/src/tools/fsync/Makefile,v 1.5 2007/09/27 19:53:44 tgl Exp $
88
#
99
#-------------------------------------------------------------------------
1010

1111
subdir = src/tools/fsync
1212
top_builddir = ../../..
1313
include$(top_builddir)/src/Makefile.global
1414

15-
overrideCPPFLAGS := -DFRONTEND -I$(libpq_srcdir)$(CPPFLAGS)
15+
overrideCPPFLAGS := -I$(libpq_srcdir)$(CPPFLAGS)
1616

1717
OBJS= test_fsync.o
1818

‎src/tools/msvc/Mkvcbuild.pm

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package Mkvcbuild;
33
#
44
# Package that generates build files for msvc build
55
#
6-
# $PostgreSQL: pgsql/src/tools/msvc/Mkvcbuild.pm,v 1.16 2007/08/21 15:10:41 mha Exp $
6+
# $PostgreSQL: pgsql/src/tools/msvc/Mkvcbuild.pm,v 1.17 2007/09/27 19:53:44 tgl Exp $
77
#
88
use Carp;
99
use Win32;
@@ -341,7 +341,6 @@ sub mkvcbuild
341341
$pgregress->AddFile('src\test\regress\pg_regress_main.c');
342342
$pgregress->AddIncludeDir('src\port');
343343
$pgregress->AddDefine('HOST_TUPLE="i686-pc-win32vc"');
344-
$pgregress->AddDefine('FRONTEND');
345344
$pgregress->AddReference($libpgport);
346345

347346
$solution->Save();
@@ -359,7 +358,6 @@ sub AddSimpleFrontend
359358

360359
my$p =$solution->AddProject($n,'exe','bin');
361360
$p->AddDir('src\bin\\' .$n);
362-
$p->AddDefine('FRONTEND');
363361
$p->AddReference($libpgport);
364362
if ($uselibpq)
365363
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp