[rtems-libbsd commit] waf: Check for no FreeBSD options being supplied.
Chris Johns
chrisj at rtems.org
Tue Apr 26 04:31:50 UTC 2016
Module: rtems-libbsd
Branch: master
Commit: 5d37f0ea660c6db37ac6fb670ba6b2c384107e4c
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=5d37f0ea660c6db37ac6fb670ba6b2c384107e4c
Author: Chris Johns <chrisj at rtems.org>
Date: Tue Apr 26 14:31:38 2016 +1000
waf: Check for no FreeBSD options being supplied.
---
libbsd_waf.py | 5 +++--
waf_generator.py | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/libbsd_waf.py b/libbsd_waf.py
index 689a72c..c99ef93 100644
--- a/libbsd_waf.py
+++ b/libbsd_waf.py
@@ -41,8 +41,9 @@ def build(bld):
# Defines
defines = []
- for o in bld.env.FREEBSD_OPTIONS.split(","):
- defines += ["%s=1" % (o.strip().upper())]
+ if len(bld.env.FREEBSD_OPTIONS) > 0:
+ for o in bld.env.FREEBSD_OPTIONS.split(","):
+ defines += ["%s=1" % (o.strip().upper())]
# Include paths
includes = []
diff --git a/waf_generator.py b/waf_generator.py
index 9d5939a..ed00e98 100755
--- a/waf_generator.py
+++ b/waf_generator.py
@@ -296,8 +296,9 @@ class ModuleManager(builder.ModuleManager):
self.add('')
self.add(' # Defines')
self.add(' defines = []')
- self.add(' for o in bld.env.FREEBSD_OPTIONS.split(","):')
- self.add(' defines += ["%s=1" % (o.strip().upper())]')
+ self.add(' if len(bld.env.FREEBSD_OPTIONS) > 0:')
+ self.add(' for o in bld.env.FREEBSD_OPTIONS.split(","):')
+ self.add(' defines += ["%s=1" % (o.strip().upper())]')
self.add('')
self.add(' # Include paths')
self.add(' includes = []')
More information about the vc
mailing list