diff options
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/moveconfig.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/moveconfig.py b/tools/moveconfig.py index 7e916c2c9a4..0d64998e13a 100755 --- a/tools/moveconfig.py +++ b/tools/moveconfig.py @@ -252,6 +252,12 @@ def check_top_directory(): if not os.path.exists(f): sys.exit('Please run at the top of source directory.') +def check_clean_directory(): + """Exit if the source tree is not clean.""" + for f in ('.config', 'include/config'): + if os.path.exists(f): + sys.exit("source tree is not clean, please run 'make mrproper'") + def get_make_cmd(): """Get the command name of GNU Make. @@ -932,6 +938,8 @@ def main(): check_top_directory() + check_clean_directory() + update_cross_compile(options.color) if not options.cleanup_headers_only: |