diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 13:44:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 13:44:03 +0000 |
commit | 293913568e6a7a86fd1479e1cff8e2ecb58d6568 (patch) | |
tree | fc3b469a3ec5ab71b36ea97cc7aaddb838423a0c /src/bin/pg_dump/meson.build | |
parent | Initial commit. (diff) | |
download | postgresql-16-293913568e6a7a86fd1479e1cff8e2ecb58d6568.tar.xz postgresql-16-293913568e6a7a86fd1479e1cff8e2ecb58d6568.zip |
Adding upstream version 16.2.upstream/16.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/bin/pg_dump/meson.build')
-rw-r--r-- | src/bin/pg_dump/meson.build | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/src/bin/pg_dump/meson.build b/src/bin/pg_dump/meson.build new file mode 100644 index 0000000..9d59a10 --- /dev/null +++ b/src/bin/pg_dump/meson.build @@ -0,0 +1,107 @@ +# Copyright (c) 2022-2023, PostgreSQL Global Development Group + +pg_dump_common_sources = files( + 'compress_gzip.c', + 'compress_io.c', + 'compress_lz4.c', + 'compress_none.c', + 'compress_zstd.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, + c_pch: pch_postgres_fe_h, + dependencies: [frontend_code, libpq, lz4, zlib, zstd], + kwargs: internal_lib_args, +) + + +pg_dump_sources = files( + 'common.c', + 'pg_dump.c', + 'pg_dump_sort.c', +) + +if host_system == 'windows' + pg_dump_sources += rc_bin_gen.process(win32ver_rc, extra_args: [ + '--NAME', 'pg_dump', + '--FILEDESC', 'pg_dump - backup one PostgreSQL database',]) +endif + +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', +) + +if host_system == 'windows' + pg_dumpall_sources += rc_bin_gen.process(win32ver_rc, extra_args: [ + '--NAME', 'pg_dumpall', + '--FILEDESC', 'pg_dumpall - backup PostgreSQL databases']) +endif + +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', +) + +if host_system == 'windows' + pg_restore_sources += rc_bin_gen.process(win32ver_rc, extra_args: [ + '--NAME', 'pg_restore', + '--FILEDESC', 'pg_restore - restore PostgreSQL databases']) +endif + +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': { + 'env': { + 'GZIP_PROGRAM': gzip.path(), + 'LZ4': program_lz4.found() ? program_lz4.path() : '', + 'ZSTD': program_zstd.found() ? program_zstd.path() : '', + 'with_icu': icu.found() ? 'yes' : 'no', + }, + 'tests': [ + 't/001_basic.pl', + 't/002_pg_dump.pl', + 't/003_pg_dump_with_server.pl', + 't/004_pg_dump_parallel.pl', + 't/010_dump_connstr.pl', + ], + }, +} + +subdir('po', if_found: libintl) |