Merge branch 'distclean_no_locks_aware' into 'master'

Do not clean lock files in top and run dirs if no-lock opts are set

See merge request ita1024/waf!2252
This commit is contained in:
ita1024 2019-06-26 10:46:33 +00:00
commit bdb4dd90f6
1 changed files with 6 additions and 1 deletions

View File

@ -332,7 +332,12 @@ def distclean(ctx):
else:
remove_and_log(env.out_dir, shutil.rmtree)
for k in (env.out_dir, env.top_dir, env.run_dir):
env_dirs = [env.out_dir]
if not ctx.options.no_lock_in_top:
env_dirs.append(env.top_dir)
if not ctx.options.no_lock_in_run:
env_dirs.append(env.run_dir)
for k in env_dirs:
p = os.path.join(k, Options.lockfile)
remove_and_log(p, os.remove)