1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
| # Copyright (c) 2022-2026, PostgreSQL Global Development Group
|
| scripts_common = static_library('libscripts_common',
| files('common.c'),
| dependencies: [frontend_code, libpq],
| kwargs: internal_lib_args,
| )
|
| binaries = [
| 'createdb',
| 'dropdb',
| 'createuser',
| 'dropuser',
| 'clusterdb',
| 'reindexdb',
| 'pg_isready',
| ]
|
| foreach binary : binaries
| binary_sources = files('@0@.c'.format(binary))
|
| if host_system == 'windows'
| binary_sources += rc_bin_gen.process(win32ver_rc, extra_args: [
| '--NAME', binary,
| '--FILEDESC', '@0@ - PostgreSQL utility'.format(binary),])
| endif
|
| binary = executable(binary,
| binary_sources,
| link_with: [scripts_common],
| dependencies: [frontend_code, libpq],
| kwargs: default_bin_args,
| )
| bin_targets += binary
| endforeach
|
| vacuuming_common = static_library('libvacuuming_common',
| files('common.c', 'vacuuming.c'),
| dependencies: [frontend_code, libpq],
| kwargs: internal_lib_args,
| )
|
| binaries = [
| 'vacuumdb',
| ]
| foreach binary : binaries
| binary_sources = files('@0@.c'.format(binary))
|
| if host_system == 'windows'
| binary_sources += rc_bin_gen.process(win32ver_rc, extra_args: [
| '--NAME', binary,
| '--FILEDESC', '@0@ - PostgreSQL utility'.format(binary),])
| endif
|
| binary = executable(binary,
| binary_sources,
| link_with: [vacuuming_common],
| dependencies: [frontend_code, libpq],
| kwargs: default_bin_args,
| )
| bin_targets += binary
| endforeach
|
| tests += {
| 'name': 'scripts',
| 'sd': meson.current_source_dir(),
| 'bd': meson.current_build_dir(),
| 'tap': {
| 'env': {'with_icu': icu.found() ? 'yes' : 'no'},
| 'tests': [
| 't/010_clusterdb.pl',
| 't/011_clusterdb_all.pl',
| 't/020_createdb.pl',
| 't/040_createuser.pl',
| 't/050_dropdb.pl',
| 't/070_dropuser.pl',
| 't/080_pg_isready.pl',
| 't/090_reindexdb.pl',
| 't/091_reindexdb_all.pl',
| 't/100_vacuumdb.pl',
| 't/101_vacuumdb_all.pl',
| 't/102_vacuumdb_stages.pl',
| 't/200_connstr.pl',
| ],
| },
| }
|
| subdir('po', if_found: libintl)
|
|