From 5971ab5c44cb0c32c88fcdc90a3a9b6430463c4c Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 1 Dec 2014 17:33:55 -0700 Subject: buildman: Add an option to flatten output directory trees When building current source for a single board, buildman puts the output in /current/current/. Add an option to make it use / instead. This removes the unnecessary directories in that case, controlled by the --no-subdirs/-N option. Suggested-by: Tom Rini Signed-off-by: Simon Glass --- tools/buildman/control.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tools/buildman/control.py') diff --git a/tools/buildman/control.py b/tools/buildman/control.py index cec02c6d53..747c80d76a 100644 --- a/tools/buildman/control.py +++ b/tools/buildman/control.py @@ -211,12 +211,16 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None, output_dir = options.output_dir if options.branch: dirname = options.branch.replace('/', '_') - output_dir = os.path.join(options.output_dir, dirname) + # 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) if clean_dir and os.path.exists(output_dir): shutil.rmtree(output_dir) builder = Builder(toolchains, output_dir, options.git_dir, options.threads, options.jobs, gnu_make=gnu_make, checkout=True, - show_unknown=options.show_unknown, step=options.step) + show_unknown=options.show_unknown, step=options.step, + no_subdirs=options.no_subdirs) builder.force_config_on_failure = not options.quick if make_func: builder.do_make = make_func -- cgit v1.2.3