summaryrefslogtreecommitdiffstats
path: root/source-builder/sb/options.py
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2013-04-15 09:18:31 +1000
committerChris Johns <chrisj@rtems.org>2013-04-15 09:48:42 +1000
commit5e02e80d5a66780bb75a92786f0b51834450e6ac (patch)
tree51110cd46918d5e0d13d9989413b0f04bc371c23 /source-builder/sb/options.py
parentSwitch to the regenerated gcc-4.7.3 patch. (diff)
downloadrtems-source-builder-5e02e80d5a66780bb75a92786f0b51834450e6ac.tar.bz2
Add --no-download to disable the downloader.
Diffstat (limited to 'source-builder/sb/options.py')
-rw-r--r--source-builder/sb/options.py57
1 files changed, 31 insertions, 26 deletions
diff --git a/source-builder/sb/options.py b/source-builder/sb/options.py
index 220b836..78a6e4c 100644
--- a/source-builder/sb/options.py
+++ b/source-builder/sb/options.py
@@ -41,32 +41,33 @@ class command_line:
def __init__(self, argv, optargs, _defaults, command_path):
self._long_opts = {
- # key macro handler param defs init
- '--prefix' : ('_prefix', self._lo_path, True, None, False),
- '--topdir' : ('_topdir', self._lo_path, True, None, False),
- '--configdir' : ('_configdir', self._lo_path, True, None, False),
- '--builddir' : ('_builddir', self._lo_path, True, None, False),
- '--sourcedir' : ('_sourcedir', self._lo_path, True, None, False),
- '--tmppath' : ('_tmppath', self._lo_path, True, None, False),
- '--jobs' : ('_jobs', self._lo_jobs, True, 'max', True),
- '--log' : ('_logfile', self._lo_string, True, None, False),
- '--url' : ('_url_base', self._lo_string, True, None, False),
- '--macros' : ('_macros', self._lo_string, True, None, False),
- '--targetcflags' : ('_targetcflags', self._lo_string, True, None, False),
- '--targetcxxflags' : ('_targetcxxflags', self._lo_string, True, None, False),
- '--libstdcxxflags' : ('_libstdcxxflags', self._lo_string, True, None, False),
- '--force' : ('_force', self._lo_bool, False, '0', True),
- '--quiet' : ('_quiet', self._lo_bool, False, '0', True),
- '--trace' : ('_trace', self._lo_bool, False, '0', True),
- '--dry-run' : ('_dry_run', self._lo_bool, False, '0', True),
- '--warn-all' : ('_warn_all', self._lo_bool, False, '0', True),
- '--no-clean' : ('_no_clean', self._lo_bool, False, '0', True),
- '--keep-going' : ('_keep_going', self._lo_bool, False, '0', True),
- '--always-clean' : ('_always_clean', self._lo_bool, False, '0', True),
- '--host' : ('_host', self._lo_triplets, True, None, False),
- '--build' : ('_build', self._lo_triplets, True, None, False),
- '--target' : ('_target', self._lo_triplets, True, None, False),
- '--help' : (None, self._lo_help, False, None, False)
+ # key macro handler param defs init
+ '--prefix' : ('_prefix', self._lo_path, True, None, False),
+ '--topdir' : ('_topdir', self._lo_path, True, None, False),
+ '--configdir' : ('_configdir', self._lo_path, True, None, False),
+ '--builddir' : ('_builddir', self._lo_path, True, None, False),
+ '--sourcedir' : ('_sourcedir', self._lo_path, True, None, False),
+ '--tmppath' : ('_tmppath', self._lo_path, True, None, False),
+ '--jobs' : ('_jobs', self._lo_jobs, True, 'max', True),
+ '--log' : ('_logfile', self._lo_string, True, None, False),
+ '--url' : ('_url_base', self._lo_string, True, None, False),
+ '--no-download' : ('_disable_download', self._lo_bool, False, '0', True),
+ '--macros' : ('_macros', self._lo_string, True, None, False),
+ '--targetcflags' : ('_targetcflags', self._lo_string, True, None, False),
+ '--targetcxxflags' : ('_targetcxxflags', self._lo_string, True, None, False),
+ '--libstdcxxflags' : ('_libstdcxxflags', self._lo_string, True, None, False),
+ '--force' : ('_force', self._lo_bool, False, '0', True),
+ '--quiet' : ('_quiet', self._lo_bool, False, '0', True),
+ '--trace' : ('_trace', self._lo_bool, False, '0', True),
+ '--dry-run' : ('_dry_run', self._lo_bool, False, '0', True),
+ '--warn-all' : ('_warn_all', self._lo_bool, False, '0', True),
+ '--no-clean' : ('_no_clean', self._lo_bool, False, '0', True),
+ '--keep-going' : ('_keep_going', self._lo_bool, False, '0', True),
+ '--always-clean' : ('_always_clean', self._lo_bool, False, '0', True),
+ '--host' : ('_host', self._lo_triplets, True, None, False),
+ '--build' : ('_build', self._lo_triplets, True, None, False),
+ '--target' : ('_target', self._lo_triplets, True, None, False),
+ '--help' : (None, self._lo_help, False, None, False)
}
self.command_path = command_path
@@ -200,6 +201,7 @@ class command_line:
print '--macros file[,[file] : Macro format files to load after the defaults'
print '--log file : Log file where all build out is written too'
print '--url url[,url] : URL to look for source'
+ print '--no-download : Disable the source downloader'
print '--targetcflags flags : List of C flags for the target code'
print '--targetcxxflags flags : List of C++ flags for the target code'
print '--libstdcxxflags flags : List of C++ flags to build the target libstdc++ code'
@@ -390,6 +392,9 @@ class command_line:
return self.opts['url'].split(',')
return None
+ def download_disabled(self):
+ return self.opts['no-download'] != '0'
+
def load(args, optargs = None, defaults = '%{_sbdir}/defaults.mc'):
"""
Copy the defaults, get the host specific values and merge them overriding