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.
pull/5159/head
Paolo Bonzini 6 years ago committed by Jussi Pakkanen
parent 6b9b118bf5
commit 826ddec4c6
  1. 9
      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():

Loading…
Cancel
Save