mirror of
https://github.com/postgres/postgres.git
synced 2025-10-22 14:32:25 +03:00
meson: Add initial version of meson based build system
Autoconf is showing its age, fewer and fewer contributors know how to wrangle it. Recursive make has a lot of hard to resolve dependency issues and slow incremental rebuilds. Our home-grown MSVC build system is hard to maintain for developers not using Windows and runs tests serially. While these and other issues could individually be addressed with incremental improvements, together they seem best addressed by moving to a more modern build system. After evaluating different build system choices, we chose to use meson, to a good degree based on the adoption by other open source projects. We decided that it's more realistic to commit a relatively early version of the new build system and mature it in tree. This commit adds an initial version of a meson based build system. It supports building postgres on at least AIX, FreeBSD, Linux, macOS, NetBSD, OpenBSD, Solaris and Windows (however only gcc is supported on aix, solaris). For Windows/MSVC postgres can now be built with ninja (faster, particularly for incremental builds) and msbuild (supporting the visual studio GUI, but building slower). Several aspects (e.g. Windows rc file generation, PGXS compatibility, LLVM bitcode generation, documentation adjustments) are done in subsequent commits requiring further review. Other aspects (e.g. not installing test-only extensions) are not yet addressed. When building on Windows with msbuild, builds are slower when using a visual studio version older than 2019, because those versions do not support MultiToolTask, required by meson for intra-target parallelism. The plan is to remove the MSVC specific build system in src/tools/msvc soon after reaching feature parity. However, we're not planning to remove the autoconf/make build system in the near future. Likely we're going to keep at least the parts required for PGXS to keep working around until all supported versions build with meson. Some initial help for postgres developers is at https://wiki.postgresql.org/wiki/Meson With contributions from Thomas Munro, John Naylor, Stone Tickle and others. Author: Andres Freund <andres@anarazel.de> Author: Nazir Bilal Yavuz <byavuz81@gmail.com> Author: Peter Eisentraut <peter@eisentraut.org> Reviewed-By: Peter Eisentraut <peter.eisentraut@enterprisedb.com> Discussion: https://postgr.es/m/20211012083721.hvixq4pnh2pixr3j@alap3.anarazel.de
This commit is contained in:
12
src/backend/access/brin/meson.build
Normal file
12
src/backend/access/brin/meson.build
Normal file
@@ -0,0 +1,12 @@
|
||||
backend_sources += files(
|
||||
'brin.c',
|
||||
'brin_bloom.c',
|
||||
'brin_inclusion.c',
|
||||
'brin_minmax.c',
|
||||
'brin_minmax_multi.c',
|
||||
'brin_pageops.c',
|
||||
'brin_revmap.c',
|
||||
'brin_tuple.c',
|
||||
'brin_validate.c',
|
||||
'brin_xlog.c',
|
||||
)
|
18
src/backend/access/common/meson.build
Normal file
18
src/backend/access/common/meson.build
Normal file
@@ -0,0 +1,18 @@
|
||||
backend_sources += files(
|
||||
'attmap.c',
|
||||
'bufmask.c',
|
||||
'detoast.c',
|
||||
'heaptuple.c',
|
||||
'indextuple.c',
|
||||
'printsimple.c',
|
||||
'printtup.c',
|
||||
'relation.c',
|
||||
'reloptions.c',
|
||||
'scankey.c',
|
||||
'session.c',
|
||||
'syncscan.c',
|
||||
'toast_compression.c',
|
||||
'toast_internals.c',
|
||||
'tupconvert.c',
|
||||
'tupdesc.c',
|
||||
)
|
17
src/backend/access/gin/meson.build
Normal file
17
src/backend/access/gin/meson.build
Normal file
@@ -0,0 +1,17 @@
|
||||
backend_sources += files(
|
||||
'ginarrayproc.c',
|
||||
'ginbtree.c',
|
||||
'ginbulk.c',
|
||||
'gindatapage.c',
|
||||
'ginentrypage.c',
|
||||
'ginfast.c',
|
||||
'ginget.c',
|
||||
'gininsert.c',
|
||||
'ginlogic.c',
|
||||
'ginpostinglist.c',
|
||||
'ginscan.c',
|
||||
'ginutil.c',
|
||||
'ginvacuum.c',
|
||||
'ginvalidate.c',
|
||||
'ginxlog.c',
|
||||
)
|
13
src/backend/access/gist/meson.build
Normal file
13
src/backend/access/gist/meson.build
Normal file
@@ -0,0 +1,13 @@
|
||||
backend_sources += files(
|
||||
'gist.c',
|
||||
'gistbuild.c',
|
||||
'gistbuildbuffers.c',
|
||||
'gistget.c',
|
||||
'gistproc.c',
|
||||
'gistscan.c',
|
||||
'gistsplit.c',
|
||||
'gistutil.c',
|
||||
'gistvacuum.c',
|
||||
'gistvalidate.c',
|
||||
'gistxlog.c',
|
||||
)
|
12
src/backend/access/hash/meson.build
Normal file
12
src/backend/access/hash/meson.build
Normal file
@@ -0,0 +1,12 @@
|
||||
backend_sources += files(
|
||||
'hash.c',
|
||||
'hash_xlog.c',
|
||||
'hashfunc.c',
|
||||
'hashinsert.c',
|
||||
'hashovfl.c',
|
||||
'hashpage.c',
|
||||
'hashsearch.c',
|
||||
'hashsort.c',
|
||||
'hashutil.c',
|
||||
'hashvalidate.c',
|
||||
)
|
11
src/backend/access/heap/meson.build
Normal file
11
src/backend/access/heap/meson.build
Normal file
@@ -0,0 +1,11 @@
|
||||
backend_sources += files(
|
||||
'heapam.c',
|
||||
'heapam_handler.c',
|
||||
'heapam_visibility.c',
|
||||
'heaptoast.c',
|
||||
'hio.c',
|
||||
'pruneheap.c',
|
||||
'rewriteheap.c',
|
||||
'vacuumlazy.c',
|
||||
'visibilitymap.c',
|
||||
)
|
6
src/backend/access/index/meson.build
Normal file
6
src/backend/access/index/meson.build
Normal file
@@ -0,0 +1,6 @@
|
||||
backend_sources += files(
|
||||
'amapi.c',
|
||||
'amvalidate.c',
|
||||
'genam.c',
|
||||
'indexam.c',
|
||||
)
|
13
src/backend/access/meson.build
Normal file
13
src/backend/access/meson.build
Normal file
@@ -0,0 +1,13 @@
|
||||
subdir('brin')
|
||||
subdir('common')
|
||||
subdir('gin')
|
||||
subdir('gist')
|
||||
subdir('hash')
|
||||
subdir('heap')
|
||||
subdir('index')
|
||||
subdir('nbtree')
|
||||
subdir('rmgrdesc')
|
||||
subdir('spgist')
|
||||
subdir('table')
|
||||
subdir('tablesample')
|
||||
subdir('transam')
|
13
src/backend/access/nbtree/meson.build
Normal file
13
src/backend/access/nbtree/meson.build
Normal file
@@ -0,0 +1,13 @@
|
||||
backend_sources += files(
|
||||
'nbtcompare.c',
|
||||
'nbtdedup.c',
|
||||
'nbtinsert.c',
|
||||
'nbtpage.c',
|
||||
'nbtree.c',
|
||||
'nbtsearch.c',
|
||||
'nbtsort.c',
|
||||
'nbtsplitloc.c',
|
||||
'nbtutils.c',
|
||||
'nbtvalidate.c',
|
||||
'nbtxlog.c',
|
||||
)
|
26
src/backend/access/rmgrdesc/meson.build
Normal file
26
src/backend/access/rmgrdesc/meson.build
Normal file
@@ -0,0 +1,26 @@
|
||||
# used by frontend programs like pg_waldump
|
||||
rmgr_desc_sources = files(
|
||||
'brindesc.c',
|
||||
'clogdesc.c',
|
||||
'committsdesc.c',
|
||||
'dbasedesc.c',
|
||||
'genericdesc.c',
|
||||
'gindesc.c',
|
||||
'gistdesc.c',
|
||||
'hashdesc.c',
|
||||
'heapdesc.c',
|
||||
'logicalmsgdesc.c',
|
||||
'mxactdesc.c',
|
||||
'nbtdesc.c',
|
||||
'relmapdesc.c',
|
||||
'replorigindesc.c',
|
||||
'seqdesc.c',
|
||||
'smgrdesc.c',
|
||||
'spgdesc.c',
|
||||
'standbydesc.c',
|
||||
'tblspcdesc.c',
|
||||
'xactdesc.c',
|
||||
'xlogdesc.c',
|
||||
)
|
||||
|
||||
backend_sources += rmgr_desc_sources
|
13
src/backend/access/spgist/meson.build
Normal file
13
src/backend/access/spgist/meson.build
Normal file
@@ -0,0 +1,13 @@
|
||||
backend_sources += files(
|
||||
'spgdoinsert.c',
|
||||
'spginsert.c',
|
||||
'spgkdtreeproc.c',
|
||||
'spgproc.c',
|
||||
'spgquadtreeproc.c',
|
||||
'spgscan.c',
|
||||
'spgtextproc.c',
|
||||
'spgutils.c',
|
||||
'spgvacuum.c',
|
||||
'spgvalidate.c',
|
||||
'spgxlog.c',
|
||||
)
|
6
src/backend/access/table/meson.build
Normal file
6
src/backend/access/table/meson.build
Normal file
@@ -0,0 +1,6 @@
|
||||
backend_sources += files(
|
||||
'table.c',
|
||||
'tableam.c',
|
||||
'tableamapi.c',
|
||||
'toast_helper.c',
|
||||
)
|
5
src/backend/access/tablesample/meson.build
Normal file
5
src/backend/access/tablesample/meson.build
Normal file
@@ -0,0 +1,5 @@
|
||||
backend_sources += files(
|
||||
'bernoulli.c',
|
||||
'system.c',
|
||||
'tablesample.c',
|
||||
)
|
31
src/backend/access/transam/meson.build
Normal file
31
src/backend/access/transam/meson.build
Normal file
@@ -0,0 +1,31 @@
|
||||
backend_sources += files(
|
||||
'clog.c',
|
||||
'commit_ts.c',
|
||||
'generic_xlog.c',
|
||||
'multixact.c',
|
||||
'parallel.c',
|
||||
'rmgr.c',
|
||||
'slru.c',
|
||||
'subtrans.c',
|
||||
'timeline.c',
|
||||
'transam.c',
|
||||
'twophase.c',
|
||||
'twophase_rmgr.c',
|
||||
'varsup.c',
|
||||
'xact.c',
|
||||
'xlog.c',
|
||||
'xlogarchive.c',
|
||||
'xlogfuncs.c',
|
||||
'xloginsert.c',
|
||||
'xlogprefetcher.c',
|
||||
'xlogrecovery.c',
|
||||
'xlogstats.c',
|
||||
'xlogutils.c',
|
||||
)
|
||||
|
||||
# used by frontend programs to build a frontend xlogreader
|
||||
xlogreader_sources = files(
|
||||
'xlogreader.c',
|
||||
)
|
||||
|
||||
backend_sources += xlogreader_sources
|
13
src/backend/backup/meson.build
Normal file
13
src/backend/backup/meson.build
Normal file
@@ -0,0 +1,13 @@
|
||||
backend_sources += files(
|
||||
'backup_manifest.c',
|
||||
'basebackup.c',
|
||||
'basebackup_copy.c',
|
||||
'basebackup_gzip.c',
|
||||
'basebackup_lz4.c',
|
||||
'basebackup_progress.c',
|
||||
'basebackup_server.c',
|
||||
'basebackup_sink.c',
|
||||
'basebackup_target.c',
|
||||
'basebackup_throttle.c',
|
||||
'basebackup_zstd.c',
|
||||
)
|
28
src/backend/bootstrap/meson.build
Normal file
28
src/backend/bootstrap/meson.build
Normal file
@@ -0,0 +1,28 @@
|
||||
backend_sources += files(
|
||||
'bootstrap.c')
|
||||
|
||||
# see ../parser/meson.build
|
||||
boot_parser_sources = []
|
||||
|
||||
bootscanner = custom_target('bootscanner',
|
||||
input: 'bootscanner.l',
|
||||
output: 'bootscanner.c',
|
||||
command: flex_cmd,
|
||||
)
|
||||
generated_sources += bootscanner
|
||||
boot_parser_sources += bootscanner
|
||||
|
||||
bootparse = custom_target('bootparse',
|
||||
input: 'bootparse.y',
|
||||
kwargs: bison_kw,
|
||||
)
|
||||
generated_sources += bootparse.to_list()
|
||||
boot_parser_sources += bootparse
|
||||
|
||||
boot_parser = static_library('boot_parser',
|
||||
boot_parser_sources,
|
||||
dependencies: [backend_code],
|
||||
include_directories: include_directories('.'),
|
||||
kwargs: internal_lib_args,
|
||||
)
|
||||
backend_link_with += boot_parser
|
44
src/backend/catalog/meson.build
Normal file
44
src/backend/catalog/meson.build
Normal file
@@ -0,0 +1,44 @@
|
||||
backend_sources += files(
|
||||
'aclchk.c',
|
||||
'catalog.c',
|
||||
'dependency.c',
|
||||
'heap.c',
|
||||
'index.c',
|
||||
'indexing.c',
|
||||
'namespace.c',
|
||||
'objectaccess.c',
|
||||
'objectaddress.c',
|
||||
'partition.c',
|
||||
'pg_aggregate.c',
|
||||
'pg_attrdef.c',
|
||||
'pg_cast.c',
|
||||
'pg_class.c',
|
||||
'pg_collation.c',
|
||||
'pg_constraint.c',
|
||||
'pg_conversion.c',
|
||||
'pg_db_role_setting.c',
|
||||
'pg_depend.c',
|
||||
'pg_enum.c',
|
||||
'pg_inherits.c',
|
||||
'pg_largeobject.c',
|
||||
'pg_namespace.c',
|
||||
'pg_operator.c',
|
||||
'pg_parameter_acl.c',
|
||||
'pg_proc.c',
|
||||
'pg_publication.c',
|
||||
'pg_range.c',
|
||||
'pg_shdepend.c',
|
||||
'pg_subscription.c',
|
||||
'pg_type.c',
|
||||
'storage.c',
|
||||
'toasting.c',
|
||||
)
|
||||
|
||||
|
||||
install_data(
|
||||
'information_schema.sql',
|
||||
'sql_features.txt',
|
||||
'system_functions.sql',
|
||||
'system_views.sql',
|
||||
install_dir: dir_data,
|
||||
)
|
51
src/backend/commands/meson.build
Normal file
51
src/backend/commands/meson.build
Normal file
@@ -0,0 +1,51 @@
|
||||
backend_sources += files(
|
||||
'aggregatecmds.c',
|
||||
'alter.c',
|
||||
'amcmds.c',
|
||||
'analyze.c',
|
||||
'async.c',
|
||||
'cluster.c',
|
||||
'collationcmds.c',
|
||||
'comment.c',
|
||||
'constraint.c',
|
||||
'conversioncmds.c',
|
||||
'copy.c',
|
||||
'copyfrom.c',
|
||||
'copyfromparse.c',
|
||||
'copyto.c',
|
||||
'createas.c',
|
||||
'dbcommands.c',
|
||||
'define.c',
|
||||
'discard.c',
|
||||
'dropcmds.c',
|
||||
'event_trigger.c',
|
||||
'explain.c',
|
||||
'extension.c',
|
||||
'foreigncmds.c',
|
||||
'functioncmds.c',
|
||||
'indexcmds.c',
|
||||
'lockcmds.c',
|
||||
'matview.c',
|
||||
'opclasscmds.c',
|
||||
'operatorcmds.c',
|
||||
'policy.c',
|
||||
'portalcmds.c',
|
||||
'prepare.c',
|
||||
'proclang.c',
|
||||
'publicationcmds.c',
|
||||
'schemacmds.c',
|
||||
'seclabel.c',
|
||||
'sequence.c',
|
||||
'statscmds.c',
|
||||
'subscriptioncmds.c',
|
||||
'tablecmds.c',
|
||||
'tablespace.c',
|
||||
'trigger.c',
|
||||
'tsearchcmds.c',
|
||||
'typecmds.c',
|
||||
'user.c',
|
||||
'vacuum.c',
|
||||
'vacuumparallel.c',
|
||||
'variable.c',
|
||||
'view.c',
|
||||
)
|
67
src/backend/executor/meson.build
Normal file
67
src/backend/executor/meson.build
Normal file
@@ -0,0 +1,67 @@
|
||||
backend_sources += files(
|
||||
'execAmi.c',
|
||||
'execAsync.c',
|
||||
'execCurrent.c',
|
||||
'execExpr.c',
|
||||
'execExprInterp.c',
|
||||
'execGrouping.c',
|
||||
'execIndexing.c',
|
||||
'execJunk.c',
|
||||
'execMain.c',
|
||||
'execParallel.c',
|
||||
'execPartition.c',
|
||||
'execProcnode.c',
|
||||
'execReplication.c',
|
||||
'execSRF.c',
|
||||
'execScan.c',
|
||||
'execTuples.c',
|
||||
'execUtils.c',
|
||||
'functions.c',
|
||||
'instrument.c',
|
||||
'nodeAgg.c',
|
||||
'nodeAppend.c',
|
||||
'nodeBitmapAnd.c',
|
||||
'nodeBitmapHeapscan.c',
|
||||
'nodeBitmapIndexscan.c',
|
||||
'nodeBitmapOr.c',
|
||||
'nodeCtescan.c',
|
||||
'nodeCustom.c',
|
||||
'nodeForeignscan.c',
|
||||
'nodeFunctionscan.c',
|
||||
'nodeGather.c',
|
||||
'nodeGatherMerge.c',
|
||||
'nodeGroup.c',
|
||||
'nodeHash.c',
|
||||
'nodeHashjoin.c',
|
||||
'nodeIncrementalSort.c',
|
||||
'nodeIndexonlyscan.c',
|
||||
'nodeIndexscan.c',
|
||||
'nodeLimit.c',
|
||||
'nodeLockRows.c',
|
||||
'nodeMaterial.c',
|
||||
'nodeMemoize.c',
|
||||
'nodeMergeAppend.c',
|
||||
'nodeMergejoin.c',
|
||||
'nodeModifyTable.c',
|
||||
'nodeNamedtuplestorescan.c',
|
||||
'nodeNestloop.c',
|
||||
'nodeProjectSet.c',
|
||||
'nodeRecursiveunion.c',
|
||||
'nodeResult.c',
|
||||
'nodeSamplescan.c',
|
||||
'nodeSeqscan.c',
|
||||
'nodeSetOp.c',
|
||||
'nodeSort.c',
|
||||
'nodeSubplan.c',
|
||||
'nodeSubqueryscan.c',
|
||||
'nodeTableFuncscan.c',
|
||||
'nodeTidrangescan.c',
|
||||
'nodeTidscan.c',
|
||||
'nodeUnique.c',
|
||||
'nodeValuesscan.c',
|
||||
'nodeWindowAgg.c',
|
||||
'nodeWorktablescan.c',
|
||||
'spi.c',
|
||||
'tqueue.c',
|
||||
'tstoreReceiver.c',
|
||||
)
|
3
src/backend/foreign/meson.build
Normal file
3
src/backend/foreign/meson.build
Normal file
@@ -0,0 +1,3 @@
|
||||
backend_sources += files(
|
||||
'foreign.c'
|
||||
)
|
73
src/backend/jit/llvm/meson.build
Normal file
73
src/backend/jit/llvm/meson.build
Normal file
@@ -0,0 +1,73 @@
|
||||
if not llvm.found()
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
# Build LLVM JIT backend module
|
||||
|
||||
llvmjit_sources = []
|
||||
|
||||
# Infrastructure
|
||||
llvmjit_sources += files(
|
||||
'llvmjit.c',
|
||||
'llvmjit_error.cpp',
|
||||
'llvmjit_inline.cpp',
|
||||
'llvmjit_wrap.cpp',
|
||||
)
|
||||
|
||||
# Code generation
|
||||
llvmjit_sources += files(
|
||||
'llvmjit_deform.c',
|
||||
'llvmjit_expr.c',
|
||||
)
|
||||
|
||||
llvmjit = shared_module('llvmjit',
|
||||
llvmjit_sources,
|
||||
kwargs: pg_mod_args + {
|
||||
'dependencies': pg_mod_args['dependencies'] + [llvm],
|
||||
}
|
||||
)
|
||||
|
||||
backend_targets += llvmjit
|
||||
|
||||
|
||||
# Define a few bits and pieces used here and elsewhere to generate bitcode
|
||||
|
||||
llvm_irgen_args = [
|
||||
'-c', '-o', '@OUTPUT@', '@INPUT@',
|
||||
'-flto=thin', '-emit-llvm',
|
||||
'-MD', '-MQ', '@OUTPUT@', '-MF', '@DEPFILE@',
|
||||
'-O2',
|
||||
'-Wno-ignored-attributes',
|
||||
'-Wno-empty-body',
|
||||
]
|
||||
|
||||
if ccache.found()
|
||||
llvm_irgen_command = ccache
|
||||
llvm_irgen_args = [clang.path()] + llvm_irgen_args
|
||||
else
|
||||
llvm_irgen_command = clang
|
||||
endif
|
||||
|
||||
|
||||
# XXX: Need to determine proper version of the function cflags for clang
|
||||
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
|
||||
bitcode_cflags += cppflags
|
||||
|
||||
# XXX: Worth improving on the logic to find directories here
|
||||
bitcode_cflags += '-I@BUILD_ROOT@/src/include'
|
||||
bitcode_cflags += '-I@BUILD_ROOT@/src/backend/utils/misc'
|
||||
bitcode_cflags += '-I@SOURCE_ROOT@/src/include'
|
||||
|
||||
|
||||
# Note this is intentionally not installed to bitcodedir, as it's not for
|
||||
# inlining
|
||||
llvmjit_types = custom_target('llvmjit_types.bc',
|
||||
command: [llvm_irgen_command] + llvm_irgen_args + bitcode_cflags,
|
||||
input: 'llvmjit_types.c',
|
||||
output: 'llvmjit_types.bc',
|
||||
depends: [postgres],
|
||||
install: true,
|
||||
install_dir: dir_lib_pkg,
|
||||
depfile: '@BASENAME@.c.bc.d',
|
||||
)
|
||||
backend_targets += llvmjit_types
|
3
src/backend/jit/meson.build
Normal file
3
src/backend/jit/meson.build
Normal file
@@ -0,0 +1,3 @@
|
||||
backend_sources += files(
|
||||
'jit.c'
|
||||
)
|
12
src/backend/lib/meson.build
Normal file
12
src/backend/lib/meson.build
Normal file
@@ -0,0 +1,12 @@
|
||||
backend_sources += files(
|
||||
'binaryheap.c',
|
||||
'bipartite_match.c',
|
||||
'bloomfilter.c',
|
||||
'dshash.c',
|
||||
'hyperloglog.c',
|
||||
'ilist.c',
|
||||
'integerset.c',
|
||||
'knapsack.c',
|
||||
'pairingheap.c',
|
||||
'rbtree.c',
|
||||
)
|
32
src/backend/libpq/meson.build
Normal file
32
src/backend/libpq/meson.build
Normal file
@@ -0,0 +1,32 @@
|
||||
backend_sources += files(
|
||||
'auth-sasl.c',
|
||||
'auth-scram.c',
|
||||
'auth.c',
|
||||
'be-fsstubs.c',
|
||||
'be-secure-common.c',
|
||||
'be-secure.c',
|
||||
'crypt.c',
|
||||
'hba.c',
|
||||
'ifaddr.c',
|
||||
'pqcomm.c',
|
||||
'pqformat.c',
|
||||
'pqmq.c',
|
||||
'pqsignal.c',
|
||||
)
|
||||
|
||||
if ssl.found()
|
||||
backend_sources += files('be-secure-openssl.c')
|
||||
endif
|
||||
|
||||
if gssapi.found()
|
||||
backend_sources += files(
|
||||
'be-secure-gssapi.c',
|
||||
'be-gssapi-common.c'
|
||||
)
|
||||
endif
|
||||
|
||||
install_data(
|
||||
'pg_hba.conf.sample',
|
||||
'pg_ident.conf.sample',
|
||||
install_dir: dir_data,
|
||||
)
|
2
src/backend/main/meson.build
Normal file
2
src/backend/main/meson.build
Normal file
@@ -0,0 +1,2 @@
|
||||
main_file = files('main.c')
|
||||
backend_sources += main_file
|
190
src/backend/meson.build
Normal file
190
src/backend/meson.build
Normal file
@@ -0,0 +1,190 @@
|
||||
backend_build_deps = [backend_code]
|
||||
backend_sources = []
|
||||
backend_link_with = [pgport_srv, common_srv]
|
||||
|
||||
generated_backend_sources = []
|
||||
|
||||
subdir('access')
|
||||
subdir('backup')
|
||||
subdir('bootstrap')
|
||||
subdir('catalog')
|
||||
subdir('commands')
|
||||
subdir('executor')
|
||||
subdir('foreign')
|
||||
subdir('jit')
|
||||
subdir('lib')
|
||||
subdir('libpq')
|
||||
subdir('main')
|
||||
subdir('nodes')
|
||||
subdir('optimizer')
|
||||
subdir('parser')
|
||||
subdir('partitioning')
|
||||
subdir('port')
|
||||
subdir('postmaster')
|
||||
subdir('regex')
|
||||
subdir('replication')
|
||||
subdir('rewrite')
|
||||
subdir('statistics')
|
||||
subdir('storage')
|
||||
subdir('tcop')
|
||||
subdir('tsearch')
|
||||
subdir('utils')
|
||||
|
||||
subdir('po', if_found: libintl)
|
||||
|
||||
|
||||
backend_link_args = []
|
||||
backend_link_depends = []
|
||||
|
||||
|
||||
# On windows when compiling with msvc we need to make postgres export all its
|
||||
# symbols so that extension libraries can use them. For that we need to scan
|
||||
# the constituting objects and generate a file specifying all the functions as
|
||||
# exported (variables need an "import" declaration in the header, hence
|
||||
# PGDLLEXPORT, but functions work without that, due to import libraries
|
||||
# basically being trampolines).
|
||||
#
|
||||
# For dtrace probes we need to invoke dtrace on all input files, before
|
||||
# linking the final executable (see more below).
|
||||
#
|
||||
#
|
||||
# On meson there's currently no easy way to do this that I found. So we build
|
||||
# a static library with all the input objects, run our script to generate
|
||||
# exports, and build the final executable using that static library
|
||||
#
|
||||
# We could do that only if either dtrace or msvc is in use, but it seems
|
||||
# easier to just always do so.
|
||||
#
|
||||
# Can't name the static library 'postgres', because msbuild ends up with a
|
||||
# conflict for the .pdb file otherwise.
|
||||
|
||||
postgres_lib = static_library('postgres_lib',
|
||||
backend_sources + timezone_sources + generated_backend_sources,
|
||||
link_whole: backend_link_with,
|
||||
dependencies: backend_build_deps,
|
||||
kwargs: internal_lib_args,
|
||||
)
|
||||
|
||||
if cc.get_id() == 'msvc'
|
||||
postgres_def = custom_target('postgres.def',
|
||||
command: [perl, files('../tools/msvc/gendef.pl'),
|
||||
'--arch', host_cpu,
|
||||
'--tempdir', '@PRIVATE_DIR@',
|
||||
'--deffile', '@OUTPUT@',
|
||||
'@INPUT@'],
|
||||
input: [postgres_lib, common_srv, pgport_srv],
|
||||
output: 'postgres.def',
|
||||
depends: [postgres_lib, common_srv, pgport_srv],
|
||||
install: false,
|
||||
build_by_default: false,
|
||||
)
|
||||
|
||||
backend_link_args += '/DEF:@0@'.format(postgres_def.full_path())
|
||||
backend_link_depends += postgres_def
|
||||
|
||||
elif host_system == 'aix'
|
||||
# The '.' argument leads mkldexport.sh to emit "#! .", which refers to the
|
||||
# main executable, allowing extension libraries to resolve their undefined
|
||||
# symbols to symbols in the postgres binary.
|
||||
postgres_imp = custom_target('postgres.imp',
|
||||
command: [files('port/aix/mkldexport.sh'), '@INPUT@', '.'],
|
||||
input: postgres_lib,
|
||||
output: 'postgres.imp',
|
||||
capture: true,
|
||||
install: true,
|
||||
install_dir: dir_lib,
|
||||
build_by_default: false,
|
||||
)
|
||||
backend_link_args += '-Wl,-bE:@0@'.format(postgres_imp.full_path())
|
||||
backend_link_depends += postgres_imp
|
||||
endif
|
||||
|
||||
backend_input = []
|
||||
backend_objs = [postgres_lib.extract_all_objects(recursive: false)]
|
||||
|
||||
# As of 1/2010:
|
||||
# The probes.o file is necessary for dtrace support on Solaris, and on recent
|
||||
# versions of systemtap. (Older systemtap releases just produce an empty
|
||||
# file, but that's okay.) However, macOS's dtrace doesn't use it and doesn't
|
||||
# even recognize the -G option. So, build probes.o except on macOS.
|
||||
# This might need adjustment as other platforms add dtrace support.
|
||||
#
|
||||
# On at least linux we don't actually need to pass in all the objects, but
|
||||
# at least on FreeBSD and Solaris we have to.
|
||||
#
|
||||
# XXX: The reason we don't use the objects for generated sources is that
|
||||
# hits a meson bug. Luckily we don't don't have probes in generated
|
||||
# sources...
|
||||
if dtrace.found() and host_system != 'darwin'
|
||||
backend_input += custom_target(
|
||||
'probes.o',
|
||||
input: ['utils/probes.d', postgres_lib.extract_objects(backend_sources, timezone_sources)],
|
||||
output: 'probes.o',
|
||||
command: [dtrace, '-C', '-G', '-o', '@OUTPUT@', '-s', '@INPUT@'],
|
||||
install: false,
|
||||
)
|
||||
endif
|
||||
|
||||
postgres = executable('postgres',
|
||||
backend_input,
|
||||
objects: backend_objs,
|
||||
link_args: backend_link_args,
|
||||
link_with: backend_link_with,
|
||||
link_depends: backend_link_depends,
|
||||
export_dynamic: true,
|
||||
implib: true,
|
||||
dependencies: backend_build_deps,
|
||||
kwargs: default_bin_args,
|
||||
)
|
||||
|
||||
backend_targets += postgres
|
||||
|
||||
pg_mod_c_args = cflags_mod
|
||||
pg_mod_cpp_args = cxxflags_mod
|
||||
pg_mod_link_args = ldflags_sl + ldflags_mod
|
||||
pg_mod_link_depend = []
|
||||
|
||||
# A few platforms like MacOS and Windows link shared modules against postgres,
|
||||
# or a [import] library derived from it. Set up the link flags for that.
|
||||
if mod_link_args_fmt.length() > 0
|
||||
# To avoid unnecessary build-time dependencies on other operating systems,
|
||||
# only the dependency when it when necessary.
|
||||
pg_mod_link_depend += postgres
|
||||
|
||||
name = mod_link_with_name.format('postgres')
|
||||
link_with_uninst = meson.current_build_dir() / name
|
||||
link_with_inst = '${@0@}/@1@'.format(mod_link_with_dir, name)
|
||||
|
||||
foreach el : mod_link_args_fmt
|
||||
pg_mod_link_args += el.format(link_with_uninst)
|
||||
endforeach
|
||||
endif
|
||||
|
||||
|
||||
# Note there's intentionally no dependency on pgport/common here - we want the
|
||||
# symbols from the main binary for extension modules, rather than the
|
||||
# extension linking separately to pgport/common.
|
||||
backend_mod_code = declare_dependency(
|
||||
compile_args: pg_mod_c_args,
|
||||
include_directories: postgres_inc,
|
||||
link_args: pg_mod_link_args,
|
||||
sources: generated_headers + generated_backend_headers,
|
||||
dependencies: backend_mod_deps,
|
||||
)
|
||||
|
||||
pg_mod_args = default_mod_args + {
|
||||
'dependencies': [backend_mod_code],
|
||||
'cpp_args': pg_mod_cpp_args,
|
||||
'link_depends': pg_mod_link_depend,
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Shared modules that, on some system, link against the server binary. Only
|
||||
# enter these after we defined the server build.
|
||||
|
||||
subdir('jit/llvm')
|
||||
subdir('replication/libpqwalreceiver')
|
||||
subdir('replication/pgoutput')
|
||||
subdir('snowball')
|
||||
subdir('utils/mb/conversion_procs')
|
29
src/backend/nodes/meson.build
Normal file
29
src/backend/nodes/meson.build
Normal file
@@ -0,0 +1,29 @@
|
||||
backend_sources += files(
|
||||
'bitmapset.c',
|
||||
'extensible.c',
|
||||
'list.c',
|
||||
'makefuncs.c',
|
||||
'nodeFuncs.c',
|
||||
'nodes.c',
|
||||
'params.c',
|
||||
'print.c',
|
||||
'read.c',
|
||||
'tidbitmap.c',
|
||||
'value.c',
|
||||
)
|
||||
|
||||
# these include .c files generated in ../../include/nodes, seems nicer to not
|
||||
# add that as an include path for the whole backend
|
||||
nodefunc_sources = files(
|
||||
'copyfuncs.c',
|
||||
'equalfuncs.c',
|
||||
'outfuncs.c',
|
||||
'readfuncs.c',
|
||||
)
|
||||
nodefuncs = static_library('nodefuncs',
|
||||
nodefunc_sources,
|
||||
dependencies: [backend_code],
|
||||
include_directories: include_directories('../../include/nodes'),
|
||||
kwargs: internal_lib_args,
|
||||
)
|
||||
backend_link_with += nodefuncs
|
17
src/backend/optimizer/geqo/meson.build
Normal file
17
src/backend/optimizer/geqo/meson.build
Normal file
@@ -0,0 +1,17 @@
|
||||
backend_sources += files(
|
||||
'geqo_copy.c',
|
||||
'geqo_cx.c',
|
||||
'geqo_erx.c',
|
||||
'geqo_eval.c',
|
||||
'geqo_main.c',
|
||||
'geqo_misc.c',
|
||||
'geqo_mutation.c',
|
||||
'geqo_ox1.c',
|
||||
'geqo_ox2.c',
|
||||
'geqo_pmx.c',
|
||||
'geqo_pool.c',
|
||||
'geqo_px.c',
|
||||
'geqo_random.c',
|
||||
'geqo_recombination.c',
|
||||
'geqo_selection.c',
|
||||
)
|
5
src/backend/optimizer/meson.build
Normal file
5
src/backend/optimizer/meson.build
Normal file
@@ -0,0 +1,5 @@
|
||||
subdir('geqo')
|
||||
subdir('path')
|
||||
subdir('plan')
|
||||
subdir('prep')
|
||||
subdir('util')
|
11
src/backend/optimizer/path/meson.build
Normal file
11
src/backend/optimizer/path/meson.build
Normal file
@@ -0,0 +1,11 @@
|
||||
backend_sources += files(
|
||||
'allpaths.c',
|
||||
'clausesel.c',
|
||||
'costsize.c',
|
||||
'equivclass.c',
|
||||
'indxpath.c',
|
||||
'joinpath.c',
|
||||
'joinrels.c',
|
||||
'pathkeys.c',
|
||||
'tidpath.c',
|
||||
)
|
10
src/backend/optimizer/plan/meson.build
Normal file
10
src/backend/optimizer/plan/meson.build
Normal file
@@ -0,0 +1,10 @@
|
||||
backend_sources += files(
|
||||
'analyzejoins.c',
|
||||
'createplan.c',
|
||||
'initsplan.c',
|
||||
'planagg.c',
|
||||
'planmain.c',
|
||||
'planner.c',
|
||||
'setrefs.c',
|
||||
'subselect.c',
|
||||
)
|
7
src/backend/optimizer/prep/meson.build
Normal file
7
src/backend/optimizer/prep/meson.build
Normal file
@@ -0,0 +1,7 @@
|
||||
backend_sources += files(
|
||||
'prepagg.c',
|
||||
'prepjointree.c',
|
||||
'prepqual.c',
|
||||
'preptlist.c',
|
||||
'prepunion.c',
|
||||
)
|
16
src/backend/optimizer/util/meson.build
Normal file
16
src/backend/optimizer/util/meson.build
Normal file
@@ -0,0 +1,16 @@
|
||||
backend_sources += files(
|
||||
'appendinfo.c',
|
||||
'clauses.c',
|
||||
'inherit.c',
|
||||
'joininfo.c',
|
||||
'orclauses.c',
|
||||
'paramassign.c',
|
||||
'pathnode.c',
|
||||
'placeholder.c',
|
||||
'plancat.c',
|
||||
'predtest.c',
|
||||
'relnode.c',
|
||||
'restrictinfo.c',
|
||||
'tlist.c',
|
||||
'var.c',
|
||||
)
|
48
src/backend/parser/meson.build
Normal file
48
src/backend/parser/meson.build
Normal file
@@ -0,0 +1,48 @@
|
||||
backend_sources += files(
|
||||
'analyze.c',
|
||||
'parse_agg.c',
|
||||
'parse_clause.c',
|
||||
'parse_coerce.c',
|
||||
'parse_collate.c',
|
||||
'parse_cte.c',
|
||||
'parse_enr.c',
|
||||
'parse_expr.c',
|
||||
'parse_func.c',
|
||||
'parse_merge.c',
|
||||
'parse_node.c',
|
||||
'parse_oper.c',
|
||||
'parse_param.c',
|
||||
'parse_relation.c',
|
||||
'parse_target.c',
|
||||
'parse_type.c',
|
||||
'parse_utilcmd.c',
|
||||
'scansup.c',
|
||||
)
|
||||
|
||||
# Build a small utility static lib for the parser. The generation of the
|
||||
# parser is slow, and building this separately avoids other parts of the
|
||||
# backend having to wait till gram.h is generated.
|
||||
parser_sources = files('parser.c')
|
||||
|
||||
backend_scanner = custom_target('scan',
|
||||
input: 'scan.l',
|
||||
output: 'scan.c',
|
||||
command: [flex_cmd, '--no-backup', '--fix-warnings', '--', '-CF', '-p', '-p'],
|
||||
)
|
||||
generated_sources += backend_scanner
|
||||
parser_sources += backend_scanner
|
||||
|
||||
backend_parser = custom_target('gram',
|
||||
input: 'gram.y',
|
||||
kwargs: bison_kw,
|
||||
)
|
||||
generated_sources += backend_parser.to_list()
|
||||
parser_sources += backend_parser
|
||||
|
||||
parser = static_library('parser',
|
||||
parser_sources,
|
||||
dependencies: [backend_code],
|
||||
include_directories: include_directories('.'),
|
||||
kwargs: internal_lib_args,
|
||||
)
|
||||
backend_link_with += parser
|
5
src/backend/partitioning/meson.build
Normal file
5
src/backend/partitioning/meson.build
Normal file
@@ -0,0 +1,5 @@
|
||||
backend_sources += files(
|
||||
'partbounds.c',
|
||||
'partdesc.c',
|
||||
'partprune.c',
|
||||
)
|
1
src/backend/po/meson.build
Normal file
1
src/backend/po/meson.build
Normal file
@@ -0,0 +1 @@
|
||||
i18n.gettext('postgres-' + pg_version_major.to_string())
|
31
src/backend/port/meson.build
Normal file
31
src/backend/port/meson.build
Normal file
@@ -0,0 +1,31 @@
|
||||
backend_sources += files(
|
||||
'atomics.c',
|
||||
)
|
||||
|
||||
|
||||
if cdata.has('USE_UNNAMED_POSIX_SEMAPHORES') or cdata.has('USE_NAMED_POSIX_SEMAPHORES')
|
||||
backend_sources += files('posix_sema.c')
|
||||
endif
|
||||
|
||||
if cdata.has('USE_SYSV_SEMAPHORES')
|
||||
backend_sources += files('sysv_sema.c')
|
||||
endif
|
||||
|
||||
if cdata.has('USE_WIN32_SEMAPHORES')
|
||||
backend_sources += files('win32_sema.c')
|
||||
endif
|
||||
|
||||
if cdata.has('USE_SYSV_SHARED_MEMORY')
|
||||
backend_sources += files('sysv_shmem.c')
|
||||
endif
|
||||
|
||||
if cdata.has('USE_WIN32_SHARED_MEMORY')
|
||||
backend_sources += files('win32_shmem.c')
|
||||
endif
|
||||
|
||||
if host_system == 'windows'
|
||||
subdir('win32')
|
||||
endif
|
||||
|
||||
# autoconf generates the file there, ensure we get a conflict
|
||||
generated_sources_ac += {'src/backend/port': ['pg_sema.c', 'pg_shmem.c', 'tas.s']}
|
6
src/backend/port/win32/meson.build
Normal file
6
src/backend/port/win32/meson.build
Normal file
@@ -0,0 +1,6 @@
|
||||
backend_sources += files(
|
||||
'crashdump.c',
|
||||
'signal.c',
|
||||
'socket.c',
|
||||
'timer.c',
|
||||
)
|
15
src/backend/postmaster/meson.build
Normal file
15
src/backend/postmaster/meson.build
Normal file
@@ -0,0 +1,15 @@
|
||||
backend_sources += files(
|
||||
'autovacuum.c',
|
||||
'auxprocess.c',
|
||||
'bgworker.c',
|
||||
'bgwriter.c',
|
||||
'checkpointer.c',
|
||||
'fork_process.c',
|
||||
'interrupt.c',
|
||||
'pgarch.c',
|
||||
'postmaster.c',
|
||||
'shell_archive.c',
|
||||
'startup.c',
|
||||
'syslogger.c',
|
||||
'walwriter.c',
|
||||
)
|
8
src/backend/regex/meson.build
Normal file
8
src/backend/regex/meson.build
Normal file
@@ -0,0 +1,8 @@
|
||||
backend_sources += files(
|
||||
'regcomp.c',
|
||||
'regerror.c',
|
||||
'regexec.c',
|
||||
'regexport.c',
|
||||
'regfree.c',
|
||||
'regprefix.c',
|
||||
)
|
13
src/backend/replication/libpqwalreceiver/meson.build
Normal file
13
src/backend/replication/libpqwalreceiver/meson.build
Normal file
@@ -0,0 +1,13 @@
|
||||
libpqwalreceiver_sources = files(
|
||||
'libpqwalreceiver.c',
|
||||
)
|
||||
|
||||
libpqwalreceiver = shared_module('pqwalreceiver',
|
||||
libpqwalreceiver_sources,
|
||||
kwargs: pg_mod_args + {
|
||||
'name_prefix': 'lib',
|
||||
'dependencies': pg_mod_args['dependencies'] + [libpq],
|
||||
}
|
||||
)
|
||||
|
||||
backend_targets += libpqwalreceiver
|
14
src/backend/replication/logical/meson.build
Normal file
14
src/backend/replication/logical/meson.build
Normal file
@@ -0,0 +1,14 @@
|
||||
backend_sources += files(
|
||||
'decode.c',
|
||||
'launcher.c',
|
||||
'logical.c',
|
||||
'logicalfuncs.c',
|
||||
'message.c',
|
||||
'origin.c',
|
||||
'proto.c',
|
||||
'relation.c',
|
||||
'reorderbuffer.c',
|
||||
'snapbuild.c',
|
||||
'tablesync.c',
|
||||
'worker.c',
|
||||
)
|
51
src/backend/replication/meson.build
Normal file
51
src/backend/replication/meson.build
Normal file
@@ -0,0 +1,51 @@
|
||||
backend_sources += files(
|
||||
'slot.c',
|
||||
'slotfuncs.c',
|
||||
'syncrep.c',
|
||||
'walreceiver.c',
|
||||
'walreceiverfuncs.c',
|
||||
'walsender.c',
|
||||
)
|
||||
|
||||
# see ../parser/meson.build
|
||||
repl_parser_sources = []
|
||||
|
||||
repl_scanner = custom_target('repl_scanner',
|
||||
input: 'repl_scanner.l',
|
||||
output: 'repl_scanner.c',
|
||||
command: flex_cmd,
|
||||
)
|
||||
generated_sources += repl_scanner
|
||||
repl_parser_sources += repl_scanner
|
||||
|
||||
repl_gram = custom_target('repl_gram',
|
||||
input: 'repl_gram.y',
|
||||
kwargs: bison_kw,
|
||||
)
|
||||
generated_sources += repl_gram.to_list()
|
||||
repl_parser_sources += repl_gram
|
||||
|
||||
syncrep_scanner = custom_target('syncrep_scanner',
|
||||
input: 'syncrep_scanner.l',
|
||||
output: 'syncrep_scanner.c',
|
||||
command: flex_cmd,
|
||||
)
|
||||
generated_sources += syncrep_scanner
|
||||
repl_parser_sources += syncrep_scanner
|
||||
|
||||
syncrep_gram = custom_target('syncrep_gram',
|
||||
input: 'syncrep_gram.y',
|
||||
kwargs: bison_kw,
|
||||
)
|
||||
generated_sources += syncrep_gram.to_list()
|
||||
repl_parser_sources += syncrep_gram
|
||||
|
||||
repl_parser = static_library('repl_parser',
|
||||
repl_parser_sources,
|
||||
dependencies: [backend_code],
|
||||
include_directories: include_directories('.'),
|
||||
kwargs: internal_lib_args,
|
||||
)
|
||||
backend_link_with += repl_parser
|
||||
|
||||
subdir('logical')
|
10
src/backend/replication/pgoutput/meson.build
Normal file
10
src/backend/replication/pgoutput/meson.build
Normal file
@@ -0,0 +1,10 @@
|
||||
pgoutput_sources = files(
|
||||
'pgoutput.c',
|
||||
)
|
||||
|
||||
pgoutput = shared_module('pgoutput',
|
||||
pgoutput_sources,
|
||||
kwargs: pg_mod_args,
|
||||
)
|
||||
|
||||
backend_targets += pgoutput
|
9
src/backend/rewrite/meson.build
Normal file
9
src/backend/rewrite/meson.build
Normal file
@@ -0,0 +1,9 @@
|
||||
backend_sources += files(
|
||||
'rewriteDefine.c',
|
||||
'rewriteHandler.c',
|
||||
'rewriteManip.c',
|
||||
'rewriteRemove.c',
|
||||
'rewriteSearchCycle.c',
|
||||
'rewriteSupport.c',
|
||||
'rowsecurity.c',
|
||||
)
|
88
src/backend/snowball/meson.build
Normal file
88
src/backend/snowball/meson.build
Normal file
@@ -0,0 +1,88 @@
|
||||
dict_snowball_sources = files(
|
||||
'libstemmer/api.c',
|
||||
'libstemmer/utilities.c',
|
||||
'dict_snowball.c',
|
||||
)
|
||||
|
||||
dict_snowball_sources += files(
|
||||
'libstemmer/stem_ISO_8859_1_basque.c',
|
||||
'libstemmer/stem_ISO_8859_1_catalan.c',
|
||||
'libstemmer/stem_ISO_8859_1_danish.c',
|
||||
'libstemmer/stem_ISO_8859_1_dutch.c',
|
||||
'libstemmer/stem_ISO_8859_1_english.c',
|
||||
'libstemmer/stem_ISO_8859_1_finnish.c',
|
||||
'libstemmer/stem_ISO_8859_1_french.c',
|
||||
'libstemmer/stem_ISO_8859_1_german.c',
|
||||
'libstemmer/stem_ISO_8859_1_indonesian.c',
|
||||
'libstemmer/stem_ISO_8859_1_irish.c',
|
||||
'libstemmer/stem_ISO_8859_1_italian.c',
|
||||
'libstemmer/stem_ISO_8859_1_norwegian.c',
|
||||
'libstemmer/stem_ISO_8859_1_porter.c',
|
||||
'libstemmer/stem_ISO_8859_1_portuguese.c',
|
||||
'libstemmer/stem_ISO_8859_1_spanish.c',
|
||||
'libstemmer/stem_ISO_8859_1_swedish.c',
|
||||
'libstemmer/stem_ISO_8859_2_hungarian.c',
|
||||
'libstemmer/stem_ISO_8859_2_romanian.c',
|
||||
'libstemmer/stem_KOI8_R_russian.c',
|
||||
'libstemmer/stem_UTF_8_arabic.c',
|
||||
'libstemmer/stem_UTF_8_armenian.c',
|
||||
'libstemmer/stem_UTF_8_basque.c',
|
||||
'libstemmer/stem_UTF_8_catalan.c',
|
||||
'libstemmer/stem_UTF_8_danish.c',
|
||||
'libstemmer/stem_UTF_8_dutch.c',
|
||||
'libstemmer/stem_UTF_8_english.c',
|
||||
'libstemmer/stem_UTF_8_finnish.c',
|
||||
'libstemmer/stem_UTF_8_french.c',
|
||||
'libstemmer/stem_UTF_8_german.c',
|
||||
'libstemmer/stem_UTF_8_greek.c',
|
||||
'libstemmer/stem_UTF_8_hindi.c',
|
||||
'libstemmer/stem_UTF_8_hungarian.c',
|
||||
'libstemmer/stem_UTF_8_indonesian.c',
|
||||
'libstemmer/stem_UTF_8_irish.c',
|
||||
'libstemmer/stem_UTF_8_italian.c',
|
||||
'libstemmer/stem_UTF_8_lithuanian.c',
|
||||
'libstemmer/stem_UTF_8_nepali.c',
|
||||
'libstemmer/stem_UTF_8_norwegian.c',
|
||||
'libstemmer/stem_UTF_8_porter.c',
|
||||
'libstemmer/stem_UTF_8_portuguese.c',
|
||||
'libstemmer/stem_UTF_8_romanian.c',
|
||||
'libstemmer/stem_UTF_8_russian.c',
|
||||
'libstemmer/stem_UTF_8_serbian.c',
|
||||
'libstemmer/stem_UTF_8_spanish.c',
|
||||
'libstemmer/stem_UTF_8_swedish.c',
|
||||
'libstemmer/stem_UTF_8_tamil.c',
|
||||
'libstemmer/stem_UTF_8_turkish.c',
|
||||
'libstemmer/stem_UTF_8_yiddish.c',
|
||||
)
|
||||
|
||||
# see comment in src/include/snowball/header.h
|
||||
stemmer_inc = include_directories('../../include/snowball')
|
||||
|
||||
dict_snowball = shared_module('dict_snowball',
|
||||
dict_snowball_sources,
|
||||
kwargs: pg_mod_args + {
|
||||
'include_directories': [stemmer_inc],
|
||||
}
|
||||
)
|
||||
|
||||
snowball_create = custom_target('snowball_create',
|
||||
output: ['snowball_create.sql'],
|
||||
depfile: 'snowball_create.dep',
|
||||
command: [
|
||||
perl, files('snowball_create.pl'),
|
||||
'--depfile',
|
||||
'--input', '@CURRENT_SOURCE_DIR@',
|
||||
'--outdir', '@OUTDIR@',
|
||||
],
|
||||
install: true,
|
||||
install_dir: dir_data,
|
||||
)
|
||||
generated_sources += snowball_create
|
||||
|
||||
install_subdir('stopwords',
|
||||
install_dir: dir_data / 'tsearch_data',
|
||||
strip_directory: true,
|
||||
)
|
||||
|
||||
backend_targets += dict_snowball
|
||||
backend_targets += snowball_create
|
6
src/backend/statistics/meson.build
Normal file
6
src/backend/statistics/meson.build
Normal file
@@ -0,0 +1,6 @@
|
||||
backend_sources += files(
|
||||
'dependencies.c',
|
||||
'extended_stats.c',
|
||||
'mcv.c',
|
||||
'mvdistinct.c',
|
||||
)
|
7
src/backend/storage/buffer/meson.build
Normal file
7
src/backend/storage/buffer/meson.build
Normal file
@@ -0,0 +1,7 @@
|
||||
backend_sources += files(
|
||||
'buf_init.c',
|
||||
'buf_table.c',
|
||||
'bufmgr.c',
|
||||
'freelist.c',
|
||||
'localbuf.c',
|
||||
)
|
8
src/backend/storage/file/meson.build
Normal file
8
src/backend/storage/file/meson.build
Normal file
@@ -0,0 +1,8 @@
|
||||
backend_sources += files(
|
||||
'buffile.c',
|
||||
'copydir.c',
|
||||
'fd.c',
|
||||
'fileset.c',
|
||||
'reinit.c',
|
||||
'sharedfileset.c',
|
||||
)
|
5
src/backend/storage/freespace/meson.build
Normal file
5
src/backend/storage/freespace/meson.build
Normal file
@@ -0,0 +1,5 @@
|
||||
backend_sources += files(
|
||||
'freespace.c',
|
||||
'fsmpage.c',
|
||||
'indexfsm.c',
|
||||
)
|
20
src/backend/storage/ipc/meson.build
Normal file
20
src/backend/storage/ipc/meson.build
Normal file
@@ -0,0 +1,20 @@
|
||||
backend_sources += files(
|
||||
'barrier.c',
|
||||
'dsm.c',
|
||||
'dsm_impl.c',
|
||||
'ipc.c',
|
||||
'ipci.c',
|
||||
'latch.c',
|
||||
'pmsignal.c',
|
||||
'procarray.c',
|
||||
'procsignal.c',
|
||||
'shm_mq.c',
|
||||
'shm_toc.c',
|
||||
'shmem.c',
|
||||
'shmqueue.c',
|
||||
'signalfuncs.c',
|
||||
'sinval.c',
|
||||
'sinvaladt.c',
|
||||
'standby.c',
|
||||
|
||||
)
|
3
src/backend/storage/large_object/meson.build
Normal file
3
src/backend/storage/large_object/meson.build
Normal file
@@ -0,0 +1,3 @@
|
||||
backend_sources += files(
|
||||
'inv_api.c',
|
||||
)
|
13
src/backend/storage/lmgr/meson.build
Normal file
13
src/backend/storage/lmgr/meson.build
Normal file
@@ -0,0 +1,13 @@
|
||||
backend_sources += files(
|
||||
'condition_variable.c',
|
||||
'deadlock.c',
|
||||
'lmgr.c',
|
||||
'lock.c',
|
||||
'lwlock.c',
|
||||
'predicate.c',
|
||||
'proc.c',
|
||||
's_lock.c',
|
||||
'spin.c',
|
||||
)
|
||||
|
||||
generated_backend_sources += lwlocknames[1]
|
9
src/backend/storage/meson.build
Normal file
9
src/backend/storage/meson.build
Normal file
@@ -0,0 +1,9 @@
|
||||
subdir('buffer')
|
||||
subdir('file')
|
||||
subdir('freespace')
|
||||
subdir('ipc')
|
||||
subdir('large_object')
|
||||
subdir('lmgr')
|
||||
subdir('page')
|
||||
subdir('smgr')
|
||||
subdir('sync')
|
5
src/backend/storage/page/meson.build
Normal file
5
src/backend/storage/page/meson.build
Normal file
@@ -0,0 +1,5 @@
|
||||
backend_sources += files(
|
||||
'bufpage.c',
|
||||
'checksum.c',
|
||||
'itemptr.c',
|
||||
)
|
4
src/backend/storage/smgr/meson.build
Normal file
4
src/backend/storage/smgr/meson.build
Normal file
@@ -0,0 +1,4 @@
|
||||
backend_sources += files(
|
||||
'md.c',
|
||||
'smgr.c',
|
||||
)
|
4
src/backend/storage/sync/meson.build
Normal file
4
src/backend/storage/sync/meson.build
Normal file
@@ -0,0 +1,4 @@
|
||||
backend_sources += files(
|
||||
'sync.c',
|
||||
|
||||
)
|
8
src/backend/tcop/meson.build
Normal file
8
src/backend/tcop/meson.build
Normal file
@@ -0,0 +1,8 @@
|
||||
backend_sources += files(
|
||||
'cmdtag.c',
|
||||
'dest.c',
|
||||
'fastpath.c',
|
||||
'postgres.c',
|
||||
'pquery.c',
|
||||
'utility.c',
|
||||
)
|
21
src/backend/tsearch/meson.build
Normal file
21
src/backend/tsearch/meson.build
Normal file
@@ -0,0 +1,21 @@
|
||||
backend_sources += files(
|
||||
'dict.c',
|
||||
'dict_ispell.c',
|
||||
'dict_simple.c',
|
||||
'dict_synonym.c',
|
||||
'dict_thesaurus.c',
|
||||
'regis.c',
|
||||
'spell.c',
|
||||
'to_tsany.c',
|
||||
'ts_locale.c',
|
||||
'ts_parse.c',
|
||||
'ts_selfuncs.c',
|
||||
'ts_typanalyze.c',
|
||||
'ts_utils.c',
|
||||
'wparser.c',
|
||||
'wparser_def.c',
|
||||
)
|
||||
|
||||
install_subdir('dicts',
|
||||
install_dir: dir_data / 'tsearch_data',
|
||||
strip_directory: true)
|
18
src/backend/utils/activity/meson.build
Normal file
18
src/backend/utils/activity/meson.build
Normal file
@@ -0,0 +1,18 @@
|
||||
backend_sources += files(
|
||||
'backend_progress.c',
|
||||
'backend_status.c',
|
||||
'pgstat.c',
|
||||
'pgstat_archiver.c',
|
||||
'pgstat_bgwriter.c',
|
||||
'pgstat_checkpointer.c',
|
||||
'pgstat_database.c',
|
||||
'pgstat_function.c',
|
||||
'pgstat_relation.c',
|
||||
'pgstat_replslot.c',
|
||||
'pgstat_shmem.c',
|
||||
'pgstat_slru.c',
|
||||
'pgstat_subscription.c',
|
||||
'pgstat_wal.c',
|
||||
'pgstat_xact.c',
|
||||
'wait_event.c',
|
||||
)
|
131
src/backend/utils/adt/meson.build
Normal file
131
src/backend/utils/adt/meson.build
Normal file
@@ -0,0 +1,131 @@
|
||||
backend_sources += files(
|
||||
'acl.c',
|
||||
'amutils.c',
|
||||
'array_expanded.c',
|
||||
'array_selfuncs.c',
|
||||
'array_typanalyze.c',
|
||||
'array_userfuncs.c',
|
||||
'arrayfuncs.c',
|
||||
'arraysubs.c',
|
||||
'arrayutils.c',
|
||||
'ascii.c',
|
||||
'bool.c',
|
||||
'cash.c',
|
||||
'char.c',
|
||||
'cryptohashfuncs.c',
|
||||
'date.c',
|
||||
'datetime.c',
|
||||
'datum.c',
|
||||
'dbsize.c',
|
||||
'domains.c',
|
||||
'encode.c',
|
||||
'enum.c',
|
||||
'expandeddatum.c',
|
||||
'expandedrecord.c',
|
||||
'float.c',
|
||||
'format_type.c',
|
||||
'formatting.c',
|
||||
'genfile.c',
|
||||
'geo_ops.c',
|
||||
'geo_selfuncs.c',
|
||||
'geo_spgist.c',
|
||||
'hbafuncs.c',
|
||||
'inet_cidr_ntop.c',
|
||||
'inet_net_pton.c',
|
||||
'int.c',
|
||||
'int8.c',
|
||||
'json.c',
|
||||
'jsonb.c',
|
||||
'jsonb_gin.c',
|
||||
'jsonb_op.c',
|
||||
'jsonb_util.c',
|
||||
'jsonbsubs.c',
|
||||
'jsonfuncs.c',
|
||||
'jsonpath.c',
|
||||
'jsonpath_exec.c',
|
||||
'like.c',
|
||||
'like_support.c',
|
||||
'lockfuncs.c',
|
||||
'mac.c',
|
||||
'mac8.c',
|
||||
'mcxtfuncs.c',
|
||||
'misc.c',
|
||||
'multirangetypes.c',
|
||||
'multirangetypes_selfuncs.c',
|
||||
'name.c',
|
||||
'network.c',
|
||||
'network_gist.c',
|
||||
'network_selfuncs.c',
|
||||
'network_spgist.c',
|
||||
'numeric.c',
|
||||
'numutils.c',
|
||||
'oid.c',
|
||||
'oracle_compat.c',
|
||||
'orderedsetaggs.c',
|
||||
'partitionfuncs.c',
|
||||
'pg_locale.c',
|
||||
'pg_lsn.c',
|
||||
'pg_upgrade_support.c',
|
||||
'pgstatfuncs.c',
|
||||
'pseudotypes.c',
|
||||
'quote.c',
|
||||
'rangetypes.c',
|
||||
'rangetypes_gist.c',
|
||||
'rangetypes_selfuncs.c',
|
||||
'rangetypes_spgist.c',
|
||||
'rangetypes_typanalyze.c',
|
||||
'regexp.c',
|
||||
'regproc.c',
|
||||
'ri_triggers.c',
|
||||
'rowtypes.c',
|
||||
'ruleutils.c',
|
||||
'selfuncs.c',
|
||||
'tid.c',
|
||||
'timestamp.c',
|
||||
'trigfuncs.c',
|
||||
'tsginidx.c',
|
||||
'tsgistidx.c',
|
||||
'tsquery.c',
|
||||
'tsquery_cleanup.c',
|
||||
'tsquery_gist.c',
|
||||
'tsquery_op.c',
|
||||
'tsquery_rewrite.c',
|
||||
'tsquery_util.c',
|
||||
'tsrank.c',
|
||||
'tsvector.c',
|
||||
'tsvector_op.c',
|
||||
'tsvector_parser.c',
|
||||
'uuid.c',
|
||||
'varbit.c',
|
||||
'varchar.c',
|
||||
'varlena.c',
|
||||
'version.c',
|
||||
'windowfuncs.c',
|
||||
'xid.c',
|
||||
'xid8funcs.c',
|
||||
'xml.c',
|
||||
)
|
||||
|
||||
|
||||
jsonpath_scan = custom_target('jsonpath_scan',
|
||||
input: 'jsonpath_scan.l',
|
||||
output: 'jsonpath_scan.c',
|
||||
command: [flex_cmd, '--no-backup', '--', '-CF', '-p', '-p'],
|
||||
)
|
||||
generated_sources += jsonpath_scan
|
||||
|
||||
jsonpath_gram = custom_target('jsonpath_parse',
|
||||
input: 'jsonpath_gram.y',
|
||||
kwargs: bison_kw,
|
||||
)
|
||||
generated_sources += jsonpath_gram.to_list()
|
||||
|
||||
# so we don't need to add . as an include dir for the whole backend
|
||||
backend_link_with += static_library('jsonpath',
|
||||
jsonpath_scan, jsonpath_gram,
|
||||
dependencies: [backend_code],
|
||||
include_directories: include_directories('.'),
|
||||
kwargs: internal_lib_args,
|
||||
)
|
||||
|
||||
#generated_backend_sources += jsonpath_gram.to_list()
|
16
src/backend/utils/cache/meson.build
vendored
Normal file
16
src/backend/utils/cache/meson.build
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
backend_sources += files(
|
||||
'attoptcache.c',
|
||||
'catcache.c',
|
||||
'evtcache.c',
|
||||
'inval.c',
|
||||
'lsyscache.c',
|
||||
'partcache.c',
|
||||
'plancache.c',
|
||||
'relcache.c',
|
||||
'relfilenumbermap.c',
|
||||
'relmapper.c',
|
||||
'spccache.c',
|
||||
'syscache.c',
|
||||
'ts_cache.c',
|
||||
'typcache.c',
|
||||
)
|
6
src/backend/utils/error/meson.build
Normal file
6
src/backend/utils/error/meson.build
Normal file
@@ -0,0 +1,6 @@
|
||||
backend_sources += files(
|
||||
'assert.c',
|
||||
'csvlog.c',
|
||||
'elog.c',
|
||||
'jsonlog.c',
|
||||
)
|
8
src/backend/utils/fmgr/meson.build
Normal file
8
src/backend/utils/fmgr/meson.build
Normal file
@@ -0,0 +1,8 @@
|
||||
backend_sources += files(
|
||||
'dfmgr.c',
|
||||
'fmgr.c',
|
||||
'funcapi.c',
|
||||
)
|
||||
|
||||
# fmgrtab.c
|
||||
generated_backend_sources += fmgrtab_target[2]
|
4
src/backend/utils/hash/meson.build
Normal file
4
src/backend/utils/hash/meson.build
Normal file
@@ -0,0 +1,4 @@
|
||||
backend_sources += files(
|
||||
'dynahash.c',
|
||||
'pg_crc.c'
|
||||
)
|
4
src/backend/utils/init/meson.build
Normal file
4
src/backend/utils/init/meson.build
Normal file
@@ -0,0 +1,4 @@
|
||||
backend_sources += files(
|
||||
'globals.c',
|
||||
'miscinit.c',
|
||||
'postinit.c')
|
36
src/backend/utils/mb/conversion_procs/meson.build
Normal file
36
src/backend/utils/mb/conversion_procs/meson.build
Normal file
@@ -0,0 +1,36 @@
|
||||
encodings = {
|
||||
'cyrillic_and_mic': ['cyrillic_and_mic/cyrillic_and_mic.c'],
|
||||
'euc2004_sjis2004': ['euc2004_sjis2004/euc2004_sjis2004.c'],
|
||||
'euc_cn_and_mic': ['euc_cn_and_mic/euc_cn_and_mic.c'],
|
||||
'euc_jp_and_sjis': ['euc_jp_and_sjis/euc_jp_and_sjis.c'],
|
||||
'euc_kr_and_mic': ['euc_kr_and_mic/euc_kr_and_mic.c'],
|
||||
'euc_tw_and_big5': [
|
||||
'euc_tw_and_big5/euc_tw_and_big5.c',
|
||||
'euc_tw_and_big5/big5.c',
|
||||
],
|
||||
'latin2_and_win1250': ['latin2_and_win1250/latin2_and_win1250.c'],
|
||||
'latin_and_mic': ['latin_and_mic/latin_and_mic.c'],
|
||||
'utf8_and_big5': ['utf8_and_big5/utf8_and_big5.c'],
|
||||
'utf8_and_cyrillic': ['utf8_and_cyrillic/utf8_and_cyrillic.c'],
|
||||
'utf8_and_euc2004': ['utf8_and_euc2004/utf8_and_euc2004.c'],
|
||||
'utf8_and_euc_cn': ['utf8_and_euc_cn/utf8_and_euc_cn.c'],
|
||||
'utf8_and_euc_jp': ['utf8_and_euc_jp/utf8_and_euc_jp.c'],
|
||||
'utf8_and_euc_kr': ['utf8_and_euc_kr/utf8_and_euc_kr.c'],
|
||||
'utf8_and_euc_tw': ['utf8_and_euc_tw/utf8_and_euc_tw.c'],
|
||||
'utf8_and_gb18030': ['utf8_and_gb18030/utf8_and_gb18030.c'],
|
||||
'utf8_and_gbk': ['utf8_and_gbk/utf8_and_gbk.c'],
|
||||
'utf8_and_iso8859': ['utf8_and_iso8859/utf8_and_iso8859.c'],
|
||||
'utf8_and_iso8859_1': ['utf8_and_iso8859_1/utf8_and_iso8859_1.c'],
|
||||
'utf8_and_johab': ['utf8_and_johab/utf8_and_johab.c'],
|
||||
'utf8_and_sjis': ['utf8_and_sjis/utf8_and_sjis.c'],
|
||||
'utf8_and_sjis2004': ['utf8_and_sjis2004/utf8_and_sjis2004.c'],
|
||||
'utf8_and_uhc': ['utf8_and_uhc/utf8_and_uhc.c'],
|
||||
'utf8_and_win': ['utf8_and_win/utf8_and_win.c'],
|
||||
}
|
||||
|
||||
foreach encoding, sources : encodings
|
||||
backend_targets += shared_module(encoding,
|
||||
sources,
|
||||
kwargs: pg_mod_args,
|
||||
)
|
||||
endforeach
|
9
src/backend/utils/mb/meson.build
Normal file
9
src/backend/utils/mb/meson.build
Normal file
@@ -0,0 +1,9 @@
|
||||
backend_sources += files(
|
||||
'conv.c',
|
||||
'mbutils.c',
|
||||
'stringinfo_mb.c',
|
||||
'wstrcmp.c',
|
||||
'wstrncmp.c',
|
||||
)
|
||||
|
||||
# Note we only enter conversion_procs once the backend build is defined
|
17
src/backend/utils/meson.build
Normal file
17
src/backend/utils/meson.build
Normal file
@@ -0,0 +1,17 @@
|
||||
install_data('errcodes.txt',
|
||||
install_dir: dir_data,
|
||||
)
|
||||
|
||||
subdir('activity')
|
||||
subdir('adt')
|
||||
subdir('cache')
|
||||
subdir('error')
|
||||
subdir('fmgr')
|
||||
subdir('hash')
|
||||
subdir('init')
|
||||
subdir('mb')
|
||||
subdir('misc')
|
||||
subdir('mmgr')
|
||||
subdir('resowner')
|
||||
subdir('sort')
|
||||
subdir('time')
|
35
src/backend/utils/misc/meson.build
Normal file
35
src/backend/utils/misc/meson.build
Normal file
@@ -0,0 +1,35 @@
|
||||
backend_sources += files(
|
||||
'guc.c',
|
||||
'guc_funcs.c',
|
||||
'guc_tables.c',
|
||||
'help_config.c',
|
||||
'pg_config.c',
|
||||
'pg_controldata.c',
|
||||
'pg_rusage.c',
|
||||
'ps_status.c',
|
||||
'queryenvironment.c',
|
||||
'queryjumble.c',
|
||||
'rls.c',
|
||||
'sampling.c',
|
||||
'superuser.c',
|
||||
'timeout.c',
|
||||
'tzparser.c',
|
||||
)
|
||||
|
||||
guc_scan = custom_target('guc_scan',
|
||||
input: 'guc-file.l',
|
||||
output: 'guc-file.c',
|
||||
command: flex_cmd)
|
||||
generated_sources += guc_scan
|
||||
|
||||
# so we don't need to add . as an include dir for the whole backend
|
||||
backend_link_with += static_library('guc-file',
|
||||
guc_scan,
|
||||
dependencies: [backend_code],
|
||||
include_directories: include_directories('.'),
|
||||
kwargs: internal_lib_args,
|
||||
)
|
||||
|
||||
install_data('postgresql.conf.sample',
|
||||
install_dir: dir_data,
|
||||
)
|
10
src/backend/utils/mmgr/meson.build
Normal file
10
src/backend/utils/mmgr/meson.build
Normal file
@@ -0,0 +1,10 @@
|
||||
backend_sources += files(
|
||||
'aset.c',
|
||||
'dsa.c',
|
||||
'freepage.c',
|
||||
'generation.c',
|
||||
'mcxt.c',
|
||||
'memdebug.c',
|
||||
'portalmem.c',
|
||||
'slab.c',
|
||||
)
|
3
src/backend/utils/resowner/meson.build
Normal file
3
src/backend/utils/resowner/meson.build
Normal file
@@ -0,0 +1,3 @@
|
||||
backend_sources += files(
|
||||
'resowner.c'
|
||||
)
|
9
src/backend/utils/sort/meson.build
Normal file
9
src/backend/utils/sort/meson.build
Normal file
@@ -0,0 +1,9 @@
|
||||
backend_sources += files(
|
||||
'logtape.c',
|
||||
'qsort_interruptible.c',
|
||||
'sharedtuplestore.c',
|
||||
'sortsupport.c',
|
||||
'tuplesort.c',
|
||||
'tuplesortvariants.c',
|
||||
'tuplestore.c',
|
||||
)
|
4
src/backend/utils/time/meson.build
Normal file
4
src/backend/utils/time/meson.build
Normal file
@@ -0,0 +1,4 @@
|
||||
backend_sources += files(
|
||||
'combocid.c',
|
||||
'snapmgr.c',
|
||||
)
|
30
src/bin/initdb/meson.build
Normal file
30
src/bin/initdb/meson.build
Normal file
@@ -0,0 +1,30 @@
|
||||
initdb_sources = files(
|
||||
'findtimezone.c',
|
||||
'initdb.c'
|
||||
)
|
||||
|
||||
initdb_sources += timezone_localtime_source
|
||||
|
||||
#fixme: reimplement libpq_pgport logic
|
||||
|
||||
initdb = executable('initdb',
|
||||
initdb_sources,
|
||||
include_directories: [timezone_inc],
|
||||
dependencies: [frontend_code, libpq, icu, icu_i18n],
|
||||
kwargs: default_bin_args,
|
||||
)
|
||||
bin_targets += initdb
|
||||
|
||||
tests += {
|
||||
'name': 'initdb',
|
||||
'sd': meson.current_source_dir(),
|
||||
'bd': meson.current_build_dir(),
|
||||
'tap': {
|
||||
'env': {'with_icu': icu.found() ? 'yes' : 'no'},
|
||||
'tests': [
|
||||
't/001_initdb.pl',
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
subdir('po', if_found: libintl)
|
1
src/bin/initdb/po/meson.build
Normal file
1
src/bin/initdb/po/meson.build
Normal file
@@ -0,0 +1 @@
|
||||
i18n.gettext('initdb-' + pg_version_major.to_string())
|
20
src/bin/meson.build
Normal file
20
src/bin/meson.build
Normal file
@@ -0,0 +1,20 @@
|
||||
subdir('initdb')
|
||||
subdir('pg_amcheck')
|
||||
subdir('pg_archivecleanup')
|
||||
subdir('pg_basebackup')
|
||||
subdir('pg_checksums')
|
||||
subdir('pg_config')
|
||||
subdir('pg_controldata')
|
||||
subdir('pg_ctl')
|
||||
subdir('pg_dump')
|
||||
subdir('pg_resetwal')
|
||||
subdir('pg_rewind')
|
||||
subdir('pg_test_fsync')
|
||||
subdir('pg_test_timing')
|
||||
subdir('pg_upgrade')
|
||||
subdir('pg_verifybackup')
|
||||
subdir('pg_waldump')
|
||||
subdir('pgbench')
|
||||
subdir('pgevent')
|
||||
subdir('psql')
|
||||
subdir('scripts')
|
27
src/bin/pg_amcheck/meson.build
Normal file
27
src/bin/pg_amcheck/meson.build
Normal file
@@ -0,0 +1,27 @@
|
||||
pg_amcheck_sources = files(
|
||||
'pg_amcheck.c'
|
||||
)
|
||||
|
||||
pg_amcheck = executable('pg_amcheck',
|
||||
pg_amcheck_sources,
|
||||
dependencies: [frontend_code, libpq],
|
||||
kwargs: default_bin_args,
|
||||
)
|
||||
bin_targets += pg_amcheck
|
||||
|
||||
tests += {
|
||||
'name': 'pg_amcheck',
|
||||
'sd': meson.current_source_dir(),
|
||||
'bd': meson.current_build_dir(),
|
||||
'tap': {
|
||||
'tests': [
|
||||
't/001_basic.pl',
|
||||
't/002_nonesuch.pl',
|
||||
't/003_check.pl',
|
||||
't/004_verify_heapam.pl',
|
||||
't/005_opclass_damage.pl',
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
subdir('po', if_found: libintl)
|
1
src/bin/pg_amcheck/po/meson.build
Normal file
1
src/bin/pg_amcheck/po/meson.build
Normal file
@@ -0,0 +1 @@
|
||||
i18n.gettext('pg_amcheck-' + pg_version_major.to_string())
|
19
src/bin/pg_archivecleanup/meson.build
Normal file
19
src/bin/pg_archivecleanup/meson.build
Normal file
@@ -0,0 +1,19 @@
|
||||
pg_archivecleanup = executable('pg_archivecleanup',
|
||||
['pg_archivecleanup.c'],
|
||||
dependencies: [frontend_code],
|
||||
kwargs: default_bin_args,
|
||||
)
|
||||
bin_targets += pg_archivecleanup
|
||||
|
||||
tests += {
|
||||
'name': 'pg_archivecleanup',
|
||||
'sd': meson.current_source_dir(),
|
||||
'bd': meson.current_build_dir(),
|
||||
'tap': {
|
||||
'tests': [
|
||||
't/010_pg_archivecleanup.pl',
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
subdir('po', if_found: libintl)
|
1
src/bin/pg_archivecleanup/po/meson.build
Normal file
1
src/bin/pg_archivecleanup/po/meson.build
Normal file
@@ -0,0 +1 @@
|
||||
i18n.gettext('pg_archivecleanup-' + pg_version_major.to_string())
|
61
src/bin/pg_basebackup/meson.build
Normal file
61
src/bin/pg_basebackup/meson.build
Normal file
@@ -0,0 +1,61 @@
|
||||
common_sources = files(
|
||||
'bbstreamer_file.c',
|
||||
'bbstreamer_gzip.c',
|
||||
'bbstreamer_inject.c',
|
||||
'bbstreamer_lz4.c',
|
||||
'bbstreamer_tar.c',
|
||||
'bbstreamer_zstd.c',
|
||||
'receivelog.c',
|
||||
'streamutil.c',
|
||||
'walmethods.c',
|
||||
)
|
||||
|
||||
pg_basebackup_deps = [frontend_code, libpq, lz4, zlib, zstd]
|
||||
pg_basebackup_common = static_library('libpg_basebackup_common',
|
||||
common_sources,
|
||||
dependencies: pg_basebackup_deps,
|
||||
kwargs: internal_lib_args,
|
||||
)
|
||||
|
||||
pg_basebackup = executable('pg_basebackup',
|
||||
'pg_basebackup.c',
|
||||
link_with: [pg_basebackup_common],
|
||||
dependencies: pg_basebackup_deps,
|
||||
kwargs: default_bin_args,
|
||||
)
|
||||
bin_targets += pg_basebackup
|
||||
|
||||
pg_receivewal = executable('pg_receivewal',
|
||||
'pg_receivewal.c',
|
||||
link_with: [pg_basebackup_common],
|
||||
dependencies: pg_basebackup_deps,
|
||||
kwargs: default_bin_args,
|
||||
)
|
||||
bin_targets += pg_receivewal
|
||||
|
||||
pg_recvlogical = executable('pg_recvlogical',
|
||||
'pg_recvlogical.c',
|
||||
link_with: [pg_basebackup_common],
|
||||
dependencies: pg_basebackup_deps,
|
||||
kwargs: default_bin_args,
|
||||
)
|
||||
bin_targets += pg_recvlogical
|
||||
|
||||
tests += {
|
||||
'name': 'pg_basebackup',
|
||||
'sd': meson.current_source_dir(),
|
||||
'bd': meson.current_build_dir(),
|
||||
'tap': {
|
||||
'env': {'GZIP_PROGRAM': gzip.path(),
|
||||
'TAR': tar.path(),
|
||||
'LZ4': program_lz4.found() ? program_lz4.path() : '',
|
||||
'ZSTD': program_zstd.found() ? program_zstd.path() : ''},
|
||||
'tests': [
|
||||
't/010_pg_basebackup.pl',
|
||||
't/020_pg_receivewal.pl',
|
||||
't/030_pg_recvlogical.pl',
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
subdir('po', if_found: libintl)
|
1
src/bin/pg_basebackup/po/meson.build
Normal file
1
src/bin/pg_basebackup/po/meson.build
Normal file
@@ -0,0 +1 @@
|
||||
i18n.gettext('pg_basebackup-' + pg_version_major.to_string())
|
21
src/bin/pg_checksums/meson.build
Normal file
21
src/bin/pg_checksums/meson.build
Normal file
@@ -0,0 +1,21 @@
|
||||
pg_checksums = executable('pg_checksums',
|
||||
['pg_checksums.c'],
|
||||
include_directories: [timezone_inc],
|
||||
dependencies: [frontend_code],
|
||||
kwargs: default_bin_args,
|
||||
)
|
||||
bin_targets += pg_checksums
|
||||
|
||||
tests += {
|
||||
'name': 'pg_checksums',
|
||||
'sd': meson.current_source_dir(),
|
||||
'bd': meson.current_build_dir(),
|
||||
'tap': {
|
||||
'tests': [
|
||||
't/001_basic.pl',
|
||||
't/002_actions.pl',
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
subdir('po', if_found: libintl)
|
1
src/bin/pg_checksums/po/meson.build
Normal file
1
src/bin/pg_checksums/po/meson.build
Normal file
@@ -0,0 +1 @@
|
||||
i18n.gettext('pg_checksums-' + pg_version_major.to_string())
|
19
src/bin/pg_config/meson.build
Normal file
19
src/bin/pg_config/meson.build
Normal file
@@ -0,0 +1,19 @@
|
||||
pg_config = executable('pg_config',
|
||||
['pg_config.c'],
|
||||
dependencies: [frontend_code],
|
||||
kwargs: default_bin_args,
|
||||
)
|
||||
bin_targets += pg_config
|
||||
|
||||
tests += {
|
||||
'name': 'pg_config',
|
||||
'sd': meson.current_source_dir(),
|
||||
'bd': meson.current_build_dir(),
|
||||
'tap': {
|
||||
'tests': [
|
||||
't/001_pg_config.pl',
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
subdir('po', if_found: libintl)
|
1
src/bin/pg_config/po/meson.build
Normal file
1
src/bin/pg_config/po/meson.build
Normal file
@@ -0,0 +1 @@
|
||||
i18n.gettext('pg_config-' + pg_version_major.to_string())
|
19
src/bin/pg_controldata/meson.build
Normal file
19
src/bin/pg_controldata/meson.build
Normal file
@@ -0,0 +1,19 @@
|
||||
pg_controldata = executable('pg_controldata',
|
||||
['pg_controldata.c'],
|
||||
dependencies: [frontend_code],
|
||||
kwargs: default_bin_args,
|
||||
)
|
||||
bin_targets += pg_controldata
|
||||
|
||||
tests += {
|
||||
'name': 'pg_controldata',
|
||||
'sd': meson.current_source_dir(),
|
||||
'bd': meson.current_build_dir(),
|
||||
'tap': {
|
||||
'tests': [
|
||||
't/001_pg_controldata.pl',
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
subdir('po', if_found: libintl)
|
1
src/bin/pg_controldata/po/meson.build
Normal file
1
src/bin/pg_controldata/po/meson.build
Normal file
@@ -0,0 +1 @@
|
||||
i18n.gettext('pg_controldata-' + pg_version_major.to_string())
|
22
src/bin/pg_ctl/meson.build
Normal file
22
src/bin/pg_ctl/meson.build
Normal file
@@ -0,0 +1,22 @@
|
||||
pg_ctl = executable('pg_ctl',
|
||||
['pg_ctl.c'],
|
||||
dependencies: [frontend_code, libpq],
|
||||
kwargs: default_bin_args,
|
||||
)
|
||||
bin_targets += pg_ctl
|
||||
|
||||
tests += {
|
||||
'name': 'pg_ctl',
|
||||
'sd': meson.current_source_dir(),
|
||||
'bd': meson.current_build_dir(),
|
||||
'tap': {
|
||||
'tests': [
|
||||
't/001_start_stop.pl',
|
||||
't/002_status.pl',
|
||||
't/003_promote.pl',
|
||||
't/004_logrotate.pl',
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
subdir('po', if_found: libintl)
|
1
src/bin/pg_ctl/po/meson.build
Normal file
1
src/bin/pg_ctl/po/meson.build
Normal file
@@ -0,0 +1 @@
|
||||
i18n.gettext('pg_ctl-' + pg_version_major.to_string())
|
75
src/bin/pg_dump/meson.build
Normal file
75
src/bin/pg_dump/meson.build
Normal file
@@ -0,0 +1,75 @@
|
||||
pg_dump_common_sources = files(
|
||||
'compress_io.c',
|
||||
'dumputils.c',
|
||||
'parallel.c',
|
||||
'pg_backup_archiver.c',
|
||||
'pg_backup_custom.c',
|
||||
'pg_backup_db.c',
|
||||
'pg_backup_directory.c',
|
||||
'pg_backup_null.c',
|
||||
'pg_backup_tar.c',
|
||||
'pg_backup_utils.c',
|
||||
)
|
||||
|
||||
pg_dump_common = static_library('libpgdump_common',
|
||||
pg_dump_common_sources,
|
||||
dependencies: [frontend_code, libpq, zlib],
|
||||
kwargs: internal_lib_args,
|
||||
)
|
||||
|
||||
|
||||
pg_dump_sources = files(
|
||||
'common.c',
|
||||
'pg_dump.c',
|
||||
'pg_dump_sort.c',
|
||||
)
|
||||
|
||||
pg_dump = executable('pg_dump',
|
||||
pg_dump_sources,
|
||||
link_with: [pg_dump_common],
|
||||
dependencies: [frontend_code, libpq, zlib],
|
||||
kwargs: default_bin_args,
|
||||
)
|
||||
bin_targets += pg_dump
|
||||
|
||||
|
||||
pg_dumpall_sources = files(
|
||||
'pg_dumpall.c',
|
||||
)
|
||||
|
||||
pg_dumpall = executable('pg_dumpall',
|
||||
pg_dumpall_sources,
|
||||
link_with: [pg_dump_common],
|
||||
dependencies: [frontend_code, libpq, zlib],
|
||||
kwargs: default_bin_args,
|
||||
)
|
||||
bin_targets += pg_dumpall
|
||||
|
||||
|
||||
pg_restore_sources = files(
|
||||
'pg_restore.c',
|
||||
)
|
||||
|
||||
pg_restore = executable('pg_restore',
|
||||
pg_restore_sources,
|
||||
link_with: [pg_dump_common],
|
||||
dependencies: [frontend_code, libpq, zlib],
|
||||
kwargs: default_bin_args,
|
||||
)
|
||||
bin_targets += pg_restore
|
||||
|
||||
tests += {
|
||||
'name': 'pg_dump',
|
||||
'sd': meson.current_source_dir(),
|
||||
'bd': meson.current_build_dir(),
|
||||
'tap': {
|
||||
'tests': [
|
||||
't/001_basic.pl',
|
||||
't/002_pg_dump.pl',
|
||||
't/003_pg_dump_with_server.pl',
|
||||
't/010_dump_connstr.pl',
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
subdir('po', if_found: libintl)
|
1
src/bin/pg_dump/po/meson.build
Normal file
1
src/bin/pg_dump/po/meson.build
Normal file
@@ -0,0 +1 @@
|
||||
i18n.gettext('pg_dump-' + pg_version_major.to_string())
|
20
src/bin/pg_resetwal/meson.build
Normal file
20
src/bin/pg_resetwal/meson.build
Normal file
@@ -0,0 +1,20 @@
|
||||
pg_resetwal = executable('pg_resetwal',
|
||||
files('pg_resetwal.c'),
|
||||
dependencies: [frontend_code],
|
||||
kwargs: default_bin_args,
|
||||
)
|
||||
bin_targets += pg_resetwal
|
||||
|
||||
tests += {
|
||||
'name': 'pg_resetwal',
|
||||
'sd': meson.current_source_dir(),
|
||||
'bd': meson.current_build_dir(),
|
||||
'tap': {
|
||||
'tests': [
|
||||
't/001_basic.pl',
|
||||
't/002_corrupted.pl',
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
subdir('po', if_found: libintl)
|
1
src/bin/pg_resetwal/po/meson.build
Normal file
1
src/bin/pg_resetwal/po/meson.build
Normal file
@@ -0,0 +1 @@
|
||||
i18n.gettext('pg_resetwal-' + pg_version_major.to_string())
|
42
src/bin/pg_rewind/meson.build
Normal file
42
src/bin/pg_rewind/meson.build
Normal file
@@ -0,0 +1,42 @@
|
||||
pg_rewind_sources = files(
|
||||
'datapagemap.c',
|
||||
'file_ops.c',
|
||||
'filemap.c',
|
||||
'libpq_source.c',
|
||||
'local_source.c',
|
||||
'parsexlog.c',
|
||||
'pg_rewind.c',
|
||||
'timeline.c',
|
||||
)
|
||||
|
||||
pg_rewind_sources += xlogreader_sources
|
||||
|
||||
pg_rewind = executable('pg_rewind',
|
||||
pg_rewind_sources,
|
||||
dependencies: [frontend_code, libpq, lz4, zstd],
|
||||
c_args: ['-DFRONTEND'], # needed for xlogreader et al
|
||||
kwargs: default_bin_args,
|
||||
)
|
||||
bin_targets += pg_rewind
|
||||
|
||||
|
||||
tests += {
|
||||
'name': 'pg_rewind',
|
||||
'sd': meson.current_source_dir(),
|
||||
'bd': meson.current_build_dir(),
|
||||
'tap': {
|
||||
'tests': [
|
||||
't/001_basic.pl',
|
||||
't/002_databases.pl',
|
||||
't/003_extrafiles.pl',
|
||||
't/004_pg_xlog_symlink.pl',
|
||||
't/005_same_timeline.pl',
|
||||
't/006_options.pl',
|
||||
't/007_standby_source.pl',
|
||||
't/008_min_recovery_point.pl',
|
||||
't/009_growing_files.pl',
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
subdir('po', if_found: libintl)
|
1
src/bin/pg_rewind/po/meson.build
Normal file
1
src/bin/pg_rewind/po/meson.build
Normal file
@@ -0,0 +1 @@
|
||||
i18n.gettext('pg_rewind-' + pg_version_major.to_string())
|
21
src/bin/pg_test_fsync/meson.build
Normal file
21
src/bin/pg_test_fsync/meson.build
Normal file
@@ -0,0 +1,21 @@
|
||||
test_fsync_sources = files('pg_test_fsync.c')
|
||||
|
||||
pg_test_fsync = executable('pg_test_fsync',
|
||||
test_fsync_sources,
|
||||
dependencies: [frontend_code],
|
||||
kwargs: default_bin_args,
|
||||
)
|
||||
bin_targets += pg_test_fsync
|
||||
|
||||
tests += {
|
||||
'name': 'pg_test_fsync',
|
||||
'sd': meson.current_source_dir(),
|
||||
'bd': meson.current_build_dir(),
|
||||
'tap': {
|
||||
'tests': [
|
||||
't/001_basic.pl',
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
subdir('po', if_found: libintl)
|
1
src/bin/pg_test_fsync/po/meson.build
Normal file
1
src/bin/pg_test_fsync/po/meson.build
Normal file
@@ -0,0 +1 @@
|
||||
i18n.gettext('pg_test_fsync-' + pg_version_major.to_string())
|
19
src/bin/pg_test_timing/meson.build
Normal file
19
src/bin/pg_test_timing/meson.build
Normal file
@@ -0,0 +1,19 @@
|
||||
pg_test_timing = executable('pg_test_timing',
|
||||
['pg_test_timing.c'],
|
||||
dependencies: [frontend_code],
|
||||
kwargs: default_bin_args,
|
||||
)
|
||||
bin_targets += pg_test_timing
|
||||
|
||||
tests += {
|
||||
'name': 'pg_test_timing',
|
||||
'sd': meson.current_source_dir(),
|
||||
'bd': meson.current_build_dir(),
|
||||
'tap': {
|
||||
'tests': [
|
||||
't/001_basic.pl',
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
subdir('po', if_found: libintl)
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user