aboutsummaryrefslogtreecommitdiff
path: root/src/pl/tcl/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'src/pl/tcl/meson.build')
-rw-r--r--src/pl/tcl/meson.build55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/pl/tcl/meson.build b/src/pl/tcl/meson.build
new file mode 100644
index 00000000000..9b6addd7fd5
--- /dev/null
+++ b/src/pl/tcl/meson.build
@@ -0,0 +1,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)