build.py: Add support for option --ignore-deps

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2017-04-24 12:43:02 +00:00
commit e4af0b3874

View file

@ -130,6 +130,8 @@ parser.add_argument('--base', '-b', nargs='?', default=proj_base, help='Project
parser.add_argument('--exclude', default='', help='Space seperated ist of modules to be excluded from build')
parser.add_argument('--debug', '-d', action='store_true',
default=False, help='Output debug information to stderr')
parser.add_argument('--ignore-deps', '-I', action='store_true',
default=False, help='Don\'t build dependencies, i.e. build only modules specified on the command line')
parser.add_argument('target', default='all', help='Build target')
parser.add_argument('modules', nargs='+', default='', help='Modules to be built')
@ -151,7 +153,10 @@ if len(env_exclude):
if target != 'order':
print("calculating order for modules: " + ' '.join(modules))
order = []
calculate_order(order, modules, glob_prereq_type)
if args.ignore_deps:
order = args.modules
else:
calculate_order(order, modules, glob_prereq_type)
order = [m for m in order if m not in exclude]
if target == 'order':
print(' '.join(order))