summaryrefslogtreecommitdiff
path: root/src/pl/tcl/meson.build
blob: 7a708776c994540f02320efeaf256d646ce7b042 (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
56
57
58
59
60
61
62
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@']
)

if host_system == 'windows'
  pltcl_sources += rc_lib_gen.process(win32ver_rc, extra_args: [
    '--NAME', 'pltcl',
    '--FILEDESC', 'PL/Tcl - procedural language',])
endif

pltcl = shared_module('pltcl',
  pltcl_sources,
  c_pch: pch_postgres_h,
  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)