The Meson Build System
http://mesonbuild.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
568 B
29 lines
568 B
8 years ago
|
#!/usr/bin/env python3
|
||
|
|
||
|
import os
|
||
|
import sys
|
||
7 years ago
|
import shlex
|
||
8 years ago
|
|
||
|
do_print = False
|
||
|
|
||
|
if len(sys.argv) > 1:
|
||
|
do_print = bool(sys.argv[1])
|
||
|
|
||
|
if 'MESONINTROSPECT' not in os.environ:
|
||
|
raise RuntimeError('MESONINTROSPECT not found')
|
||
|
|
||
|
mesonintrospect = os.environ['MESONINTROSPECT']
|
||
|
|
||
7 years ago
|
introspect_arr = shlex.split(mesonintrospect)
|
||
|
|
||
7 years ago
|
# print(mesonintrospect)
|
||
|
# print(introspect_arr)
|
||
7 years ago
|
|
||
|
some_executable = introspect_arr[0]
|
||
|
|
||
|
if not os.path.isfile(some_executable):
|
||
8 years ago
|
raise RuntimeError('{!r} does not exist'.format(mesonintrospect))
|
||
|
|
||
|
if do_print:
|
||
7 years ago
|
print(some_executable, end='')
|