summaryrefslogtreecommitdiff
path: root/tools/buildman/control.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-04-17 17:51:32 -0600
committerSimon Glass <sjg@chromium.org>2020-04-26 14:24:08 -0600
commit88daaef19f985b6ba2f9c0f62eed5378d6d40ebd (patch)
treedb309a9f2f44d1e25fa2c96ced9e33a28e86fa75 /tools/buildman/control.py
parent97944d3f7d03c83274d34eccf6a380548a16f444 (diff)
downloadu-boot-88daaef19f985b6ba2f9c0f62eed5378d6d40ebd.tar.gz
buildman: Make sure that -o is given with -w
It is a bad idea to use the default output directory ('..') with -w since it does a build in that directory and writes various files these. Require that -o is given to avoid this problem. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/buildman/control.py')
-rw-r--r--tools/buildman/control.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/buildman/control.py b/tools/buildman/control.py
index 7ee036824f..7c8d7520fb 100644
--- a/tools/buildman/control.py
+++ b/tools/buildman/control.py
@@ -175,6 +175,10 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None,
if options.incremental:
print(col.Color(col.RED,
'Warning: -I has been removed. See documentation'))
+ if not options.output_dir:
+ if options.work_in_output:
+ sys.exit(col.Color(col.RED, '-w requires that you specify -o'))
+ options.output_dir = '..'
# Work out what subset of the boards we are building
if not boards: