mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
projects.py: Add support for --build-order
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
f7db38275f
commit
83631eafc5
1 changed files with 4 additions and 2 deletions
|
|
@ -200,6 +200,8 @@ class Build(object):
|
||||||
default=False, help='Output debug information to stderr')
|
default=False, help='Output debug information to stderr')
|
||||||
parser.add_argument('--dry-run', '-n', action='store_true',
|
parser.add_argument('--dry-run', '-n', action='store_true',
|
||||||
default=False, help='Don\'t build anything, just print what would be done.')
|
default=False, help='Don\'t build anything, just print what would be done.')
|
||||||
|
parser.add_argument('--build-order', '-O', action='store_true',
|
||||||
|
default=False, help='Don\'t build anything, just print the build order.')
|
||||||
parser.add_argument('--ignore-deps', '-I', action='store_true',
|
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')
|
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('target', default='all', help='Build target')
|
||||||
|
|
@ -221,7 +223,7 @@ class Build(object):
|
||||||
exclude += " " + env_exclude
|
exclude += " " + env_exclude
|
||||||
|
|
||||||
# -- build
|
# -- build
|
||||||
if target != 'order':
|
if target != 'order' and not args.build_order:
|
||||||
print("calculating order for modules ... ")
|
print("calculating order for modules ... ")
|
||||||
order = []
|
order = []
|
||||||
|
|
||||||
|
|
@ -234,7 +236,7 @@ class Build(object):
|
||||||
if args.ignore_deps:
|
if args.ignore_deps:
|
||||||
order = [m for m in order if m in args.modules]
|
order = [m for m in order if m in args.modules]
|
||||||
order = [m for m in order if m not in exclude]
|
order = [m for m in order if m not in exclude]
|
||||||
if target == 'order':
|
if target == 'order' or args.build_order:
|
||||||
print(' '.join(order))
|
print(' '.join(order))
|
||||||
exit(0)
|
exit(0)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue