From e7a75df6531beec1c1b0d18fcaf2cfce7693920c Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Thu, 19 Sep 2019 09:04:02 +1000 Subject: rtems: Add a library check. --- rtems.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'rtems.py') 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)] -- cgit v1.2.3