diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 13:44:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 13:44:03 +0000 |
commit | 293913568e6a7a86fd1479e1cff8e2ecb58d6568 (patch) | |
tree | fc3b469a3ec5ab71b36ea97cc7aaddb838423a0c /src/tools/find_meson | |
parent | Initial commit. (diff) | |
download | postgresql-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/tools/find_meson')
-rwxr-xr-x | src/tools/find_meson | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/tools/find_meson b/src/tools/find_meson new file mode 100755 index 0000000..50e501a --- /dev/null +++ b/src/tools/find_meson @@ -0,0 +1,30 @@ +#!/usr/bin/env python3 +# +# Returns the path to the meson binary, for cases where we need to call it as +# part of the build, e.g. to install into tmp_install/ for the tests. + +import os +import shlex +import sys + +to_print = [] + +if 'MUON_PATH' in os.environ: + to_print += ['muon', os.environ['MUON_PATH']] +else: + mesonintrospect = os.environ['MESONINTROSPECT'] + components = shlex.split(mesonintrospect) + + if len(components) < 2: + print('expected more than two components, got: %s' % components) + sys.exit(1) + + if components[-1] != 'introspect': + print('expected introspection at the end') + sys.exit(1) + + to_print += ['meson'] + components[:-1] + +print('\n'.join(to_print), end='') + +sys.exit(0) |