diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2012-03-13 16:23:49 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2012-03-13 16:23:49 +0000 |
commit | 3db023190ac1798583a725022f834c90e82aed2f (patch) | |
tree | 63cff4102cb0336e5907b9e6c53853451bb70c9d /morph | |
parent | 42b2a27da193ecc409b811c530e1faf3f1e342c8 (diff) | |
download | morph-3db023190ac1798583a725022f834c90e82aed2f.tar.gz |
morph: add prefix and toolchain-target options
These options get passed on through the environment to be used
in chunk morphologies
Diffstat (limited to 'morph')
-rwxr-xr-x | morph | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -34,6 +34,8 @@ defaults = { ], 'cachedir': os.path.expanduser('~/.cache/morph'), 'max-jobs': morphlib.util.make_concurrency(), + 'prefix': '/usr', + 'toolchain-target': '%s-baserock-linux-gnu' % os.uname()[4], } @@ -52,6 +54,15 @@ class Morph(cliapp.Application): 'put build results in DIR', metavar='DIR', default=defaults['cachedir']) + self.settings.string(['prefix'], + 'set the install prefix of built chunks to PREFIX', + metavar='PREFIX', default=defaults['prefix']) + self.settings.string(['toolchain-target'], + 'set the TOOLCHAIN_TARGET variable which is used ' + 'in some chunks to determine which architecture ' + 'to build tools for', + metavar='TOOLCHAIN_TARGET', + default=defaults['toolchain-target']) self.settings.string(['tempdir'], 'temporary directory to use for builds ' '(this is separate from just setting $TMPDIR ' @@ -418,7 +429,8 @@ class Morph(cliapp.Application): else: env['PATH'] = '/sbin:/usr/sbin:/bin:/usr/bin' - env['TOOLCHAIN_TARGET'] = '%s-baserock-linux-gnu' % os.uname()[4] + env['TOOLCHAIN_TARGET'] = self.settings['toolchain-target'] + env['PREFIX'] = self.settings['prefix'] env['BOOTSTRAP'] = 'true' if self.settings['bootstrap'] else 'false' if tools is not None: env['BOOTSTRAP_TOOLS'] = tools |