[rtems_waf commit] rtems: Allow checking multiple environment variable
Chris Johns
chrisj at rtems.org
Wed Mar 18 04:52:34 UTC 2020
Module: rtems_waf
Branch: master
Commit: ad08908c452c6a9bbb3bf7bbbcc9fc03fe46cc7f
Changeset: http://git.rtems.org/rtems_waf/commit/?id=ad08908c452c6a9bbb3bf7bbbcc9fc03fe46cc7f
Author: Vijay Kumar Banerjee <vijaykumar9597 at gmail.com>
Date: Tue Mar 17 15:40:42 2020 +0530
rtems: Allow checking multiple environment variable
---
rtems.py | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/rtems.py b/rtems.py
index 6dd71b1..ceabcd9 100644
--- a/rtems.py
+++ b/rtems.py
@@ -479,10 +479,11 @@ def check_options(ctx, prefix, rtems_tools, rtems_path, rtems_version, rtems_arc
return rtems_version, rtems_path, tools, archs, arch_bsps
-def check_env(ctx, var):
- if var in ctx.env and len(ctx.env[var]) != 0:
- return True
- return False
+def check_env(ctx, *env_vars):
+ for v in env_vars:
+ if v not in ctx.env or len(ctx.env[v]) == 0:
+ return False
+ return True
def check(ctx, option, setting = 'Yes'):
if option in ctx.env:
More information about the vc
mailing list