environment: Read VALAC from the environment and use it if set

The valac binary was hard coded in meson. We now check if VALAC is
defined in the environment, and if it is, use its value as the vala
compiler, if not, we proceed with the hard coded binary name.
pull/2167/head
Paulo Antonio Alvarez 8 years ago committed by Jussi Pakkanen
parent b663937f8c
commit bc30ad6dba
  1. 5
      mesonbuild/environment.py

@ -682,7 +682,10 @@ class Environment:
raise EnvironmentException('Unknown compiler "' + ' '.join(exelist) + '"')
def detect_vala_compiler(self):
exelist = ['valac']
if 'VALAC' in os.environ:
exelist = shlex.split(os.environ['VALAC'])
else:
exelist = ['valac']
try:
p, out = Popen_safe(exelist + ['--version'])[0:2]
except OSError:

Loading…
Cancel
Save