aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Antonio Alvarez <pauloaalvarez@gmail.com>2017-05-24 22:50:58 -0300
committerJussi Pakkanen <jpakkane@gmail.com>2017-08-09 21:47:19 +0300
commitbc30ad6dbada192ae4ab0665c0c43781c7957ec7 (patch)
tree41975facd73c85ae3dcbd5e1105d42eb5ed0afb4
parentb663937f8ca7449c8c62d1ef1e8dc8149ed9ad44 (diff)
downloadmeson-bc30ad6dbada192ae4ab0665c0c43781c7957ec7.zip
meson-bc30ad6dbada192ae4ab0665c0c43781c7957ec7.tar.gz
meson-bc30ad6dbada192ae4ab0665c0c43781c7957ec7.tar.bz2
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.
-rw-r--r--mesonbuild/environment.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index 85473b1..a63c89f 100644
--- a/mesonbuild/environment.py
+++ b/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: