Debian Codegraph @

src/bin/scripts/meson.build

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