diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2019-03-25 23:32:14 +0100 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-03-26 22:18:37 +0200 |
commit | 826ddec4c6c359c9143881d9e002c80e21f3262a (patch) | |
tree | efaf1a6001d73cd3ad98fea3da41c56a3715e61b /mesonbuild/environment.py | |
parent | 6b9b118bf598e264b93cccc4f8dd06c84885d8e2 (diff) | |
download | meson-826ddec4c6c359c9143881d9e002c80e21f3262a.zip meson-826ddec4c6c359c9143881d9e002c80e21f3262a.tar.gz meson-826ddec4c6c359c9143881d9e002c80e21f3262a.tar.bz2 |
improve log for ninja detection
Print "Found samurai-x.y" when samu is found instead of ninja,
and do not print "Found ninja-1.8-1.8" when NINJA points to
/usr/bin/ninja-1.8.
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r-- | mesonbuild/environment.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 4541ed4..deb6b7d 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -124,7 +124,14 @@ def detect_ninja(version='1.5', log=False): if p.returncode == 0 and mesonlib.version_compare(found, '>=' + version): n = shutil.which(n) if log: - mlog.log('Found ninja-{} at {}'.format(found, shlex.quote(n))) + name = os.path.basename(n) + if name.endswith('-' + found): + name = name[0:-1 - len(found)] + if name == 'ninja-build': + name = 'ninja' + if name == 'samu': + name = 'samurai' + mlog.log('Found {}-{} at {}'.format(name, found, shlex.quote(n))) return n def detect_native_windows_arch(): |