diff options
author | Simon Glass <sjg@chromium.org> | 2023-07-05 13:18:42 +0100 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2023-07-12 09:48:15 -0600 |
commit | 127a4b3ab0454e91aa3b6729620c0c01096681a2 (patch) | |
tree | 9cbd63e6ecfddb6539e8c2eed71609d11f76be1f | |
parent | b78dd9171a852d0e74f3fb3f0b6562bd06fadb12 (diff) | |
download | u-boot-127a4b3ab0454e91aa3b6729620c0c01096681a2.zip u-boot-127a4b3ab0454e91aa3b6729620c0c01096681a2.tar.gz u-boot-127a4b3ab0454e91aa3b6729620c0c01096681a2.tar.bz2 |
buildman: Set up output_dir earlier
Set up output_dir at the start of the main function, instead of updating
the options.output_dir option.
Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | tools/buildman/control.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/buildman/control.py b/tools/buildman/control.py index f319dc8..7c356ec 100644 --- a/tools/buildman/control.py +++ b/tools/buildman/control.py @@ -402,14 +402,15 @@ def do_buildman(options, args, toolchains=None, make_func=None, brds=None, toolchains = get_toolchains(toolchains, col, options.override_toolchain, options.fetch_arch, options.list_tool_chains, options.verbose) - if not options.output_dir: + output_dir = options.output_dir + if not output_dir: if options.work_in_output: sys.exit(col.build(col.RED, '-w requires that you specify -o')) - options.output_dir = '..' + output_dir = '..' # Work out what subset of the boards we are building if not brds: - brds = get_boards_obj(options.output_dir, options.regen_board_list, + brds = get_boards_obj(output_dir, options.regen_board_list, options.threads, options.verbose) if isinstance(brds, int): return brds @@ -451,13 +452,12 @@ def do_buildman(options, args, toolchains=None, make_func=None, brds=None, options.branch) # Create a new builder with the selected options. - output_dir = options.output_dir if options.branch: dirname = options.branch.replace('/', '_') # As a special case allow the board directory to be placed in the # output directory itself rather than any subdirectory. if not options.no_subdirs: - output_dir = os.path.join(options.output_dir, dirname) + output_dir = os.path.join(output_dir, dirname) if clean_dir and os.path.exists(output_dir): shutil.rmtree(output_dir) |