2005-02-26 19:43:34 +01:00
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# Makefile--
|
|
|
|
# Makefile for utils/misc
|
|
|
|
#
|
|
|
|
# IDENTIFICATION
|
2010-09-20 22:08:53 +02:00
|
|
|
# src/backend/utils/misc/Makefile
|
2005-02-26 19:43:34 +01:00
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
2000-08-25 12:00:35 +02:00
|
|
|
|
|
|
|
subdir = src/backend/utils/misc
|
|
|
|
top_builddir = ../../../..
|
|
|
|
include $(top_builddir)/src/Makefile.global
|
1996-11-02 03:06:47 +01:00
|
|
|
|
2009-08-28 22:26:19 +02:00
|
|
|
override CPPFLAGS := -I. -I$(srcdir) $(CPPFLAGS)
|
2002-11-01 23:52:34 +01:00
|
|
|
|
2019-11-05 23:41:07 +01:00
|
|
|
OBJS = \
|
2022-11-07 04:31:38 +01:00
|
|
|
conffiles.o \
|
2019-11-05 23:41:07 +01:00
|
|
|
guc.o \
|
2022-09-04 06:33:31 +02:00
|
|
|
guc-file.o \
|
Split up guc.c for better build speed and ease of maintenance.
guc.c has grown to be one of our largest .c files, making it
a bottleneck for compilation. It's also acquired a bunch of
knowledge that'd be better kept elsewhere, because of our not
very good habit of putting variable-specific check hooks here.
Hence, split it up along these lines:
* guc.c itself retains just the core GUC housekeeping mechanisms.
* New file guc_funcs.c contains the SET/SHOW interfaces and some
SQL-accessible functions for GUC manipulation.
* New file guc_tables.c contains the data arrays that define the
built-in GUC variables, along with some already-exported constant
tables.
* GUC check/assign/show hook functions are moved to the variable's
home module, whenever that's clearly identifiable. A few hard-
to-classify hooks ended up in commands/variable.c, which was
already a home for miscellaneous GUC hook functions.
To avoid cluttering a lot more header files with #include "guc.h",
I also invented a new header file utils/guc_hooks.h and put all
the GUC hook functions' declarations there, regardless of their
originating module. That allowed removal of #include "guc.h"
from some existing headers. The fallout from that (hopefully
all caught here) demonstrates clearly why such inclusions are
best minimized: there are a lot of files that, for example,
were getting array.h at two or more levels of remove, despite
not having any connection at all to GUCs in themselves.
There is some very minor code beautification here, such as
renaming a couple of inconsistently-named hook functions
and improving some comments. But mostly this just moves
code from point A to point B and deals with the ensuing
needs for #include adjustments and exporting a few functions
that previously weren't exported.
Patch by me, per a suggestion from Andres Freund; thanks also
to Michael Paquier for the idea to invent guc_funcs.c.
Discussion: https://postgr.es/m/587607.1662836699@sss.pgh.pa.us
2022-09-13 17:05:07 +02:00
|
|
|
guc_funcs.o \
|
|
|
|
guc_tables.o \
|
2019-11-05 23:41:07 +01:00
|
|
|
help_config.o \
|
|
|
|
pg_config.o \
|
|
|
|
pg_controldata.o \
|
|
|
|
pg_rusage.o \
|
|
|
|
ps_status.o \
|
|
|
|
queryenvironment.o \
|
|
|
|
rls.o \
|
|
|
|
sampling.o \
|
|
|
|
superuser.o \
|
|
|
|
timeout.o \
|
|
|
|
tzparser.o
|
1996-11-02 03:06:47 +01:00
|
|
|
|
2000-08-25 12:00:35 +02:00
|
|
|
# This location might depend on the installation directories. Therefore
|
2017-02-06 10:33:58 +01:00
|
|
|
# we can't substitute it into pg_config.h.
|
2000-08-25 12:00:35 +02:00
|
|
|
ifdef krb_srvtab
|
2000-10-20 23:04:27 +02:00
|
|
|
override CPPFLAGS += -DPG_KRB_SRVTAB='"$(krb_srvtab)"'
|
2000-08-25 12:00:35 +02:00
|
|
|
endif
|
|
|
|
|
2008-02-19 11:30:09 +01:00
|
|
|
include $(top_srcdir)/src/backend/common.mk
|
1996-11-02 03:06:47 +01:00
|
|
|
|
2010-11-23 21:27:50 +01:00
|
|
|
clean:
|
Remove distprep
A PostgreSQL release tarball contains a number of prebuilt files, in
particular files produced by bison, flex, perl, and well as html and
man documentation. We have done this consistent with established
practice at the time to not require these tools for building from a
tarball. Some of these tools were hard to get, or get the right
version of, from time to time, and shipping the prebuilt output was a
convenience to users.
Now this has at least two problems:
One, we have to make the build system(s) work in two modes: Building
from a git checkout and building from a tarball. This is pretty
complicated, but it works so far for autoconf/make. It does not
currently work for meson; you can currently only build with meson from
a git checkout. Making meson builds work from a tarball seems very
difficult or impossible. One particular problem is that since meson
requires a separate build directory, we cannot make the build update
files like gram.h in the source tree. So if you were to build from a
tarball and update gram.y, you will have a gram.h in the source tree
and one in the build tree, but the way things work is that the
compiler will always use the one in the source tree. So you cannot,
for example, make any gram.y changes when building from a tarball.
This seems impossible to fix in a non-horrible way.
Second, there is increased interest nowadays in precisely tracking the
origin of software. We can reasonably track contributions into the
git tree, and users can reasonably track the path from a tarball to
packages and downloads and installs. But what happens between the git
tree and the tarball is obscure and in some cases non-reproducible.
The solution for both of these issues is to get rid of the step that
adds prebuilt files to the tarball. The tarball now only contains
what is in the git tree (*). Getting the additional build
dependencies is no longer a problem nowadays, and the complications to
keep these dual build modes working are significant. And of course we
want to get the meson build system working universally.
This commit removes the make distprep target altogether. The make
dist target continues to do its job, it just doesn't call distprep
anymore.
(*) - The tarball also contains the INSTALL file that is built at make
dist time, but not by distprep. This is unchanged for now.
The make maintainer-clean target, whose job it is to remove the
prebuilt files in addition to what make distclean does, is now just an
alias to make distprep. (In practice, it is probably obsolete given
that git clean is available.)
The following programs are now hard build requirements in configure
(they were already required by meson.build):
- bison
- flex
- perl
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://www.postgresql.org/message-id/flat/e07408d9-e5f2-d9fd-5672-f53354e9305e@eisentraut.org
2023-11-06 14:51:52 +01:00
|
|
|
rm -f guc-file.c
|