mirror of
https://github.com/postgres/postgres.git
synced 2025-08-19 23:22:23 +03:00
Simplify passing of configure arguments to pg_config
The previous system had configure put the value into the makefiles and then have the makefiles pass them to the build of pg_config. That was put in place when pg_config was a shell script. We can simplify that by having configure put the value into pg_config.h directly. This also makes the standard build system match how the MSVC build system already does it. Discussion: https://www.postgresql.org/message-id/flat/6e457870-cef5-5f1d-b57c-fc89cfb8a788%402ndquadrant.com
This commit is contained in:
@@ -31,7 +31,6 @@ include $(top_builddir)/src/Makefile.global
|
||||
# don't include subdirectory-path-dependent -I and -L switches
|
||||
STD_CPPFLAGS := $(filter-out -I$(top_srcdir)/src/include -I$(top_builddir)/src/include,$(CPPFLAGS))
|
||||
STD_LDFLAGS := $(filter-out -L$(top_builddir)/src/common -L$(top_builddir)/src/port,$(LDFLAGS))
|
||||
override CPPFLAGS += -DVAL_CONFIGURE="\"$(configure_args)\""
|
||||
override CPPFLAGS += -DVAL_CC="\"$(CC)\""
|
||||
override CPPFLAGS += -DVAL_CPPFLAGS="\"$(STD_CPPFLAGS)\""
|
||||
override CPPFLAGS += -DVAL_CFLAGS="\"$(CFLAGS)\""
|
||||
|
@@ -124,11 +124,7 @@ get_configdata(const char *my_exec_path, size_t *configdata_len)
|
||||
i++;
|
||||
|
||||
configdata[i].name = pstrdup("CONFIGURE");
|
||||
#ifdef VAL_CONFIGURE
|
||||
configdata[i].setting = pstrdup(VAL_CONFIGURE);
|
||||
#else
|
||||
configdata[i].setting = pstrdup(_("not recorded"));
|
||||
#endif
|
||||
configdata[i].setting = pstrdup(CONFIGURE_ARGS);
|
||||
i++;
|
||||
|
||||
configdata[i].name = pstrdup("CC");
|
||||
|
Reference in New Issue
Block a user