summaryrefslogtreecommitdiffstats
path: root/source-builder/sb/options.py
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2016-03-17 16:39:57 +1100
committerChris Johns <chrisj@rtems.org>2016-03-17 16:50:05 +1100
commit38ed59a301c5f3e03ce83133dadddad695e415fb (patch)
tree7a98f614122fd8658ca1557a06350c8fd0222a12 /source-builder/sb/options.py
parentsb: Change urlib to urllib2 on Python2 and add user agent support. (diff)
downloadrtems-source-builder-38ed59a301c5f3e03ce83133dadddad695e415fb.tar.bz2
sb: Support --dry-run --with-download for 3rd party RTEMS BSP packages.
The building of 3rd party packages for an RTEMS BSP requires a valid BSP so the standard method to download the source for releasing does not work. This change adds support to allow this. The RTEMS BSP support will not generate an error is no BSP or tools are provided or found. The change addis logic operators to the %if statement so you can '||' to 'or' and '&&' to 'and' logic expressions. A new %log directive has been added to clean up the messages. A new %{!define ...} has been added to aid checking within logic expressions. All command line --with/--without now appear as macros. Add version.version to get just the RTEMS major and minor version. Some pkg-config issues have been resolved. Closes #2655.
Diffstat (limited to 'source-builder/sb/options.py')
-rw-r--r--source-builder/sb/options.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/source-builder/sb/options.py b/source-builder/sb/options.py
index ba1eff0..7791329 100644
--- a/source-builder/sb/options.py
+++ b/source-builder/sb/options.py
@@ -254,6 +254,13 @@ class command_line:
else:
value = '='.join(los[1:])
long_opt[1](lo, long_opt[0], value)
+ else:
+ if a.startswith('--with'):
+ if len(los) != 1:
+ value = los[1]
+ else:
+ value = '1'
+ self.defaults[los[0][2:].replace('-', '_').lower()] = ('none', 'none', value)
else:
self.opts['params'].append(a)
arg += 1
@@ -548,7 +555,7 @@ class command_line:
raise error.general('invalid --rtems-bsp option')
rtems_version = self.parse_args('--rtems-version')
if rtems_version is None:
- rtems_version = '%d.%d' % (version.major, version.minor)
+ rtems_version = version.version()
else:
rtems_version = rtems_version[1]
self.args.append('--target=%s-rtems%s' % (ab[0], rtems_version))