summaryrefslogtreecommitdiffstats
path: root/src/include/utils/meson.build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 13:44:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 13:44:03 +0000
commit293913568e6a7a86fd1479e1cff8e2ecb58d6568 (patch)
treefc3b469a3ec5ab71b36ea97cc7aaddb838423a0c /src/include/utils/meson.build
parentInitial commit. (diff)
downloadpostgresql-16-293913568e6a7a86fd1479e1cff8e2ecb58d6568.tar.xz
postgresql-16-293913568e6a7a86fd1479e1cff8e2ecb58d6568.zip
Adding upstream version 16.2.upstream/16.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/include/utils/meson.build')
-rw-r--r--src/include/utils/meson.build60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/include/utils/meson.build b/src/include/utils/meson.build
new file mode 100644
index 0000000..c212c40
--- /dev/null
+++ b/src/include/utils/meson.build
@@ -0,0 +1,60 @@
+# Copyright (c) 2022-2023, PostgreSQL Global Development Group
+
+errcodes = custom_target('errcodes',
+ input: files('../../backend/utils/errcodes.txt'),
+ output: ['errcodes.h'],
+ command: [
+ perl, files('../../backend/utils/generate-errcodes.pl'),
+ '--outfile', '@OUTPUT@',
+ '@INPUT@',
+ ],
+ install: true,
+ install_dir: dir_include_server / 'utils',
+)
+generated_headers += errcodes
+
+if dtrace.found()
+ probes_tmp = custom_target('probes.h.tmp',
+ input: files('../../backend/utils/probes.d'),
+ output: 'probes.h.tmp',
+ command: [dtrace, '-C', '-h', '-s', '@INPUT@', '-o', '@OUTPUT@'],
+ )
+ probes = custom_target('probes.h',
+ input: probes_tmp,
+ output: 'probes.h',
+ capture: true,
+ command: [sed, '-f', files('../../backend/utils/postprocess_dtrace.sed'), '@INPUT@'],
+ install: true,
+ install_dir: dir_include_server / 'utils',
+ )
+else
+ probes = custom_target('probes.h',
+ input: files('../../backend/utils/probes.d'),
+ output: 'probes.h',
+ capture: true,
+ command: [sed, '-f', files('../../backend/utils/Gen_dummy_probes.sed'), '@INPUT@'],
+ install: true,
+ install_dir: dir_include_server / 'utils',
+ )
+endif
+
+generated_backend_headers += probes
+
+fmgrtab_output = ['fmgroids.h', 'fmgrprotos.h', 'fmgrtab.c']
+fmgrtab_target = custom_target('fmgrtab',
+ input: '../catalog/pg_proc.dat',
+ output : fmgrtab_output,
+ depend_files: catalog_pm,
+ command: [perl, '-I', '@SOURCE_ROOT@/src/backend/catalog/', files('../../backend/utils/Gen_fmgrtab.pl'), '--include-path=@SOURCE_ROOT@/src/include', '--output=@OUTDIR@', '@INPUT@'],
+ install: true,
+ install_dir: [dir_include_server / 'utils', dir_include_server / 'utils', false],
+)
+
+generated_backend_headers += fmgrtab_target[0]
+generated_backend_headers += fmgrtab_target[1]
+
+# autoconf generates the file there, ensure we get a conflict
+generated_sources_ac += {
+ 'src/backend/utils': fmgrtab_output + ['errcodes.h', 'probes.h', 'fmgr-stamp'],
+ 'src/include/utils': ['header-stamp'],
+}