PR 2108, PR 2109. Add --jobs and --always-clean.

Refactor the options handling in defaults.py to allow the --jobs
option have varing specific parameters. The option supports 'none',
'max' and 'half' or a fraction to divide the number of CPUs or
an integer value which is the number of jobs. The --no-smp has
been removed.

The host specific modules have been changed to set the number of
CPUs in the defaults table.

Fixed the --keep-going to clean up is --always-clean is provided
even if the build has an error.
This commit is contained in:
Chris Johns
2013-04-03 14:31:41 +11:00
parent e4cb1d01d6
commit 0add2eaa70
7 changed files with 231 additions and 213 deletions

View File

@@ -395,10 +395,7 @@ class build:
def files(self, package):
if self.create_tar_files:
self.script.append('echo "==> %files:"')
prefixbase = self.opts.prefixbase()
if prefixbase is None:
prefixbase = ''
inpath = path.join('%{buildroot}', prefixbase)
inpath = path.abspath(self.config.expand('%{buildroot}'))
tardir = path.abspath(self.config.expand('%{_tardir}'))
self.script.append(self.config.expand('if test -d %s; then' % (inpath)))
self.script.append(self.config.expand(' %%{__mkdir_p} %s' % tardir))
@@ -521,7 +518,7 @@ def run(args):
_notice(opts, 'RTEMS Source Builder, Package Builder v%s' % (version))
if not check.host_setup(opts, _defaults):
if not opts.force():
raise error.general('host build environment is not set up' +
raise error.general('host build environment is not set up' +
' correctly (use --force to proceed)')
_notice(opts, 'warning: forcing build with known host setup problems')
if opts.get_arg('--list-configs'):