mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-03-01 19:45:33 +08:00
libpgcommon is a new static library to allow sharing code among the various frontend programs and backend; this lets us eliminate duplicate implementations of common routines. We avoid libpgport, because that's intended as a place for porting issues; per discussion, it seems better to keep them separate. The first use case, and the only implemented by this patch, is pg_malloc and friends, which many frontend programs were already using. At the same time, we can use this to provide palloc emulation functions for the frontend; this way, some palloc-using files in the backend can also be used by the frontend cleanly. To do this, we change palloc() in the backend to be a function instead of a macro on top of MemoryContextAlloc(). This was previously believed to cause loss of performance, but this implementation has been tweaked by Tom and Andres so that on modern compilers it provides a slight improvement over the previous one. This lets us clean up some places that were already with localized hacks. Most of the pg_malloc/palloc changes in this patch were authored by Andres Freund. Zoltán Böszörményi also independently provided a form of that. libpgcommon infrastructure was authored by Álvaro.
82 lines
1.9 KiB
Makefile
82 lines
1.9 KiB
Makefile
#-------------------------------------------------------------------------
|
|
#
|
|
# Makefile for src
|
|
#
|
|
# Copyright (c) 1994, Regents of the University of California
|
|
#
|
|
# src/Makefile
|
|
#
|
|
#-------------------------------------------------------------------------
|
|
|
|
subdir = src
|
|
top_builddir = ..
|
|
include Makefile.global
|
|
|
|
SUBDIRS = \
|
|
common \
|
|
port \
|
|
timezone \
|
|
backend \
|
|
backend/utils/mb/conversion_procs \
|
|
backend/snowball \
|
|
include \
|
|
interfaces \
|
|
backend/replication/libpqwalreceiver \
|
|
bin \
|
|
pl \
|
|
makefiles \
|
|
test/regress
|
|
|
|
# There are too many interdependencies between the subdirectories, so
|
|
# don't attempt parallel make here.
|
|
.NOTPARALLEL:
|
|
|
|
$(recurse)
|
|
|
|
install: install-local
|
|
|
|
install-local: installdirs-local
|
|
$(INSTALL_DATA) Makefile.global '$(DESTDIR)$(pgxsdir)/$(subdir)/Makefile.global'
|
|
$(INSTALL_DATA) Makefile.port '$(DESTDIR)$(pgxsdir)/$(subdir)/Makefile.port'
|
|
$(INSTALL_DATA) $(srcdir)/Makefile.shlib '$(DESTDIR)$(pgxsdir)/$(subdir)/Makefile.shlib'
|
|
$(INSTALL_DATA) $(srcdir)/nls-global.mk '$(DESTDIR)$(pgxsdir)/$(subdir)/nls-global.mk'
|
|
|
|
installdirs: installdirs-local
|
|
|
|
installdirs-local:
|
|
$(MKDIR_P) '$(DESTDIR)$(pgxsdir)/$(subdir)'
|
|
|
|
uninstall: uninstall-local
|
|
|
|
uninstall-local:
|
|
rm -f $(addprefix '$(DESTDIR)$(pgxsdir)/$(subdir)'/, Makefile.global Makefile.port Makefile.shlib nls-global.mk)
|
|
|
|
distprep:
|
|
$(MAKE) -C test/isolation $@
|
|
|
|
clean:
|
|
$(MAKE) -C test $@
|
|
$(MAKE) -C tutorial NO_PGXS=1 $@
|
|
$(MAKE) -C test/isolation $@
|
|
$(MAKE) -C test/thread $@
|
|
|
|
distclean maintainer-clean:
|
|
$(MAKE) -C test $@
|
|
$(MAKE) -C tutorial NO_PGXS=1 $@
|
|
$(MAKE) -C test/isolation $@
|
|
$(MAKE) -C test/thread $@
|
|
rm -f Makefile.port Makefile.global
|
|
|
|
coverage:
|
|
$(MAKE) -C timezone $@
|
|
$(MAKE) -C backend $@
|
|
$(MAKE) -C backend/utils/mb/conversion_procs $@
|
|
$(MAKE) -C backend/snowball $@
|
|
$(MAKE) -C interfaces $@
|
|
$(MAKE) -C backend/replication/libpqwalreceiver $@
|
|
$(MAKE) -C bin $@
|
|
$(MAKE) -C pl $@
|
|
|
|
|
|
.PHONY: install-local installdirs-local uninstall-local
|