1 # Copyright (c) 2022-2025, PostgreSQL Global Development Group
3 pg_dump_common_sources = files(
12 'pg_backup_archiver.c',
15 'pg_backup_directory.c',
21 pg_dump_common = static_library('libpgdump_common',
22 pg_dump_common_sources,
23 c_pch: pch_postgres_fe_h,
24 dependencies: [frontend_code, libpq, lz4, zlib, zstd],
25 kwargs: internal_lib_args,
29 pg_dump_sources = files(
35 if host_system == 'windows'
36 pg_dump_sources += rc_bin_gen.process(win32ver_rc, extra_args: [
38 '--FILEDESC', 'pg_dump - backup one PostgreSQL database',])
41 pg_dump = executable('pg_dump',
43 link_with: [pg_dump_common],
44 dependencies: [frontend_code, libpq, zlib],
45 kwargs: default_bin_args,
47 bin_targets += pg_dump
50 pg_dumpall_sources = files(
54 if host_system == 'windows'
55 pg_dumpall_sources += rc_bin_gen.process(win32ver_rc, extra_args: [
56 '--NAME', 'pg_dumpall',
57 '--FILEDESC', 'pg_dumpall - backup PostgreSQL databases'])
60 pg_dumpall = executable('pg_dumpall',
62 link_with: [pg_dump_common],
63 dependencies: [frontend_code, libpq, zlib],
64 kwargs: default_bin_args,
66 bin_targets += pg_dumpall
69 pg_restore_sources = files(
73 if host_system == 'windows'
74 pg_restore_sources += rc_bin_gen.process(win32ver_rc, extra_args: [
75 '--NAME', 'pg_restore',
76 '--FILEDESC', 'pg_restore - restore PostgreSQL databases'])
79 pg_restore = executable('pg_restore',
81 link_with: [pg_dump_common],
82 dependencies: [frontend_code, libpq, zlib],
83 kwargs: default_bin_args,
85 bin_targets += pg_restore
89 'sd': meson.current_source_dir(),
90 'bd': meson.current_build_dir(),
93 'GZIP_PROGRAM': gzip.found() ? gzip.path() : '',
94 'LZ4': program_lz4.found() ? program_lz4.path() : '',
95 'ZSTD': program_zstd.found() ? program_zstd.path() : '',
96 'with_icu': icu.found() ? 'yes' : 'no',
101 't/003_pg_dump_with_server.pl',
102 't/004_pg_dump_parallel.pl',
103 't/005_pg_dump_filterfile.pl',
104 't/010_dump_connstr.pl',
109 subdir('po', if_found: libintl)