diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2014-03-08 19:18:53 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2014-03-08 19:18:53 +0200 |
commit | 43a370cee935ea73dcba99375592d372c293842b (patch) | |
tree | ee7c9f43e024158cd45c71358d53e99fc8e10304 /dependencies.py | |
parent | 8a0a982073516b9b1dc4ba64236c52fd47129e8e (diff) | |
download | meson-43a370cee935ea73dcba99375592d372c293842b.zip meson-43a370cee935ea73dcba99375592d372c293842b.tar.gz meson-43a370cee935ea73dcba99375592d372c293842b.tar.bz2 |
Some logging improvements.
Diffstat (limited to 'dependencies.py')
-rw-r--r-- | dependencies.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/dependencies.py b/dependencies.py index b26972b..f8f9d10 100644 --- a/dependencies.py +++ b/dependencies.py @@ -88,7 +88,7 @@ class PkgConfigDependency(Dependency): self.cflags = [] self.libs = [] else: - mlog.log('Dependency', name, 'found:', mlog.green('YES')) + mlog.log('Dependency', mlog.bold(name), 'found:', mlog.green('YES')) self.is_found = True self.modversion = out.decode().strip() p = subprocess.Popen(['pkg-config', '--cflags', name], stdout=subprocess.PIPE, @@ -135,9 +135,9 @@ class ExternalProgram(): self.fullpath = shutil.which(name) if not silent: if self.found(): - mlog.log('Program', name, 'found:', mlog.green('YES'), '(%s)' % self.fullpath) + mlog.log('Program', mlog.bold(name), 'found:', mlog.green('YES'), '(%s)' % self.fullpath) else: - mlog.log('Program', name, 'found:,', mlog.red('NO')) + mlog.log('Program', mlog.bold(name), 'found:,', mlog.red('NO')) def found(self): return self.fullpath is not None @@ -149,10 +149,15 @@ class ExternalProgram(): return self.name class ExternalLibrary(Dependency): - def __init__(self, name, fullpath=None): + def __init__(self, name, fullpath=None, silent=False): super().__init__() self.name = name self.fullpath = fullpath + if not silent: + if self.found(): + mlog.log('Library', mlog.bold(name), 'found:', mlog.green('YES'), '(%s)' % self.fullpath) + else: + mlog.log('Library', mlog.bold(name), 'found:,', mlog.red('NO')) def found(self): return self.fullpath is not None |