summaryrefslogtreecommitdiff
path: root/tools/buildman/builder.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-07-14 17:51:03 -0600
committerSimon Glass <sjg@chromium.org>2014-07-28 04:52:55 +0100
commit189a496825aefe7c8e9be80c0f2a4cf5923d4f55 (patch)
tree8d6e523fd0deca56821b6edb9814bde229b81a5a /tools/buildman/builder.py
parent97e915262e06c5980124de2e0fe5c2f34b40ee8f (diff)
downloadu-boot-imx-189a496825aefe7c8e9be80c0f2a4cf5923d4f55.zip
u-boot-imx-189a496825aefe7c8e9be80c0f2a4cf5923d4f55.tar.gz
u-boot-imx-189a496825aefe7c8e9be80c0f2a4cf5923d4f55.tar.bz2
buildman: Support in-tree builds
At present buildman always builds out-of-tree, that is it uses a separate output directory from the source directory. Normally this is what you want, but it is important that in-tree builds work also. Some Makefile changes may break this. Add a -i option to tell buildman to use in-tree builds, so that it is easy to test this feature. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/buildman/builder.py')
-rw-r--r--tools/buildman/builder.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py
index 767b1f6..0a3900c 100644
--- a/tools/buildman/builder.py
+++ b/tools/buildman/builder.py
@@ -213,7 +213,10 @@ class BuilderThread(threading.Thread):
# self.Make() below, in the event that we do a build.
result = command.CommandResult()
result.return_code = 0
- out_dir = os.path.join(work_dir, 'build')
+ if self.builder.in_tree:
+ out_dir = work_dir
+ else:
+ out_dir = os.path.join(work_dir, 'build')
# Check if the job was already completed last time
done_file = self.builder.GetDoneFile(commit_upto, brd.target)
@@ -257,7 +260,10 @@ class BuilderThread(threading.Thread):
# Set up the environment and command line
env = self.toolchain.MakeEnvironment()
Mkdir(out_dir)
- args = ['O=build', '-s']
+ args = []
+ if not self.builder.in_tree:
+ args.append('O=build')
+ args.append('-s')
if self.builder.num_jobs is not None:
args.extend(['-j', str(self.builder.num_jobs)])
config_args = ['%s_config' % brd.target]
@@ -531,6 +537,9 @@ class Builder:
the following commits. In fact buildman will reconfigure and
retry for any failing commits, so generally the only effect of
this option is to slow things down.
+ in_tree: Build U-Boot in-tree instead of specifying an output
+ directory separate from the source code. This option is really
+ only useful for testing in-tree builds.
Private members:
_base_board_dict: Last-summarised Dict of boards
@@ -602,6 +611,7 @@ class Builder:
self.force_build_failures = False
self.force_reconfig = False
self._step = step
+ self.in_tree = False
self.col = terminal.Color()