aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-02-19 16:39:56 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-23 08:08:19 +0000
commitcf094ed2f616a581eb07d78db4366c83a441fde5 (patch)
tree10bc4f6eaf1b0d990dfaef9aa9f41865ba5b5c56 /scripts
parent5717e3b60731d2cb9394c13bff049a467c3aeec1 (diff)
downloadopenembedded-core-contrib-cf094ed2f616a581eb07d78db4366c83a441fde5.tar.gz
devtool: add/modify: add option to build in same directory
The default behaviour is to build in a separate directory to the source, however some projects can't be built this way, so add an option to do that (or override the automatic behaviour in the case of modify). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/devtool/standard.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index ae64840062..d503111d85 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -77,6 +77,8 @@ def add(args, config, basepath, workspace):
with open(appendfile, 'w') as f:
f.write('inherit externalsrc\n')
f.write('EXTERNALSRC = "%s"\n' % srctree)
+ if args.same_dir:
+ f.write('EXTERNALSRC_BUILD = "%s"\n' % srctree)
if initial_rev:
f.write('\n# initial_rev: %s\n' % initial_rev)
@@ -323,8 +325,11 @@ def modify(args, config, basepath, workspace):
f.write('inherit externalsrc\n')
f.write('# NOTE: We use pn- overrides here to avoid affecting multiple variants in the case where the recipe uses BBCLASSEXTEND\n')
f.write('EXTERNALSRC_pn-%s = "%s"\n' % (args.recipename, srctree))
- if bb.data.inherits_class('autotools-brokensep', rd):
- logger.info('using source tree as build directory since original recipe inherits autotools-brokensep')
+ if args.same_dir or bb.data.inherits_class('autotools-brokensep', rd):
+ if args.same_dir:
+ logger.info('using source tree as build directory since --same-dir specified')
+ else:
+ logger.info('using source tree as build directory since original recipe inherits autotools-brokensep')
f.write('EXTERNALSRC_BUILD_pn-%s = "%s"\n' % (args.recipename, srctree))
if initial_rev:
f.write('\n# initial_rev: %s\n' % initial_rev)
@@ -503,6 +508,7 @@ def register_commands(subparsers, context):
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser_add.add_argument('recipename', help='Name for new recipe to add')
parser_add.add_argument('srctree', help='Path to external source tree')
+ parser_add.add_argument('--same-dir', '-s', help='Build in same directory as source', action="store_true")
parser_add.add_argument('--version', '-V', help='Version to use within recipe (PV)')
parser_add.set_defaults(func=add)
@@ -513,6 +519,7 @@ def register_commands(subparsers, context):
parser_add.add_argument('srctree', help='Path to external source tree')
parser_add.add_argument('--wildcard', '-w', action="store_true", help='Use wildcard for unversioned bbappend')
parser_add.add_argument('--extract', '-x', action="store_true", help='Extract source as well')
+ parser_add.add_argument('--same-dir', '-s', help='Build in same directory as source', action="store_true")
parser_add.add_argument('--branch', '-b', default="devtool", help='Name for development branch to checkout (only when using -x)')
parser_add.set_defaults(func=modify)