From b2bdf1e79096a8f0e2eb133b178f0f033b00c9b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ojeda=20B=C3=A4r?= Date: Fri, 15 Jan 2021 12:03:22 +0100 Subject: [PATCH] Normalize case of context root under Win32 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nicolás Ojeda Bär --- bin/common.ml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/common.ml b/bin/common.ml index cac11b66a7cc..7dddd4b6363a 100644 --- a/bin/common.ml +++ b/bin/common.ml @@ -86,9 +86,15 @@ let prefix_target common s = common.target_prefix ^ s let instrument_with t = t.instrument_with +let normalize_cwd s = + if Sys.win32 then + Path.External.of_string (String.lowercase_ascii (Path.External.to_string s)) + else + s + let set_dirs c = if c.root.dir <> Filename.current_dir_name then Sys.chdir c.root.dir; - Path.set_root (Path.External.cwd ()); + Path.set_root (normalize_cwd (Path.External.cwd ())); Path.Build.set_build_dir (Path.Build.Kind.of_string c.build_dir) let set_common_other ?log_file c ~targets =