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

Commitb691c18

Browse files
committed
Simplify passing of configure arguments to pg_config
The previous system had configure put the value into the makefiles andthen have the makefiles pass them to the build of pg_config. That wasput in place when pg_config was a shell script. We can simplify thatby having configure put the value into pg_config.h directly. Thisalso makes the standard build system match how the MSVC build systemalready does it.Discussion:https://www.postgresql.org/message-id/flat/6e457870-cef5-5f1d-b57c-fc89cfb8a788%402ndquadrant.com
1 parent11de6c9 commitb691c18

File tree

7 files changed

+10
-18
lines changed

7 files changed

+10
-18
lines changed

‎configure

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,6 @@ build_vendor
777777
build_cpu
778778
build
779779
PG_MAJORVERSION
780-
configure_args
781780
target_alias
782781
host_alias
783782
build_alias
@@ -2798,7 +2797,10 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
27982797

27992798

28002799

2801-
configure_args=$ac_configure_args
2800+
2801+
cat >>confdefs.h <<_ACEOF
2802+
#define CONFIGURE_ARGS "$ac_configure_args"
2803+
_ACEOF
28022804

28032805

28042806
PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`

‎configure.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ AC_COPYRIGHT([Copyright (c) 1996-2020, PostgreSQL Global Development Group])
2727
AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c])
2828
AC_CONFIG_AUX_DIR(config)
2929
AC_PREFIX_DEFAULT(/usr/local/pgsql)
30-
AC_SUBST(configure_args, [$ac_configure_args])
30+
AC_DEFINE_UNQUOTED(CONFIGURE_ARGS, ["$ac_configure_args"], [Saved arguments from configure])
3131

3232
[PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`]
3333
AC_SUBST(PG_MAJORVERSION)

‎src/Makefile.global.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@ endif # not PGXS
7474

7575
vpathsearch =`for fin$(addsuffix /$(1),$(subst :, ,.$(VPATH)));dotest -r$$f&&echo$$f&&break; done`
7676

77-
# Saved arguments from configure
78-
configure_args = @configure_args@
79-
8077

8178
##########################################################################
8279
#

‎src/common/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ include $(top_builddir)/src/Makefile.global
3131
# don't include subdirectory-path-dependent -I and -L switches
3232
STD_CPPFLAGS :=$(filter-out -I$(top_srcdir)/src/include -I$(top_builddir)/src/include,$(CPPFLAGS))
3333
STD_LDFLAGS :=$(filter-out -L$(top_builddir)/src/common -L$(top_builddir)/src/port,$(LDFLAGS))
34-
overrideCPPFLAGS += -DVAL_CONFIGURE="\"$(configure_args)\""
3534
overrideCPPFLAGS += -DVAL_CC="\"$(CC)\""
3635
overrideCPPFLAGS += -DVAL_CPPFLAGS="\"$(STD_CPPFLAGS)\""
3736
overrideCPPFLAGS += -DVAL_CFLAGS="\"$(CFLAGS)\""

‎src/common/config_info.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,7 @@ get_configdata(const char *my_exec_path, size_t *configdata_len)
124124
i++;
125125

126126
configdata[i].name=pstrdup("CONFIGURE");
127-
#ifdefVAL_CONFIGURE
128-
configdata[i].setting=pstrdup(VAL_CONFIGURE);
129-
#else
130-
configdata[i].setting=pstrdup(_("not recorded"));
131-
#endif
127+
configdata[i].setting=pstrdup(CONFIGURE_ARGS);
132128
i++;
133129

134130
configdata[i].name=pstrdup("CC");

‎src/include/pg_config.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
Changing BLCKSZ requires an initdb. */
4343
#undef BLCKSZ
4444

45+
/* Saved arguments from configure */
46+
#undef CONFIGURE_ARGS
47+
4548
/* Define to the default TCP port number on which the server listens and to
4649
which clients will try to connect. This can be overridden at run-time, but
4750
it's convenient if your clients have the right default compiled in.

‎src/tools/msvc/Solution.pm

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ sub GenerateFiles
195195
ALIGNOF_SHORT=> 2,
196196
AC_APPLE_UNIVERSAL_BUILD=>undef,
197197
BLCKSZ=> 1024 *$self->{options}->{blocksize},
198+
CONFIGURE_ARGS=>'"' .$self->GetFakeConfigure() .'"',
198199
DEF_PGPORT=>$port,
199200
DEF_PGPORT_STR=>qq{"$port"},
200201
ENABLE_GSS=>$self->{options}->{gss} ? 1 :undef,
@@ -538,12 +539,6 @@ sub GenerateFiles
538539
$self->GenerateConfigHeader('src/include/pg_config_ext.h', \%define, 0);
539540
$self->GenerateConfigHeader('src/interfaces/ecpg/include/ecpg_config.h', \%define, 0);
540541

541-
open(my$f,'>>','src/include/pg_config.h')
542-
|| confess"Could not write to src/include/pg_config.h\n";
543-
print$f"\n";
544-
print$f"#define VAL_CONFIGURE\"" .$self->GetFakeConfigure() ."\"\n";
545-
close($f);
546-
547542
$self->GenerateDefFile(
548543
"src/interfaces/libpq/libpqdll.def",
549544
"src/interfaces/libpq/exports.txt",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp