summaryrefslogtreecommitdiffstats
path: root/rtems.py
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2019-09-19 09:04:02 +1000
committerChris Johns <chrisj@rtems.org>2019-09-19 09:04:02 +1000
commite7a75df6531beec1c1b0d18fcaf2cfce7693920c (patch)
treefca760af1981c21fa267f7834d22000d0e5aea0f /rtems.py
parentrtems.py: Fix typo (diff)
downloadrtems_waf-e7a75df6531beec1c1b0d18fcaf2cfce7693920c.tar.bz2
rtems: Add a library check.
Diffstat (limited to 'rtems.py')
-rw-r--r--rtems.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/rtems.py b/rtems.py
index af4b5fd..ffb386f 100644
--- a/rtems.py
+++ b/rtems.py
@@ -343,6 +343,14 @@ def check_lib_path(ctx, lib, libpath = [], mandatory = True):
ctx.env['LIBPATH_lib%s' % (lib)] = '..' + '/..' * (ctx.path.height() - 1) + out
ctx.end_msg('found')
+def check_lib(ctx, libs):
+ if not isinstance(libs, list):
+ lib = [libs]
+ for lib in libs:
+ if 'LIBPATH_lib%s' % (lib) not in ctx.env:
+ return False
+ return True
+
def check_cpuopt(conf, opt):
code = ['#ifndef %s' % (opt)]
code += [' #error %s is not defined' % (opt)]