mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
sb: Tighten the canadian cross compile detection.
A canadian cross compile needs the build, host and target being different. Clean up the error handling.
This commit is contained in:
@@ -113,16 +113,27 @@ class build:
|
|||||||
ereport.generate('rsb-report-%s.txt' % self.macros['name'], self.opts, header)
|
ereport.generate('rsb-report-%s.txt' % self.macros['name'], self.opts, header)
|
||||||
|
|
||||||
def __init__(self, name, create_tar_files, opts, macros = None):
|
def __init__(self, name, create_tar_files, opts, macros = None):
|
||||||
self.opts = opts
|
try:
|
||||||
if macros is None:
|
self.opts = opts
|
||||||
self.macros = opts.defaults
|
if macros is None:
|
||||||
else:
|
self.macros = opts.defaults
|
||||||
self.macros = macros
|
else:
|
||||||
self.create_tar_files = create_tar_files
|
self.macros = macros
|
||||||
log.notice('config: ' + name)
|
self.create_tar_files = create_tar_files
|
||||||
self.config = config.file(name, opts, self.macros)
|
log.notice('config: ' + name)
|
||||||
self.script = script()
|
self.config = config.file(name, opts, self.macros)
|
||||||
self.macros['buildname'] = self._name_(self.macros['name'])
|
self.script = script()
|
||||||
|
self.macros['buildname'] = self._name_(self.macros['name'])
|
||||||
|
except error.general, gerr:
|
||||||
|
log.notice(str(gerr))
|
||||||
|
log.stderr('Build FAILED')
|
||||||
|
raise
|
||||||
|
except error.internal, ierr:
|
||||||
|
log.notice(str(ierr))
|
||||||
|
log.stderr('Internal Build FAILED')
|
||||||
|
raise
|
||||||
|
except:
|
||||||
|
raise
|
||||||
|
|
||||||
def rmdir(self, rmpath):
|
def rmdir(self, rmpath):
|
||||||
log.output('removing: %s' % (path.host(rmpath)))
|
log.output('removing: %s' % (path.host(rmpath)))
|
||||||
@@ -140,6 +151,7 @@ class build:
|
|||||||
_build = self.config.expand('%{_build}')
|
_build = self.config.expand('%{_build}')
|
||||||
_target = self.config.expand('%{_target}')
|
_target = self.config.expand('%{_target}')
|
||||||
return self.config.defined('%{allow_cxc}') and \
|
return self.config.defined('%{allow_cxc}') and \
|
||||||
|
len(_host) and len(_build) and (_target) and \
|
||||||
_host != _build and _host != _target
|
_host != _build and _host != _target
|
||||||
|
|
||||||
def source(self, name):
|
def source(self, name):
|
||||||
|
Reference in New Issue
Block a user