aboutsummaryrefslogtreecommitdiff
path: root/src/pl/tcl/meson.build
blob: 9b6addd7fd5c1bd2facbb20aba958ff7e6f41e97 (plain)
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
if not tcl_dep.found()
  subdir_done()
endif

pltcl_sources = files(
  'pltcl.c',
)

gen_pltclerrcodes = files('generate-pltclerrcodes.pl')
pltcl_sources += custom_target('pltclerrcodes.h',
  input: files('../../backend/utils/errcodes.txt'),
  output: 'pltclerrcodes.h',
  capture: true,
  command: [perl, gen_pltclerrcodes, '@INPUT@']
)

pltcl = shared_module('pltcl',
  pltcl_sources,
  include_directories: [include_directories('.'), postgres_inc],
  kwargs: pg_mod_args + {
    'dependencies': [tcl_dep, pg_mod_args['dependencies']],
  },
)
pl_targets += pltcl

install_data(
  'pltcl.control',
  'pltcl--1.0.sql',
  'pltclu.control',
  'pltclu--1.0.sql',
  install_dir: dir_data_extension,
)

pltcl_regress = [
  'pltcl_setup',
  'pltcl_queries',
  'pltcl_trigger',
  'pltcl_call',
  'pltcl_start_proc',
  'pltcl_subxact',
  'pltcl_unicode',
  'pltcl_transaction',
]

tests += {
  'name': 'pltcl',
  'sd': meson.current_source_dir(),
  'bd': meson.current_build_dir(),
  'regress': {
    'sql': pltcl_regress,
    'regress_args': ['--load-extension=pltcl'],
  },
}

subdir('po', if_found: libintl)