summaryrefslogtreecommitdiffstats
path: root/source-builder
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2013-05-15 13:23:41 +1000
committerChris Johns <chrisj@rtems.org>2013-05-15 13:23:41 +1000
commit1b40c77e7b9ed7d87ec555abe0a0f4691841a2f8 (patch)
tree91a7e76a11a34fce419297a7c415c76e273b5073 /source-builder
parentMoxie GDB patch has been merged upstream. (diff)
downloadrtems-source-builder-1b40c77e7b9ed7d87ec555abe0a0f4691841a2f8.tar.bz2
Make outputing errors optional.
Diffstat (limited to 'source-builder')
-rw-r--r--source-builder/sb/check.py20
1 files changed, 12 insertions, 8 deletions
diff --git a/source-builder/sb/check.py b/source-builder/sb/check.py
index f28f791..0678378 100644
--- a/source-builder/sb/check.py
+++ b/source-builder/sb/check.py
@@ -38,17 +38,18 @@ def _check_triplet(_opts, macro, value, constraint):
return True
-def _check_dir(_opts, macro, value, constraint):
+def _check_dir(_opts, macro, value, constraint, silent = False):
if constraint != 'none' and not path.isdir(value):
if constraint == 'required':
- log.notice('error: dir: not found: (%s) %s' % (macro, value))
+ if not silent:
+ log.notice('error: dir: not found: (%s) %s' % (macro, value))
return False
- if _opts.warn_all():
+ if not silent and _opts.warn_all():
log.notice('warning: dir: not found: (%s) %s' % (macro, value))
return True
-def _check_exe(_opts, macro, value, constraint):
+def _check_exe(_opts, macro, value, constraint, silent = False):
if len(value) == 0 or constraint == 'none':
return True
@@ -70,14 +71,17 @@ def _check_exe(_opts, macro, value, constraint):
if _check_paths(value, paths):
if absexe:
- log.notice('warning: exe: absolute exe found in path: (%s) %s' % (macro, orig_value))
+ if not silent:
+ log.notice('warning: exe: absolute exe found in path: (%s) %s' % (macro, orig_value))
return True
if constraint == 'optional':
- log.trace('warning: exe: optional exe not found: (%s) %s' % (macro, orig_value))
+ if not silent:
+ log.trace('warning: exe: optional exe not found: (%s) %s' % (macro, orig_value))
return True
- log.notice('error: exe: not found: (%s) %s' % (macro, orig_value))
+ if not silent:
+ log.notice('error: exe: not found: (%s) %s' % (macro, orig_value))
return False
@@ -127,7 +131,7 @@ def host_setup(opts):
def check_exe(label, exe):
- return _check_exe(None, label, exe, None)
+ return _check_exe(None, label, exe, None, True)
def run():