mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
sb: Add --source-only-download to make download source simple.
This is needed to test #2536. Add an option to disable any log. Updates #2536.
This commit is contained in:
parent
6dc551cf47
commit
7b68249b57
@ -65,6 +65,7 @@ class command_line:
|
|||||||
'--url' : ('_url_base', 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),
|
'--no-download' : ('_disable_download', self._lo_bool, False, '0', True),
|
||||||
'--macros' : ('_macros', self._lo_string, True, None, False),
|
'--macros' : ('_macros', self._lo_string, True, None, False),
|
||||||
|
'--source-only-download' : ('_source_download', self._lo_bool, False, '0', True),
|
||||||
'--targetcflags' : ('_targetcflags', self._lo_string, True, None, False),
|
'--targetcflags' : ('_targetcflags', self._lo_string, True, None, False),
|
||||||
'--targetcxxflags' : ('_targetcxxflags', self._lo_string, True, None, False),
|
'--targetcxxflags' : ('_targetcxxflags', self._lo_string, True, None, False),
|
||||||
'--libstdcxxflags' : ('_libstdcxxflags', self._lo_string, True, None, False),
|
'--libstdcxxflags' : ('_libstdcxxflags', self._lo_string, True, None, False),
|
||||||
@ -222,6 +223,7 @@ class command_line:
|
|||||||
print('--targetcflags flags : List of C flags for the target code')
|
print('--targetcflags flags : List of C flags for the target code')
|
||||||
print('--targetcxxflags 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')
|
print('--libstdcxxflags flags : List of C++ flags to build the target libstdc++ code')
|
||||||
|
print('--source-only-download : Only download the source')
|
||||||
print('--with-<label> : Add the --with-<label> to the build')
|
print('--with-<label> : Add the --with-<label> to the build')
|
||||||
print('--without-<label> : Add the --without-<label> to the build')
|
print('--without-<label> : Add the --without-<label> to the build')
|
||||||
print('--rtems-tools path : Path to an install RTEMS tool set')
|
print('--rtems-tools path : Path to an install RTEMS tool set')
|
||||||
@ -265,8 +267,22 @@ class command_line:
|
|||||||
self.opts['params'].append(a)
|
self.opts['params'].append(a)
|
||||||
arg += 1
|
arg += 1
|
||||||
|
|
||||||
|
def pre_process(self):
|
||||||
|
arg = 0
|
||||||
|
while arg < len(self.args):
|
||||||
|
a = self.args[arg]
|
||||||
|
if a == '--source-only-download':
|
||||||
|
self.args += ['--dry-run',
|
||||||
|
'--quiet',
|
||||||
|
'--without-log',
|
||||||
|
'--without-error-report',
|
||||||
|
'--without-release-url']
|
||||||
|
arg += 1
|
||||||
|
|
||||||
def post_process(self, logfile = True):
|
def post_process(self, logfile = True):
|
||||||
# Handle the log first.
|
# Handle the log first.
|
||||||
|
logctrl = self.get_arg('--without-log')
|
||||||
|
if logctrl is not None and logfile:
|
||||||
if logfile:
|
if logfile:
|
||||||
logfiles = self.logfiles()
|
logfiles = self.logfiles()
|
||||||
else:
|
else:
|
||||||
@ -641,6 +657,7 @@ def load(args, optargs = None, defaults = '%{_sbdir}/defaults.mc', logfile = Tru
|
|||||||
o.sb_released()
|
o.sb_released()
|
||||||
o.sb_git()
|
o.sb_git()
|
||||||
o.rtems_options()
|
o.rtems_options()
|
||||||
|
o.pre_process()
|
||||||
o.process()
|
o.process()
|
||||||
o.post_process(logfile)
|
o.post_process(logfile)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user