From d5f78a1462e30122099d9488162749728bf1de9c Mon Sep 17 00:00:00 2001 From: Jeremie Dimino Date: Wed, 1 Mar 2017 11:39:41 +0000 Subject: [PATCH] Clean the _build/install directory as well --- src/build_system.ml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/build_system.ml b/src/build_system.ml index 52866e70..2a9942d4 100644 --- a/src/build_system.ml +++ b/src/build_system.ml @@ -336,9 +336,13 @@ let remove_old_artifacts t = if not keep then Path.rmdir dir; keep in + let walk dir = + if Path.exists dir then ignore (walk dir : bool) + in List.iter t.contexts ~f:(fun (ctx : Context.t) -> - if Path.exists ctx.build_dir then - ignore (walk ctx.build_dir : bool)) + walk ctx.build_dir; + walk (Config.local_install_dir ~context:ctx.name); + ) let do_build_exn t targets = remove_old_artifacts t;