buildman: Add a flag to force mrproper on failure
When a file is removed by a commit (e.g. include/common.h yay!) it can
cause incremental build failures since one of the dependency files from
a previous build may mention the file.
Add an option to run 'make mrproper' automatically when a build fails.
This can be used to automatically resolve the problem, without always
adding the large overhead of 'make mrproper' to every build.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/tools/buildman/cmdline.py b/tools/buildman/cmdline.py
index 03211bd..8dc5a87 100644
--- a/tools/buildman/cmdline.py
+++ b/tools/buildman/cmdline.py
@@ -90,7 +90,9 @@
parser.add_argument('--list-tool-chains', action='store_true', default=False,
help='List available tool chains (use -v to see probing detail)')
parser.add_argument('-m', '--mrproper', action='store_true',
- default=False, help="Run 'make mrproper before reconfiguring")
+ default=False, help="Run 'make mrproper' before reconfiguring")
+ parser.add_argument('--fallback-mrproper', action='store_true',
+ default=False, help="Run 'make mrproper' and retry on build failure")
parser.add_argument(
'-M', '--allow-missing', action='store_true', default=False,
help='Tell binman to allow missing blobs and generate fake ones as needed')