diff options
author | Simon Glass <sjg@chromium.org> | 2014-12-01 17:33:55 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-01-14 21:16:52 -0800 |
commit | 5971ab5c44cb0c32c88fcdc90a3a9b6430463c4c (patch) | |
tree | 503e0311df4db18ff0148152c4e073fc705c9635 /tools/buildman/builder.py | |
parent | 2a9e2c6a0962cb04a12d833cc5c1c0920fa3b4f5 (diff) | |
download | u-boot-imx-5971ab5c44cb0c32c88fcdc90a3a9b6430463c4c.zip u-boot-imx-5971ab5c44cb0c32c88fcdc90a3a9b6430463c4c.tar.gz u-boot-imx-5971ab5c44cb0c32c88fcdc90a3a9b6430463c4c.tar.bz2 |
buildman: Add an option to flatten output directory trees
When building current source for a single board, buildman puts the output
in <output_dir>/current/current/<board>. Add an option to make it use
<output_dir>/<board> instead. This removes the unnecessary directories
in that case, controlled by the --no-subdirs/-N option.
Suggested-by: Tom Rini <trini@ti.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/buildman/builder.py')
-rw-r--r-- | tools/buildman/builder.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py index 05ebfd2..ca74c36 100644 --- a/tools/buildman/builder.py +++ b/tools/buildman/builder.py @@ -174,7 +174,8 @@ class Builder: self.func_sizes = func_sizes def __init__(self, toolchains, base_dir, git_dir, num_threads, num_jobs, - gnu_make='make', checkout=True, show_unknown=True, step=1): + gnu_make='make', checkout=True, show_unknown=True, step=1, + no_subdirs=False): """Create a new Builder object Args: @@ -213,6 +214,7 @@ class Builder: self._step = step self.in_tree = False self._error_lines = 0 + self.no_subdirs = no_subdirs self.col = terminal.Color() @@ -392,15 +394,17 @@ class Builder: Args: commit_upto: Commit number to use (0..self.count-1) """ + commit_dir = None if self.commits: commit = self.commits[commit_upto] subject = commit.subject.translate(trans_valid_chars) commit_dir = ('%02d_of_%02d_g%s_%s' % (commit_upto + 1, self.commit_count, commit.hash, subject[:20])) - else: + elif not self.no_subdirs: commit_dir = 'current' - output_dir = os.path.join(self.base_dir, commit_dir) - return output_dir + if not commit_dir: + return self.base_dir + return os.path.join(self.base_dir, commit_dir) def GetBuildDir(self, commit_upto, target): """Get the name of the build directory for a commit number |